I noticed while editing, that one of my sites no longer had the "Block format" or "Styles" drop-down tools in the TinyMCE rich text editor. I went in to my wysiwyg profiles section and edited the buttons and plugins to reactivate the two drop-down tools and they returned to service.

As I wasn't certain that this was related to the WYSIWYG update from , 7.x–2.1 to 7.x–2.2 I updated another site but first checked to see if the tools were active. Like the earlier site, as soon as I updated to 7.x–2.2 my "block format" and "styles" drop-downs were deactivated. The fix was editing and reactivating them within the buttons and plugins editing screen.

Comments

mxh’s picture

Confirmed. Issue seems only affect TinyMCE, CKEditor for example is not affected.

twod’s picture

StatusFileSize
new36.7 KB

Looks like #970452: Fix TinyMCE plugin names and remove outdated plugin information should have included a database update to iterate through any existing TinyMCE profiles and check if the formatselect or fontselect buttons were enabled in the old "font" plugin (which doesn't actually exist) and move those to the "default" plugin.

twod’s picture

Status: Active » Needs review
StatusFileSize
new1.18 KB

Here's a patch that moves all the buttons from the old "font" plugin into the "default" plugin.

To test it, install Wysiwyg 7.x-2.1 from scratch or downgrade again (don't delete profiles and don't uninstall it). Perform it on a test installation if you are unsure.

Either create a new TinyMCE profile or edit an existing one and enable the any of the "Font Size", "Block Format", "Styles" or "Font" buttons. (They will have been disabled going back to 2.1 as well if you saved the profile after updating to 2.2.)

Then install 2.2, apply the patch, run update.php.

Check that the buttons are still enabled on all TinyMCE profiles you enabled them on.

awasson’s picture

Thanks. I'll test it out later today and report back.

Andrew

sun’s picture

Status: Needs review » Fixed
StatusFileSize
new1.16 KB

Committed attached patch.

Would be great to get some additional confirmations, if this fix worked for you.

twod’s picture

No cache clearing?

sun’s picture

update.php flushes all caches already :)

twod’s picture

Of course... nm then.

eric_a’s picture

Version: 7.x-2.2 » 6.x-2.x-dev
Status: Fixed » Patch (to be ported)
Issue tags: +Needs backport to D6

The change from #970452: Fix TinyMCE plugin names and remove outdated plugin information got into multiple branches, meaning that wysiwyg 6.x-2.x needs an update_N, too. Updating to dev when coming from a pre January 9th version means getting buttons disabled...

awasson’s picture

I don't know why but that patch is giving me an error when I try to apply it....

Andrew's-Workstation:wysiwyg awasson$ patch --dry-run -i update.5.patch
patching file wysiwyg.install
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 36:

I've just scraped the patch from the link provided: http://drupal.org/files/wysiwyg.tinymce-update.5.patch

twod’s picture

Status: Patch (to be ported) » Fixed

Thanks for the reminder, Eric_A.
I've committed D6 and D5 versions of this patch as well, -dev snapshots will be updated within 12hrs.

@awasson, looks like maybe you didn't get the whole patch file.
I apply with git apply and it worked fine. To do it in one line, with CURL installed:
curl "http://drupal.org/files/wysiwyg.tinymce-update.5.patch" | git apply.
Should also be possible with wget and the -O switch.

ben coleman’s picture

FWIW, we noticed the same thing here (the Advanced Image plugin disappeared from the buttons, though it was still checked in the profile). Re-activating (actually, deactivating and then reactivating) didn't bring it back, but deleting the profile and re-creating it did.

awasson’s picture

@TwoD: Thanks, using curl & Git worked. I tried the old fashioned way where I scraped the patch into a file and then used the terminal patch command to apply it. Git did it nice and neatly. I'll give the patched module a try and let you know how it works out.

EDIT: I just checked the patched module (using the Patch from #3) and it retains the settings successfully.

Andrew

twod’s picture

@Ben Coleman, the Advanced Image plugin metadata hasn't changed in Wysiwyg between releases so it should not have been disabled. The other buttons were actually unchecked in the profile settings GUI after the update because the stored profile settings data didn't actually have the "enabled" status in the place where Wysiwyg was now looking for it.
The Advanced Image plugin issue looks more like there was a settings conflict which prevented that plugin or its button from being loaded. Recreating the profile data could have cleared up that conflict.

@awasson, thanks for the confirmation.

Just to be clear, there's no longer a need to manually patch anything before upgrading from 7.x-2.1 or 6.x-2.4 to the development snapshots to keep the buttons enabled.

twod’s picture

Issue tags: -Needs backport to D6

No tag needed either. ;)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.