Support

Account

Home Forums Backend Issues (wp-admin) Fix for switchEditors (since WordPress 4.3)

Solved

Fix for switchEditors (since WordPress 4.3)

  • I might be a little hastily here, and this might already be picked up, but thought I’d share it anyway:

    Since WordPress 4.3 the switch buttons of the TinyMCE editor have changed. This currently results in the following error:

    Uncaught TypeError: switchEditors.switchto is not a function

    The fix for this is in acf/fields/wysiwyg.php : Line 297/298
    Remove this:
    [code]onclick=”switchEditors.switchto(this);”[/code]
    Add this:
    [code]data-wp-editor-id=”<?php echo $id; ?>”[/code]

    (Since I’m only using ACF Pro, this fix is for Pro only, but similarly this should also work for the ‘default’ ACF!

  • Sweet. I sent a ticket about this to the devs earlier today. Your fix works on my end.

  • What version of ACF Pro are you using? Just curious if 5.2.9 corrected this or not because that update does mention compatibility with 4.3.

  • Fresh start in the day, noticed new WP version, updated, broke the Editor tab switching, right on the day when I have a ton of content editing to do.

    Thank you so much Dennis, solved the Editor tab not switching issue.

    For me the code was in line numbers 303 & 304. ACF Pro v5.2.9

  • Thanks, was just making sure. I’ll see what I can do to get E to look at this topic

  • Don’t think we need water boarding here do we?

  • Thanks for this fix! It did the trick for me. I’ll second the note that in ACF Pro 5.2.9 the lines in question are 303 and 304.

    Hopefully this fix will get rolled into a 5.2.10 update shortly!

  • Hi guys

    Thanks for the bug report.

    I’ve just spotted this bug too, and will release a fix later today

    Thanks for your patience

  • Hi guys

    I’ve just released a new version 5.3.0 to fix this issue.
    Please update and let me know how you find it

  • I’m getting a different error when using flexible content in conjunction with the WYSIWYG.

    Uncaught TypeError: Cannot read property 'canvas' of undefined
    in the quicktags functionality.

    Enabling/disabling SCRIPT_DEBUG fixes the issue which is strange.

  • Ignore me. This was a caching issue.

  • I can’t get the plugin to update to 5.3.1. The license is there, when I check for updates, it tells me that there’s a new version. But when I click on update it just takes me to the plugin update page where there’s no update to be made.

    Any ideas?

Viewing 14 posts - 1 through 14 (of 14 total)

The topic ‘Fix for switchEditors (since WordPress 4.3)’ is closed to new replies.