Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error “o is not a function” in v23.2 #21526

Open
9 tasks
marinakoleva opened this issue Aug 12, 2024 · 11 comments
Open
9 tasks

Error “o is not a function” in v23.2 #21526

marinakoleva opened this issue Aug 12, 2024 · 11 comments
Labels

Comments

@marinakoleva
Copy link
Contributor

Please give us a description of what happened

  • Support have been getting reports for a bug where the error o is not a function appears 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

  1. 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:
@mykola mykola self-assigned this Aug 12, 2024
@mykola
Copy link
Contributor

mykola commented Aug 14, 2024

We can't reproduce this ticket and looks like it's some local customer problem. For now I'm closing this ticket.

@sdgh832
Copy link

sdgh832 commented Aug 15, 2024

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.
yoast post

@marinakoleva marinakoleva reopened this Aug 19, 2024
@mhkuu
Copy link
Contributor

mhkuu commented Aug 19, 2024

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 + F5 or Ctrl + Shift + r in 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!

@amboutwe
Copy link
Member

amboutwe commented Aug 19, 2024

Related: #21542

Additional outcome counts

8 Unknown
7 Resolved, clear cache
2 Pending, Theme conflict
1 Pending, Outdated WordPress

@redevodm
Copy link

redevodm commented Aug 20, 2024

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

@mhkuu mhkuu added the IM label Aug 20, 2024
@amboutwe
Copy link
Member

@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).

@redevodm
Copy link

@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.

@amboutwe
Copy link
Member

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.

@mhkuu
Copy link
Contributor

mhkuu commented Aug 28, 2024

(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!

@amboutwe
Copy link
Member

Please inform the customer of conversation # 1169184 when this conversation has been closed.

@VictoriaMcCarter
Copy link

Please inform the customer of conversation # 1170014 when this conversation has been closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants