I seem to have a problem with Collapsiblock and Tinymce when I run Lightbox. I am using the latest versions of all.

With Collapsiblock and Lightbox, on IE7, the blocks that are collapsible bounce open and closed on there own, making this feature unusable. It works great on Mozilla and Safari. I disable lightbox and it works.

Same this with Tinymce. When lightbox is enabled, Tinymce doesn't work in Mozilla. Works kind of in Safari (but this is normal). If I disable Lightbox, Tinymce works great.

I have enable Thickbox and all is good, but I like Lightbox.

Any ideas?

Thanks!
Dan

Comments

bugz_nz’s picture

Are you using the correct scriptaculous files?

Download the ones from here: http://www.stellapowerdesign.net/scriptaculous-drupal.zip

zuus’s picture

Version: 5.x-1.x-dev » 4.7.x-1.1

I am also having similar difficulties, though I am only using Lightbox2 and Tinymce. If I turn off the Lightbox Plus features, Tinymce initiates fine. Otherwise, I receive an error "tinyMCE.baseURL has no properties" when I load the page, and when I try to initiate tinyMCE manually via the Enable Rich Text link, I receive an error like "s.invalid_elements has no properties". This seems to only be an issue in Mozilla based browsers, IE7 works just fine.

Also, the problem only shows up when editing a node. Creating one will allow Tiny to initiate just fine.

I have tried using several different versions of the Lightbox2 and the javascript files, in many combinations, to no avail. If anybody has a solution or suggestion, I would be grateful.

danwassink’s picture

I am using the right scriptaculous files. Also, I have the same issues as noted by bugz_nz. New entries work with tinymce and lightbox, but when I need to edit, nothing works.

Any other ideas?

Thanks,
Dan

zuus’s picture

It seems that the Lightbox js files and the tinymce js files will never play nice. When they are both loaded on the same page, errors occur. In the lightbox.module, there is an if test that only loads the js files if the page is loaded with a 'view' operator. On clean built websites I cannot reproduce the error. Something in core or another module is causing the edit page to load with a 'view' handler, thus invoking lightbox along with tinymce. It should only be getting the 'load' and 'prepare' operators. If you absolutely need it fixed, you can eliminate

if ($op == 'view'

test, but leave the

if ($node->type = 'image'

test. This is not the preferred method, because now lightbox will only attach to image galleries and image nodes, but not cck types or anything else.

stella’s picture

lightbox2 - tinymce issues is already been reported in #142759

zuus’s picture

I've found perhaps a better way to fix the node api test. If you add another condition to line 58 of the module, so that it looks like this:

if ($op == "view" && !$LIGHTBOX2_INCLUDE && $page == "true") {

it will correct the problem as well. From looking at the rest of the code, however, this test is actually quite redundant. The drupal_add_js function is smart enough to not load javascript files twice. So, maybe if you were to load the javascript files when the link is generated, instead of at the noodapi hook, it would also solve the problem, but as I am in a production environment, I havnt the time to fix it myself.

stella’s picture

Try the patch from #166461 (comment #2) which will allow you to specify individual pages on which the lightbox javascript should not be loaded.

Cheers,
Stella

stella’s picture

Version: 4.7.x-1.1 » 5.x-1.1
Status: Active » Fixed

This should no longer be in an issue with the new version of lightbox2 which now uses jQuery, removing the need for prototype/scriptaculous libraries. This has been released in 5.x-2.0 and 6.x-1.0.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)
SirBerberitz’s picture

Just got the same problem like danwassink from the first entry ...

Using lightbox2-5.x-2.8 and tinymce_2_1_3 ...

No idea how to fix that. I will update this thread when I [hopefully] found a solution.

Did anybody found the solution on this in the meanwhile?

Cheers

SirBerberitz

stella’s picture

It's more likely to be a problem with collapsiblock or tinymce modules. The 5.x-2.x version of the lightbox2 module no longer uses the prototype / scriptaculous libraries, but instead jquery which is now part of the drupal distribution. This should eliminate any conflict errors.

Please try disabling the lightbox2 module and see if the problems persist - don't forget to clear your drupal and browser cache when you do this. If you can verify that it only stops working with the lightbox2 enabled, then please open a new issue for this, providing details on your lightbox2 and jquery update versions, along with your lightbox2 settings.

I've tried the latest lightbox2, tinymce and collapsiblock modules and everything's working, except the "collapsed by default" option, but that doesn't work for me even when I disable the other 2 modules.

Cheers,
Stella