Needs work
Project:
Bootstrap fieldgroup
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2015 at 15:11 UTC
Updated:
6 Oct 2015 at 20:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ckngPlease use jquery_update 7.x-3.x-dev as of this writing. You will be able to use default 1.4 for admin and configure separately for theme.
Comment #2
UksusoFF commentedYes, i know. But it's not fix issue.
TypeError: $(...).on is not a function
$('.bootstrap-fieldgroup-nav-type', context).on('change', function() {
mutateForm($(this));
});
Comment #3
ckngDepends on the bootstrap version, you should use jQuery >= 1.9.1 for your theme.
Comment #4
UksusoFF commentedI mean this error in Seven theme.
I do not want include bootstrap in default admin theme - Seven.
Comment #5
ckngCould you provide more details, how to reproduce the problem, what is actually broken? Screenshot or url would be great.
Comment #6
UksusoFF commentedSeven Theme 7.36
jQuery Update 7.x-3.x-dev
Site default jQuery version 1.11
Seven (admin theme) 1.4 (Drupal core)
I've trying add node with Bootstrap fieldgroup.
Comment #7
cha0s commentedThe way field API works is you can manage fields, and you can manage display.
Manage fields has to do with the entity (node) creation/edit form, which is using your administrative theme. Your administrative theme here is Seven, which is not a bootstrap theme. So, you don't want to use bootstrap_fieldgroup in the manage fields section.
Manage display has to do with entity (node) rendering, which uses your normal site theme. I'm assuming you're using a bootstrap theme for the site default theme. So, use bootstrap_fieldgroup in the manage display section.
Comment #8
UksusoFF commentedYes, i can use default site theme on node edit form. By check this: "Use the administration theme when editing or creating content" in Appearance settings.
But maybe need add some check for test bootstrap is loaded in JS?
For eg: http://stackoverflow.com/questions/13933000/how-to-check-if-twitter-boot...
This error can confused some users ;)
Comment #9
cha0s commentedFair enough, you convinced me. I added in a little hack to try to add a message for the user as well as disabling the JS.
Comment #11
UksusoFF commentedThanks, but on bootstrap theme it's show warning too.
Comment #12
cha0s commentedI actually went to your site, rock63.ru and ran the code:
(typeof jQuery().modal == 'function'). It returnedTRUE, so I'm not sure why you're seeing that error.Comment #13
UksusoFF commentedYes, look on message icon. Why it's green check on second screen?
Comment #14
UksusoFF commentedBTW, with this commit it's not get JS-error on Seven theme and not breaking CKEditor.
Comment #15
ckngThis is causing the message shown on a bootstrap subtheme.
"You are using bootstrap_fieldgroup on a non-bootstrap theme. The JavaScript has been disabled, however you should remove the bootstrap field groups appearing on this page (or change the theme)."
is returning true in my case.
It is not a good check as well, what if modal is disabled, it will cause this to be triggered as well.
Probably a better solution is from php side, not to load the bootstrap_fieldgroup.js based on admin theme setting?
Comment #16
ckngMore information:
I'm using Seven as admin theme but "Use the administration theme when editing or creating content" is unchecked.
Comment #17
ckngOn top of that, manipulating the error messages from js is a bad idea, IMHO. If user has customized/themed the error messages any other way then this is going to break.
Comment #18
milos.kroulik commentedThe module also breaks settings dialog for field group settings, when Format is set to one of the module's values. The JS error is:
TypeError: $(...).on is not a functionIt's reasonable to assume, that non-Bootstrap theme is used on Manage display page.
Please let me know, if I should create separate issue for this.