Since I had to upgrade to Drupal 5.15 the fieldset class=" collapsible" is not working anymore in any form page (settings, node/add, node/edit and so on) when Lightbox2 is enabled. When I disable Lightbox2 everything is working normal. Up to Drupal 5.14 everything was working correctly.
Before the test I disabled all non-drupal modules, so the problem seems to be in Lightbox2.
This behaviour is in 2 different sites. A third site has no problem.
The difference is a setting I cannot change anymore because of the problem. In the third site Lightbox2 is only putting the javascript in the header on selected pages. In the other two sites javascript is put in the header on all pages.
The consequence is I have to disable Lightbox2 whenever I like to add, edit or delete a page or go into the administraton pages. Whenever another administrator goes into these changes he/she will be stuck, because they don't have the permission to enable/disable a module.
How can I change the settings (if nessecary directly in the MySQL database) to disable the javascript on all pages? After that I can edit the Lightbox2 settings again and enable only selected pages.
Comments
Comment #1
stella commentedwhen you upgraded to the new Drupal version, you more than likely overwrote the jquery.js file in the misc/ folder. You need to copy this file, and any others specified, from the jquery_update folder to your Drupal's misc/ directory again. You may need to clear your Drupal and browser cache after doing so. If you're using any JS compression, then you will need to regenerate the compressed file(s) again.
Cheers,
Stella
Comment #2
avpadernoIt's the same problem I had, and it was caused by the jquery.js file being overwritten. When I copied back the one from jquery_update.module, all returned to work.
Comment #3
Leeteq commented"Fixed" as far as the display is concerned perhaps, but there is a reason why the core .js file is affected by the security upgrade... Simply copying an old version or that file back will probably break (parts of) the security fix, not necessarily visibly or related to this module, but in other contexts on the Drupal site.
I wonder if there is a need for some kind of co-ordination or documentation when core security fixes is affecting files that JQuery Update has its own versions of.
Lets move this one over at the JQuery Update issue queue and see what those folks have to say about this.
If we risk breaking security fixes by replacing those files before JQuery Update module has come in an updated version, then this is "critical" at least in terms of getting it documented. Set back to normal priority if I am mistaken here.
Comment #4
avpadernoEffectively that is a risk; in those cases, you cannot use the jquery.js file given with Drupal, but you cannot use the one which comes with jquery_update.module too.
It would be much better if jquery_update.module would be one of the core modules; at least it would get updated when they change the core JavaScript files for any reason.
Comment #5
Leeteq commentedIt is relevant for Drupal core releases to have notes about this whenever a fix affects files that are supposed to be replaced with JQuery versions, given the widespread use and dependency on JQuery_update.
In fact, it would be nice (also as a reminder) to have a default sentence in the template for release notes that said something like:
"This update does not affect JQuery_update. If you use that module, you can (must) replace the new Drupal core files with the versions in the current JQuery_update module."
Then, whenever an update actually affects JQuery in a way that one should NOT copy/replace those files after the Drupal core update, then that notice should obviously be adjusted accordingly, and other actions or workarounds must be taken too.
I personally think it is best to have JQuery_update as a separate module so it can be maintained and updated independently of core, but actually important to give that module extra attention so that it is co-ordinated sufficiently fast whenever appliccable.
Comment #6
avpadernoThe problem is that if the module is developed separately from the core code; Drupal core developers will not give such a warning, otherwise they would do the same for many different third party modules.
The only way you have to know of any security issues caused by jQuery Update is that somebody fills a security report against that module, and then the developers would get a notification they need to change the code; if then somebody would issue a bug report for jQuery Update, you should wait for the developers of that module to fix the problem.
Comment #7
promesThanks for a lot of discussion on my problem. Several points in this discussion I like to comment here.
1. I did the test only in Firefox on Win2000 and Vista. After posting this issue I found out the problem doesn't exist in Internet Explorer 7 on Vista but it does in IE 7 on XP and IE 5 on Win2000. Based op experience of customers this problem also seems to exist in OS X-Firefox, OS X-Safari and Fedora-firefox.
2. The way I upgrade to a new version doesn't replace files with a newer filedate on the server. To be sure, I did replace the jquery.js file in the misc folder before issuing this post. So that cannot causing the problem.
DanielTheViking said: "there is a reason why the core .js file is affected by the security upgrade". But the core file is not updated at all in version 5.15. It is the same old version of Drupal 5.1, dated 12-23-2006.
So don't change the title and project of a post if you are not damned sure about the case ! I changed it both back to the original settings.
3. "clear your Drupal and browser cache". I didn't clear both caches up till reading your advice. It doesn't help. But when I disable Lightbox2 everything is working as expected (like in Drupal 5.14) the moment I enable Lightbox2 again the problem exists.
4. I am not using compression of any files.
5. For me the most important for this moment: I didn't get an answer about what changes of the Lightbox2 setting in the MySQL database I have to make to disable Lightbox2 to put the extra javascript in all my pages. After this change I can change the correct settings for Lightbox2 and my problem is solved for today.
I know this is not the real solution, but then the problem is manageble.
Comment #8
stella commentedregarding jquery update comments - in Drupal 6, the plan is to keep jquery.js up to date with the newest release, so the update module won't be needed any more. If you wish to follow up on this issue further, please open an entirely separate issue!
Question 5: short answer it's not easy.
long answer: you need to look in the
variabletable, and modify the values for thelightbox2_page_listandlightbox2_page_init_actionwhere necessary. The variable table holds data in serialized format, so i'd recommend backing up before making changes. You could try removing those vars altogether to return to the defaults - not sure that will help.Cheers,
Stella
Comment #9
Leeteq commentedI dont know what I was thinking, jquery.js is not changed in core, that is true. Sorry about that.
You can disable + uninstall, then reinstall Lightbox2.
There are other reports in this issue queue about new JS problem(s?) introduced with Lightbox2 version 2.8, and some sites has switching back to 2.7, although those reports are not related to your situation with 5.15 and collapsible fieldsets, so not sure if it is relevant in this case. Just practical to know, easy to test.
Comment #10
promesStella thanks for answering my question 5. After setting the two variables to:
lightbox2_page_list => s:1:”a”;
lightbox2_page_init_action => s:11:"page_enable";
lightbox2 doesn't put the extra javascript anymore in all headers.
For me, the only thing left is now to define the pages where lightbox2 is present.
To be sure everything will work now on a fresh installation, I created a brand new installation with Drupal 5.15, jquery_update and Lightbox2. But the default settings of lightbox2 is inserting the javaheaders in all pages. Even after creating both variables it wasn't working correctly. Only after copying all missing lightbox2 settings from the working site the new site started working normally.
So I think someone in the Drupal community has to see what is going wrong.
The solution of DanielTheViking: disable, uninstall and reinstall will not work either, since this is like installing lightbox2 in a fresh environment. Of course I tried it earlier this week as well. The only result: all my lightbox2 settings for that site were destroyed.
Comment #11
bgordon commentedSame problem here... I thought I was going crazy until I found this posting. Wishing I had not upgraded. Any ideas on a resolution. Regardless of whether is the drupal update not playing well with lightbox 2 or vice versa, any idea what part of lightbox could be stopping the collapsible fieldsets from working? The collapsible js is on the pages but seems to be getting broken by the lightbox code since disabling lightbox 2 makes the fieldsets work again.
I copied the jquery from my module and overwrote the misc/jquery... It does not report any errors in the status window and shows it at version 1.1.2
Comment #12
stella commentedYou probably need the jquery update 2.x version.
Duplicate of #364665: collapsed fieldsets inaccessible after update