Fix “getPostType is not a function” in Yoast SEO

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:

  • Yoast AI is active and its code runs even on classic editors or page builders.
  • Gutenberg is disabled site wide, but Yoast still loads block editor bundles.
  • A theme or builder update changed how the editor is loaded.
  • A recent Yoast update introduced a bug for some setups, and rolling back removes it.

You can usually get things working again with a mix of:

  • Updating Yoast and WordPress.
  • Turning off Yoast AI features.
  • Checking whether this post type is using the block editor or not.
  • Running a conflict test and, if needed, rolling back Yoast as a temporary workaround.

Let us take it step by step.

Something went wrong.
An unexpected error occurred.
(0 , t.select)(...).getPostType is not a function

Why this error shows up

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:

  • The block editor script store is present.
  • The store exposes a getPostType function.

On many affected sites at least one of these is false. Examples:

  • The Classic Editor plugin or a builder like WPBakery disables Gutenberg, but Yoast still loads its block editor app. So getPostType is missing.
  • A recent Yoast update changed how its scripts load and they now run on screens where Gutenberg is not available.
  • Yoast AI features hook deeper into the editor and increase the chance of these conflicts, especially while still in beta.

The result is always the same. The Yoast panel fails and you see “Something went wrong” instead of the SEO fields.

Step 1: Update Yoast SEO and WordPress

Because this is a moving target, first make sure you are not stuck on a buggy combo.

  1. In wp admin go to Dashboard → Updates.
  2. Update WordPress to the latest stable version.
  3. Update Yoast SEO to the latest version.
  4. Update your theme and any page builders.

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.

Step 2: Turn off Yoast AI features

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.

  1. In wp admin go to SEO → Settings.
  2. Click General.
  3. Click Site features.
  4. Find the Yoast AI or AI analysis options.
  5. Toggle them off.
  6. Scroll down and click Save changes.
  7. Clear any cache plugin and browser cache.
  8. Open an existing post in the editor and wait for the Yoast panel.

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.

Step 3: Check which editor this post type uses

The error often appears on:

  • Sites that use a classic theme plus ACF.
  • Page builder setups where Gutenberg is disabled for that post type.
  • WooCommerce products edited completely in a builder or custom screen.

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.

Option A: Use the block editor for this post type

If you are comfortable moving this content type back to the block editor:

  1. Go to Settings → Writing or the settings for the Classic Editor plugin if you use it.
  2. Set the default editor to Block editor.
  3. If there is a per post type setting, make sure the affected type (posts, pages, products) uses the block editor.
  4. Save changes.
  5. Open one of the affected posts in the block editor and check the Yoast panel.

On many sites the error disappears once the editor and Yoast expect the same environment.

Option B: Stay on Classic or a builder and use a workaround

If you must stay on Classic Editor or a builder:

  • Keep Yoast AI turned off for now.
  • Make sure Yoast is updated to the latest version.
  • If the error persists in the classic editor but not in the block editor, note that detail for support.

You can also use the temporary rollback described below while you wait for an upstream fix.

Step 4: Run a conflict check

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.

Use Health Check troubleshooting mode

  1. Install and activate the Health Check & Troubleshooting plugin from the official repository.
  2. Go to Tools → Site Health → Troubleshooting.
  3. Click Enable Troubleshooting Mode.
  4. In the top admin bar, enable only:
    • Your current theme or a default theme like Twenty Twenty Four.
    • Yoast SEO.
  5. Open the edit screen where you normally see the error.

Now check:

  • If the Yoast panel works with only Yoast active, then another plugin or your theme is part of the conflict.
  • Turn other plugins on one by one in troubleshooting mode and reload the editor each time until the error returns.

When the error comes back you have found your conflicting plugin or theme.

You can then:

  • Leave that plugin off until there is a fix.
  • Contact its support with your notes and the exact error text.
  • Share that same information with Yoast support.

When finished, exit troubleshooting mode so your live site returns to normal.

Step 5: If it started after a theme or builder update

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:

  1. Check the change logs for your theme or builder for any notes about the editor or Yoast.
  2. Update to the latest patch version if one is available.
  3. If the error started exactly after a specific update and no patch exists, consider:
    • Rolling back the builder by one version using its own rollback tools.
    • Testing Yoast on a simple draft page that uses only the default editor.

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.

Step 6: Temporary workaround by rolling back Yoast

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:

  • You are waiting for an official fix.
  • You understand that older versions may miss security patches.

If you still want to try it:

  1. Make a full site backup.
  2. Install a rollback helper plugin such as WP Rollback, or download the older Yoast version zip from the official plugin page.
  3. Use the helper to select the previous known good Yoast version for your site, or upload that zip over the current plugin.
  4. Open the post editor again and test the Yoast panel.

If the error disappears after rollback:

  • Note your WordPress version, the working Yoast version, your theme, and key plugins.
  • Keep an eye on Yoast release notes for mentions of editor JavaScript fixes.
  • Test newer versions on a staging site before updating live.

Step 7: What to send to Yoast or your developer

If the problem persists, good information speeds up a fix.

Gather:

  • The exact text Yoast shows in the UI, including the getPostType is not a function part.
  • A screenshot or copy of the error from the browser console.
  • Your WordPress version.
  • Your Yoast SEO version and whether AI features are on or off.
  • Which editor you are using:
    • Block editor.
    • Classic Editor plugin.
    • Page builder like Elementor or WPBakery.
  • Whether the error happens on:
    • All post types.
    • Only products.
    • Only a specific custom post type.
  • The result of your Health Check conflict test.

Send this to:

  • Yoast support if you have premium, via the support link in the plugin.
  • The plugin or theme support if the conflict points to them.

This gives them everything they need to reproduce your issue and either ship a fix or provide a code level workaround.

Verification checklist

You are in good shape when:

  • The Yoast panel loads in the editor without “Something went wrong”.
  • The browser console no longer shows (0 , t.select)(...).getPostType is not a function.
  • You can edit SEO title, meta description, and social previews normally.
  • Turning Yoast AI back on, if you choose to, does not bring the error back on your tested setup.

Still stuck?

For AI help

Hit Continue Chat below and tell me:

  • Your WordPress and Yoast versions.
  • Which editor you use for the affected content.
  • What you saw when you tried the steps above.
  • A copy of any error lines from your browser console.

I can help you narrow it down and write a clean ticket for Yoast or your theme or builder support.

For expert human help

Scroll down to the contact form below. Enter your name, email, and WordPress needs. Atiba will get back to you as soon as possible.

Need human WordPress help?

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!