Seeing Yoast SEO show “Something went wrong. An unexpected error occurred” and a console error like (0 , t.select)(...).getPostType is not a function?
That message means the Yoast JavaScript app for the editor crashed before it could load the meta box. Recent reports link this to the Yoast AI feature, Gutenberg code loading on classic or builder editors, and version specific bugs in Yoast SEO.
Below is a practical path you can follow yourself or hand to your developer or host.
Yoast SEO is broken in the editor. I see:
Something went wrong.
An unexpected error occurred.
We’re very sorry, but it seems like the following error has interrupted our application:
(0 , t.select)(…).getPostType is not a function
How do I fix this so the Yoast meta box works again?
Short version
The Yoast panel for the editor is crashing.
Its script expects a Gutenberg function named getPostType to exist. On your screen it does not, so the app throws a JavaScript error and stops.
Common patterns in recent reports:
You can usually get things working again with a mix of:
Let us take it step by step.
Something went wrong.
An unexpected error occurred.
(0 , t.select)(...).getPostType is not a function
Inside the editor, Yoast uses the WordPress data store to ask the editor what it is working on.
In code this looks like:
wp.data.select( 'core/editor' ).getPostType()
That works only if:
getPostType function.On many affected sites at least one of these is false. Examples:
getPostType is missing.The result is always the same. The Yoast panel fails and you see “Something went wrong” instead of the SEO fields.
Because this is a moving target, first make sure you are not stuck on a buggy combo.
Yoast has shipped fixes for several editor side JavaScript errors in past releases. In some cases, simply updating to a newer Yoast removed the “getPostType is not a function” error.
After updates, hard reload the edit screen in your browser and see if the error is gone.
If it is still there, continue.
The Yoast AI feature is a common trigger on sites that use Classic Editor or page builders. The AI code expects a modern block editor environment. On setups that disable Gutenberg, it can hit missing functions like getPostType.
Try turning AI off first. It is quick and low risk.
If the panel now loads without “Something went wrong” you have confirmed the AI feature was involved.
You can leave it off until Yoast ships a fix for your exact setup. Or you can try turning it on only after other updates and conflict checks are done.
The error often appears on:
Yoast is then trying to talk to the block editor store on a screen that is not really the block editor.
You have two main choices.
If you are comfortable moving this content type back to the block editor:
On many sites the error disappears once the editor and Yoast expect the same environment.
If you must stay on Classic Editor or a builder:
You can also use the temporary rollback described below while you wait for an upstream fix.
Even if AI and editor type look fine, another plugin or theme can still be involved.
The safest way to test is with the free Health Check & Troubleshooting plugin, which lets you switch themes and plugins only for your user session.
Now check:
When the error comes back you have found your conflicting plugin or theme.
You can then:
When finished, exit troubleshooting mode so your live site returns to normal.
This error often shows up right after an update to a theme or a builder like Elementor or WPBakery, especially on WooCommerce products.
If the timing matches for you:
If Yoast works on a plain block editor page but fails in the builder, capture console logs and send them to the builder support and Yoast support. Include the full text of the getPostType error.
In some setups the error goes away as soon as you roll Yoast back to an earlier version. That confirms a new bug in later versions for that specific stack.
Rolling back is a temporary workaround. It is best used only while:
If you still want to try it:
If the error disappears after rollback:
If the problem persists, good information speeds up a fix.
Gather:
getPostType is not a function part.Send this to:
This gives them everything they need to reproduce your issue and either ship a fix or provide a code level workaround.
You are in good shape when:
(0 , t.select)(...).getPostType is not a function.Hit Continue Chat below and tell me:
I can help you narrow it down and write a clean ticket for Yoast or your theme or builder support.
Scroll down to the contact form below. Enter your name, email, and WordPress needs. Atiba will get back to you as soon as possible.
WP Assistant is a free tool created by Atiba Software, a WordPress design and development company located in Nashville, TN. If you need more personalized WordPress assistance let us know, and we’ll get back to you ASAP!