Title: Javascript error when using acf blocks and tinymce
Last modified: July 10, 2019

---

# Javascript error when using acf blocks and tinymce

 *  [fruchtfliege](https://wordpress.org/support/users/fruchtfliege/)
 * (@fruchtfliege)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/javascript-error-when-using-acf-blocks-and-tinymce/)
 * Hi, I’m using acf blocks in combination with the acf tinymce field. So when using
   a tinymce field in a registered gutenberg block, i got an error in console:
 *     ```
       Uncaught TypeError: Cannot read property 'buttons' of undefined
           at Object.buildQuicktags (acf-input.min.js?ver=5.8.1:4)
           at Object.initializeQuicktags (acf-input.min.js?ver=5.8.1:4)
           at Object.initialize (acf-input.min.js?ver=5.8.1:4)
           at n.initializeEditor (acf-input.min.js?ver=5.8.1:3)
           at n.initialize (acf-input.min.js?ver=5.8.1:3)
           at n.e (acf-input.min.js?ver=5.8.1:1)
           at n.acf.Model (acf-input.min.js?ver=5.8.1:1)
           at n [as constructor] (acf-input.min.js?ver=5.8.1:1)
           at new n (acf-input.min.js?ver=5.8.1:1)
           at Object.acf.newField (acf-input.min.js?ver=5.8.1:1)
       ```
   
 * The error occurs only when clicking in the block to edit it, while first click
   just marks the whole block blue. I have to click twice to see the broken content.
 * If this happens, the layout gets broken and the text in tinymce is getting white(
   you have to select the content to see it), and the fields are disordered. Changing
   to another tab (I have two acf tabs, one for the content and one for settings
   who are shared by a clone field, like spacings, etc.) is not working then, too.
 * Since i’m using the tinymce field a lot, this is very annoying. My acf version
   is the newest (5.8.1) and wordpress also (5.2.2).
    -  This topic was modified 6 years, 10 months ago by [fruchtfliege](https://wordpress.org/support/users/fruchtfliege/).
    -  This topic was modified 6 years, 10 months ago by [fruchtfliege](https://wordpress.org/support/users/fruchtfliege/).
    -  This topic was modified 6 years, 10 months ago by [fruchtfliege](https://wordpress.org/support/users/fruchtfliege/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [fruchtfliege](https://wordpress.org/support/users/fruchtfliege/)
 * (@fruchtfliege)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/javascript-error-when-using-acf-blocks-and-tinymce/#post-11747994)
 * I wonder why the newer tickets got no reply?
 * In my case I tried recent update 5.8.2 which fixes problems with tinymce in delay
   mode. But it needs urgently a fix if you don’t use the delay mode since my clients
   don’t want to click twice in field.
 * As I wrote, the problem starts when you don’t use delayed tinymce fields in several
   acf blocks (doesn’t matter if it’s a repeater or not). When you create the block,
   everything seems to be finde, but after saving and trying to edit the tinymce
   content, the layout (of tabs) get messed up and the visual editor content of 
   tinymce got white and outputs html code.
 *  [Patrick64](https://wordpress.org/support/users/patrick64/)
 * (@patrick64)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-when-using-acf-blocks-and-tinymce/#post-11830998)
 * I getting this error using ACF blocks. Any way round it yet?
 *  Thread Starter [fruchtfliege](https://wordpress.org/support/users/fruchtfliege/)
 * (@fruchtfliege)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/javascript-error-when-using-acf-blocks-and-tinymce/#post-12054520)
 * This error is still not fixed. The changelog of 5.8.5 says: “Fix – Fixed bug 
   causing tinymce issues when changing between block modes.” but it doesn’t fix
   this bug at all.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Javascript error when using acf blocks and tinymce’ is closed to new 
replies.

 * ![](https://ps.w.org/advanced-custom-fields/assets/icon.svg?rev=3207824)
 * [Advanced Custom Fields (ACF®)](https://wordpress.org/plugins/advanced-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [tinymce](https://wordpress.org/support/topic-tag/tinymce/)

 * 3 replies
 * 2 participants
 * Last reply from: [fruchtfliege](https://wordpress.org/support/users/fruchtfliege/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/javascript-error-when-using-acf-blocks-and-tinymce/#post-12054520)
 * Status: not resolved