Support

Account

Home Forums ACF PRO WYSIWYG buttons issue after update to 5.7

Solving

WYSIWYG buttons issue after update to 5.7

  • Hi!
    After update ACF to version 5.7 I have problem to display wysiwyg field, wordepss version is 4.9.7.
    acf issue

    Console:

    Uncaught TypeError: Cannot read property 'buttons' of undefined
        at Object.buildQuicktags (acf-input.min.js?ver=5.7.0:3)
        at Object.initializeQuicktags (acf-input.min.js?ver=5.7.0:3)
        at Object.initialize (acf-input.min.js?ver=5.7.0:3)
        at initializeEditor (acf-input.min.js?ver=5.7.0:3)
        at initialize (acf-input.min.js?ver=5.7.0:3)
        at i.t (acf-input.min.js?ver=5.7.0:1)
        at i.acf.Model (acf-input.min.js?ver=5.7.0:1)
        at i [as constructor] (acf-input.min.js?ver=5.7.0:1)
        at new i (acf-input.min.js?ver=5.7.0:1)
        at Object.acf.newField (acf-input.min.js?ver=5.7.0:1)

    I create ACF field by php code in the functions.php file

  • I have the same problem on my site, unable to switch between Visual and Text buttons since ACF 5.7.0.

    For me, problem seen only on frontend form ( acf_form() ).

    I have also the same Wp version 4.9.7

  • Additional info… in my case, this issue only occurs on the first element in my flexible content layouts list

  • Hey guys…

    I’m in the same boat here….bugger. Same exact error:

    Uncaught TypeError: Cannot read property ‘buttons’ of undefined
    at Object.buildQuicktags

    I have a plugin that (heavily) leans on ACF and also defines fields by PHP code. This issue is present in ACF Pro (5.7.5 & 5.7.6) but does not appear to be present in the “Free” version (5.7.2) when enabled for early access.

    I’m scratching my head here a bit and brainstorming on how to isolate what field might be causing the issue.

    Has anyone found a solution or have any clues to share?

    Thanks in advance.

  • Try clearing your browser cache. It may be do to an older version of a script caught in your cache.

  • Cleared browser cache, problem still exists in 5.7.7.

    I’m scratching my head here a bit and brainstorming on how to isolate what field might be causing the issue.

    Any WYSIWYG field will produce the error.

    It also breaks the ‘append’ action after a new term is added in edit-tags.php, so any code that is relying on that callback is not working. I had to reload the page as an ugly workaround, so a bugfix would be greatly appreciated.

  • I’m not seeing an issue with wysiwyg fields. The next step would be the standard “Deactivate all other plugins”. There must be a JS conflict. If we know were to look we may be able to figure out a solutions.

  • Deactivated all other plugins and even switched to the standard WP theme Twenty Sixteen, problem still exists.

    Here are the steps to reproduce the error:

    1. Create new field group
    2. Create new field, type WYSIWYG-Editor. Leave all other field options on default
    3. Create rule: Taxonomy is Category
    4. Successfully add a new category term in Posts -> Category
    5. While trying to re-init TinyMCE for the WYSIWYG field, JS error is thrown

    If you set the “delay” option for the WYSIWYG-field to “yes”, the error is not thrown after a term was added, but when you click on the field to init TinyMCE.

  • Ah, until your last comment it was not clear that this was on the “Add Term” page. Yes, On this one specific page I am seeing the errors you describe.

    I suspect this has something to do with WP submitting and reloading the fields on the page through AJAX and scripts needed for the wysiwyg field are not loaded properly, but I don’t know. You should submit a but report on this here https://www.advancedcustomfields.com/contact/

  • Ah, until your last comment it was not clear that this was on the “Add Term” page.

    At least that’s where I’m seeing this bug. For other users in this thread it seems to happen on other pages, too (but not for me).

    I suspect this has something to do with WP submitting and reloading the fields on the page through AJAX and scripts needed for the wysiwyg field are not loaded properly, but I don’t know.

    I’m pretty sure there’s no problem with WP core code here, because a standard taxonomy does not have a WYSIWYG-field, so there’s no need to handle such scripts.

    You should submit a but report on this here

    Thanks, will do.

  • is there a solution for this problem?

    thx

  • I recently submitted a bug report and ACF-dev Elliot was able to fix this, at least for my use case. The fix is included in the latest release 5.7.9, probably was already part of 5.7.8.

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

The topic ‘WYSIWYG buttons issue after update to 5.7’ is closed to new replies.