Error “o is not a function” in v23.2
Please give us a description of what happened
- Support have been getting reports for a bug where the error
o is not a functionappears in the console when users edit their pages/posts, using the latest version 23.2. - It's reported that the error appears when only Free is active (I assume the same is true for Free & Premium).
- Here is the Slack thread for more details. If necessary, ask Support for more information from the Help Scout tickets (if you don't have access to Help Scout like me).
To Reproduce
Step-by-step reproduction instructions
Expected results
- No Console errors when using 23.2 Free and/or Premium.
Actual results
Screenshots, screen recording, code snippet
If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.
Technical info
- If relevant, which editor is affected (or editors):
- [ ] Block Editor
- [ ] Gutenberg Editor
- [ ] Elementor Editor
- [ ] Classic Editor
- [ ] Other:
- Which browser is affected (or browsers):
- [ ] Chrome
- [ ] Firefox
- [ ] Safari
- [ ] Other:
Used versions
- Device you are using:
- Operating system:
- PHP version:
- WordPress version:
- WordPress Theme:
- Yoast SEO version:
- Gutenberg plugin version:
- Elementor plugin version:
- Classic Editor plugin version:
- Relevant plugins in case of a bug:
We can't reproduce this ticket and looks like it's some local customer problem. For now I'm closing this ticket.
I am getting this same error. Yoast and WP are up to date. I cleared browser data. I uninstalled then re-installed Yoast. These did not help.
Thanks for the report @sdgh832. With most other users, this turned out to be a caching issue (that's why we were not able to reproduce it locally). Can you please see if one of the following things resolve your issue:
- Refresh the page where you see this error using a cache refresh (reload the current page, ignoring cached content,
Shift + F5orCtrl + Shift + rin Chrome) - Change your theme to one of the WordPress default themes and then change back to your current theme.
- Use the Yoast Test Helper plugin to reset your indexables.
Thanks already for reporting back to us!
Related: https://github.com/Yoast/wordpress-seo/issues/21542
Additional outcome counts
8 Unknown 7 Resolved, clear cache 2 Pending, Theme conflict 1 Pending, Outdated WordPress
Hi,
I'm experiencing this same issue on a clients website and have tried many of the solutions listed above to fix it with no joy. So the things I have tried are:
- Clearing browser cache and Autoptimize cache.
- Disabling Autoptimize plugin.
- Rolling back Yoast from V23.3 to V22.8.
- Updating Yoast back to V23.3.
- Disabling Yoast, then activating it again.
- Changing the theme to a default theme.
- Changing the theme back to the custom theme.
- Installing the Yoast Test Helper plugin and resetting the indexables.
The error is being experienced by 3 different users in 3 different physical locations.
This is the info listed in the console: react-dom.min.js?ver=18.3.1:2 TypeError: o is not a function at externals-components.js?ver=f0418c0daafb7e79a2e2:188:6884 at data.min.js?ver=7c62e39de0308c73d50c:9:3303 at data.min.js?ver=7c62e39de0308c73d50c:9:2045 at __unstableMarkListeningStores (data.min.js?ver=7c62e39de0308c73d50c:2:22094) at Object.__unstableMarkListeningStores (data.min.js?ver=7c62e39de0308c73d50c:2:22352) at p (data.min.js?ver=7c62e39de0308c73d50c:9:2010) at data.min.js?ver=7c62e39de0308c73d50c:9:2612 at Qe (data.min.js?ver=7c62e39de0308c73d50c:9:2824) at Ye (data.min.js?ver=7c62e39de0308c73d50c:9:3141) at data.min.js?ver=7c62e39de0308c73d50c:9:3292
Any ideas of other solutions to try?
Thanks, Dave
@redevodm Please contact our support team saying that I asked you to contact the support team regarding the o is not a function issue (include link to this issue).
@amboutwe I have contacted Livechat but they said they couldn't help since we don't have a premium subscription, so I've sent an email to support@ instead. Thanks for your help so far with this issue.
https://wordpress.org/support/topic/something-went-wrong-an-unexpected-error-occurred-2/
at __unstableMarkListeningStores (data.min.js:2:22094)
__unstableMarkListeningStores: function(e, t) { o = new Set; try { return e.call(this) }Newer browsers are expecting it to look like
new Set();
The core file (data.min.js) is minified JavaScript and using this tool shows the minified version of data.js should be o = new Set;. Minifying the code manually with the tool confirms the output matches the minified version in the core code.
(cross-posting my reply below)
Thanks for the investigation! However, that code snippet is from WordPress core (well, Gutenberg to be precise) : https://github.com/WordPress/gutenberg/blob/trunk/packages/data/src/registry.js#L121 -- and there the call to new Set() is correct, so I do not think that is the problem. From the video above, I'm mostly interested in what the externals-components.js call refers to. Thanks in advance!
Please inform the customer of conversation # 1169184 when this conversation has been closed.
Please inform the customer of conversation # 1170014 when this conversation has been closed.
Closing as no recent reports and no follow-up. Feel free to open a new issue with more information.