Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After installing the 7.x-2.3 update, the media browser supplied by Media WYSIWYG does not open. Media version is 7.x-2.0-rc1. The button code in the new version includes "href="javascript:void('Media browser')"". The button in the working version includes "href="javascript:void('Add media')"".
Comments
Comment #2
TwoDI'm having no issues with the rc1 version of Media.
Which editor and version are you using?
Media module is responsible for the name of its plugin buttons, Wysiwyg module does not change it between versions.
Did you change the version of Media module as well?
The plugin's button name has always defaulted to 'Add media' as far as I can tell, but it is set using a variables so it may have been overridden.
Did you make sure to flush caches and run update.php after upgrading the files?
Comment #3
holtzman CreditAttribution: holtzman commentedMedia was updated to rc1 before the WYSIWYG update. I ran update.php and cleared the caches after each update. The editor was CKEditor 3.6.0.6902. Updating to 4.6.1.580bcaf eliminates the problem: the button code is "Media browser", but it works as expected. So the problem is solved (for me) unless the CKEditor update causes other issues. Thanks for your quick reply.
Comment #4
cajewell CreditAttribution: cajewell commentedI had the same problem when I updated the wysiwyg module from 7.x-2.2 to 7.x.2-3. The media button worked fine with 2.2, but gave me the same javascript:void error in 2.3. I reinstalled 7.x-2.2 and the media button works again. I'm using Media 7.x-1.6 and CKEditor 3.5.0.6260. I did not update the Media module or CKEditor when I updated wysiwyg.
Comment #5
cajewell CreditAttribution: cajewell commentedAdditional information - I have two other sites that are running Media 7.x-1.6 and CKEditor 4.2.0.f74e558. I upgraded the wysiwyg module from 7.x-2.2 to 7.x-2.3 and the media button works as expected.
Comment #6
TwoDI'm not sure what to do about this as I can't reproduce it. If you're getting JS errors it could be because some old files are still cached by the browser.
@cajewell, if the site gets issues again when upgrading to 7.x-2.3, I could have a look at it.
Note that simply downgrading isn't supported as the editor profile structure changed between 7.x-2.2 and 7.x-2.3. It gets compensated for when running update.php after installing 7.x-2.3 but there's no way to handle that difference in reverse so a full reinstall of the older release is necessary. Or at least remove all profiles and add them again, but then you won't be able to run the upgrade path when trying the newer version again.
Comment #7
chriso CreditAttribution: chriso as a volunteer commentedI had this happen to me just now, while updating a bit of contrib including wysiwyg 7.x 2.2 -> 2.3
The site in question has been running CKEditor 3.5.3 for some years, with media-7.x-1.x branch.
Steps I took to reproduce:
$ drush dl wysiwyg media-1.6
$ drush en -y wysiwyg media field_ui
$ cd
<drupal root>/sites/all/libraries
$ wget http://download.cksource.com/CKEditor/CKEditor/CKEditor%203.5.3/ckeditor_3.5.3.tar.gz
$ tar xzf ckeditor_3.5.3.tar.gz
Expected result: media browser modal window opens.
Actual result: Console error thrown when clicking the button.
Steps to fix - just drop in the most recent listed-as-supported version of CKEditor:
$ cd
<drupal root>/sites/all/libraries
$ rm -r ckeditor*
$ wget http://download.cksource.com/CKEditor/CKEditor/CKEditor%204.6.1/ckeditor_4.6.1_standard.tar.gz
$ tar xzf ckeditor*
$ drush cc all
... and now the button works after a page reload at node/add/testing
I did some trial and error via the CKEditor release page and isolated it to CK v3.6.1 ... i.e. v3.6.1 works, but v3.6 and earlier seems not to work.
I haven't really dug through the changes on either the plugin or this module to spot just what happened where, but unless there's a quick obvious fix I'd suggest raising the minimum supported version for 7.x-2.3 to 3.6.1 rather than 3.0.0.
Comment #8
chriso CreditAttribution: chriso as a volunteer commentedRespectfully shifting from support request to bug, since the issue is reproducible within the currently-stated supported versions of the CKEditor library.
Comment #9
TwoDAh, I see this is the same problem as in #2844609: Cross-editor plugin text selection regression., a regression in the latest version. A fix has been committed to the -dev version already and I'm going to make a follow-up release including it soon. Please help test the -dev snapshot and confirm it does indeed fix the dialog (else re-open this issue).