• PastorCG

    (@pastorcg)


    I just upgraded Code Snippets to 3.9.0 this evening and within minutes, the message I included in the topic title began appearing on multiple WP admin pages for plugins such as “The Events Calendar Pro” and “Sign-Up Sheets” and “WP Forms” – the original reason we downloaded and use snippets.

    Is there something we need to adjust in the latest version or are going to have to deactivate the plugin?

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Imants

    (@0aksmith)

    @pastorcg Thank you so much for reporting this and listing the plugins.
    Im not sure yet what could be causing this but I will look into this and test myself too.
    I’ll keep you posted over here, and release a patch as soon as i have one.
    In the meantime, feel free to rollback to a previous version, if this is causing any trouble.
    You can easily do that from the plugin settings > debug page.

    flyingokole

    (@flyingokole)

    Aloha!

    I just wanted to chime in and also say that I just updated to latest version today and Iʻm also getting the same error message “Failed to initialize plugin: code_snippets” pop up in red banner on my WooCommerce Product pages.

    Plugin Author Imants

    (@0aksmith)

    @pastorcg and @flyingokole thank you again for reporting this so quickly.
    Thanks to you I was able to reproduce the issue and fix the incompatibility with the TinyMCE integration. A patch version has been released just now.
    Please update at your earliest opportunity and let me know if the fix worked out.

    superphysics

    (@superphysics)

    Hello!

    Just wanted to update that I have a similar problem. But I also want to note that updating to 3.9.1 has not helped, and am still seeing the issue (on product pages, order pages, etc.). I cleared all the caches, for my CDN, local cache and also tapped the Reset Cache button in the Code Snippet Plugin Settings (none of which helped)

    superphysics

    (@superphysics)

    Oh, and the rollback to an older version (3.8.2) doesn’t seem to help either!

    HungryJos

    (@hungryjos)

    I had updated earlier to version 3.9.0 and I had another site where I’m still on version 3.6.8

    I’m only getting the error message on the site with version 3.9.0 and after updating to 3.9.1 the error is still there. It appears when editing woocommerce products.

    On the site with version 3.6.8 everything is fine. But rolling back to this version does not fix the error on the site with version 3.9.0 or later

    Plugin Author Imants

    (@0aksmith)

    Hi Guys! I just want to drop a quick update that we are still looking into this.

    I did manage to fix this for myself, however is worth noting that im using all latest versions of WP core, Woocommerce, Sign-Up Sheets, WP Forms, Code Snippets v3.9.1 and the latest Chrome, Firefox and/or Safari browsers.

    Also to clarify id like to add that this issue is not affecting any functionality in terms of snippets execution as this is just an incompatibility with our way to extend the options of the WP built-in classic editor (TinyMCE).

    I would also like to thank you all one more time for reporting this issue promptly and please keep doing so.

    Any additional information, that you can share here, about your setup, like additional plugin versions, browser brand and version, OS and any relevant debug/error/console logs is highly appreciated as it will help us to recreate your specific conditions and get to the bottom of this issue.

    • This reply was modified 2 weeks ago by Imants.
    superphysics

    (@superphysics)

    Hey! Thanks for looking into this.

    Myself, I’m running the latest version of everything – WordPress, Woo. I use the Astra theme, also the latest version. PHP is a little old, 7.4.33.

    Latest version of Chrome, all caches and everything cleared site side, CDN wide, and browser side.

    Pasted the Devtools console error here, but not sure if that means anything.

    Failed to initialize plugin: code_snippets TypeError: r is not a constructor
    at Ew (tinymce.min.js?ver=49110-20250317:2:330473)
    at Array.<anonymous> (tinymce.min.js?ver=49110-20250317:2:332223)
    at Object.jt [as each] (tinymce.min.js?ver=49110-20250317:2:29356)
    at Aw (tinymce.min.js?ver=49110-20250317:2:332173)
    at tN.<anonymous> (tinymce.min.js?ver=49110-20250317:2:333551)
    at Array.<anonymous> (tinymce.min.js?ver=49110-20250317:2:96969)
    at jt (tinymce.min.js?ver=49110-20250317:2:29356)
    at u (tinymce.min.js?ver=49110-20250317:2:96914)
    at n (tinymce.min.js?ver=49110-20250317:2:96402)
    at l.<computed>.l.<computed>.l.<computed>.o.onload (tinymce.min.js?ver=49110-20250317:2:96652)
    Th @ tinymce.min.js?ver=49110-20250317:2
    pluginInitError @ tinymce.min.js?ver=49110-20250317:2
    Ew @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    Aw @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    u @ tinymce.min.js?ver=49110-20250317:2
    n @ tinymce.min.js?ver=49110-20250317:2
    l.<computed>.l.<computed>.l.<computed>.o.onload @ tinymce.min.js?ver=49110-20250317:2
    script
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    u @ tinymce.min.js?ver=49110-20250317:2
    Ri.loadScripts @ tinymce.min.js?ver=49110-20250317:2
    Ri.loadQueue @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    waitFor @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    u @ tinymce.min.js?ver=49110-20250317:2
    n @ tinymce.min.js?ver=49110-20250317:2
    l.<computed>.l.<computed>.l.<computed>.o.onload @ tinymce.min.js?ver=49110-20250317:2
    script
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    u @ tinymce.min.js?ver=49110-20250317:2
    Ri.loadScripts @ tinymce.min.js?ver=49110-20250317:2
    Ri.loadQueue @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    Ow @ tinymce.min.js?ver=49110-20250317:2
    Bw @ tinymce.min.js?ver=49110-20250317:2
    render @ tinymce.min.js?ver=49110-20250317:2
    n @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    e @ tinymce.min.js?ver=49110-20250317:2
    C @ tinymce.min.js?ver=49110-20250317:2
    d @ tinymce.min.js?ver=49110-20250317:2
    a @ tinymce.min.js?ver=49110-20250317:2
    tinymce.min.js?ver=49110-20250317:2 Failed to initialize plugin: code_snippets TypeError: r is not a constructor
    at Ew (tinymce.min.js?ver=49110-20250317:2:330473)
    at Array.<anonymous> (tinymce.min.js?ver=49110-20250317:2:332223)
    at Object.jt [as each] (tinymce.min.js?ver=49110-20250317:2:29356)
    at Aw (tinymce.min.js?ver=49110-20250317:2:332173)
    at tN.<anonymous> (tinymce.min.js?ver=49110-20250317:2:333551)
    at Array.<anonymous> (tinymce.min.js?ver=49110-20250317:2:96969)
    at jt (tinymce.min.js?ver=49110-20250317:2:29356)
    at u (tinymce.min.js?ver=49110-20250317:2:96914)
    at n (tinymce.min.js?ver=49110-20250317:2:96402)
    at l.<computed>.l.<computed>.l.<computed>.o.onload (tinymce.min.js?ver=49110-20250317:2:96652)
    Th @ tinymce.min.js?ver=49110-20250317:2
    pluginInitError @ tinymce.min.js?ver=49110-20250317:2
    Ew @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    Aw @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    u @ tinymce.min.js?ver=49110-20250317:2
    n @ tinymce.min.js?ver=49110-20250317:2
    l.<computed>.l.<computed>.l.<computed>.o.onload @ tinymce.min.js?ver=49110-20250317:2
    script
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    u @ tinymce.min.js?ver=49110-20250317:2
    Ri.loadScripts @ tinymce.min.js?ver=49110-20250317:2
    Ri.loadQueue @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    waitFor @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    u @ tinymce.min.js?ver=49110-20250317:2
    n @ tinymce.min.js?ver=49110-20250317:2
    l.<computed>.l.<computed>.l.<computed>.o.onload @ tinymce.min.js?ver=49110-20250317:2
    script
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    u @ tinymce.min.js?ver=49110-20250317:2
    Ri.loadScripts @ tinymce.min.js?ver=49110-20250317:2
    Ri.loadQueue @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    Ow @ tinymce.min.js?ver=49110-20250317:2
    Bw @ tinymce.min.js?ver=49110-20250317:2
    render @ tinymce.min.js?ver=49110-20250317:2
    n @ tinymce.min.js?ver=49110-20250317:2
    (anonymous) @ tinymce.min.js?ver=49110-20250317:2
    jt @ tinymce.min.js?ver=49110-20250317:2
    e @ tinymce.min.js?ver=49110-20250317:2
    C @ tinymce.min.js?ver=49110-20250317:2
    d @ tinymce.min.js?ver=49110-20250317:2
    a @ tinymce.min.js?ver=49110-20250317:2
    tinymce.min.js?ver=49110-20250317:2
    sagency

    (@sdagency)

    Spent about 2+ hours trying to workaround this. What a nightmare.

    For us if we disabled the Advanced Custom Fields plugin then the red editor error of “Failed to initialize plugin: code_snippets” would go away in the editor.

    If we turned that back on and disabled ACF related snippets the error still showed.

    We moved all out snippet code to functions.php then deleted Code Snippets and reinstalled in, but then the “Failed to initialize plugin: code_snippets” re-appeared!

    So we had to delete Code Snippets once again and move all the code to mu-plugins and it’s currently working.

    We spent 2+ hours because after the initial update to the Code Snippets plugin there was no error. Then when we added a new snippet it started happening.

    We hope something in our chain of troubleshooting will help.

    Aloha! Thanks for the quick fix! After updating to the latest plugin version, the edit view of my Product pages for WooCommerce is no longer showing the error message. Thank you!!

    still have the error after updating (using PODS, select field as rich editor), PLEASE add a toggle to disable the addition of these editor buttons all together

    • This reply was modified 1 week, 6 days ago by nodwsp.

    I just noticed this on Code Snippets 3.9.0 as well. Updating to 3.9.1 and clearing my Cloudflare cache didn’t help.

    BUT, then I did a CTRL-Refresh and the problem seems to be gone. So make sure you clear your browser’s local cache, too!

    Plugin Contributor Louis Wolmarans

    (@louiswol94)

    Hi, can you check if the issue has been fixed with version 3.9.2? Thanks!

    Yes! Mine worked now, the error’s gone.

    Thanks!

    I’m experiencing this issue on all my websites. I’m unable to add new snippets as well.
    Please consider adding an option to disable the snippets button in the editor.
    I’m using the latest WordPress version with all plugins updated, PHP 8.3, and Classic Editor.

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

You must be logged in to reply to this topic.