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

Class __PHP_Incomplete_Class has no unserializer #4571

Closed
mobius888 opened this issue May 17, 2016 · 15 comments

Comments

Projects
None yet
9 participants
@mobius888
Copy link

commented May 17, 2016

i updated to the latest version of WordPress and got the following error -

Warning: Class __PHP_Incomplete_Class has no unserializer in /home/content/p3pnexwpnas14_data02/95/3039995/html/wp-content/object-cache.php on line 520

wtpartnership.com.au

the problem was only occuring one www verion of the site not the non-www

When we deactivated Yoast the error stopped appearing .. we have seen this fix the error for quite a number of people -however i still want to use Yoast rather find another plugin.

this site is being run under managed wordpress hosing with Media Temple.

Technical info

  • WordPress version: 4.5.2
  • Yoast SEO version: 3.2.5

From one of the WP engineers:

"This is caused by a plugin storing an instance of a class into Memcache
(or the database) either via transients, options, usermeta, postmeta, etc.

When the value is retrieved from the cache, and the class is no longer
loaded in WordPress at that time, it'll trigger this PHP warning. The
class may no longer exist as either the plugin hasn't loaded it, or the
plugin has been disabled.

It's not a bug in WordPress as such, but rather in whatever is storing the
value into Memcache. In order to diagnose it, you'd need to see the raw data being retrieved from Memcache, look at the classname and dig into what plugin is causing it. It appears to be a bug in a plugin."

@Rarst

This comment has been minimized.

Copy link
Contributor

commented May 17, 2016

So I think this is related to the new sitemap cache implementation, but I only seen it once myself and it disappeared immediately from cache flush. I don't have a good guess on what possibly causes it.

I am familiar with issue in general, but since we autoload all classes in plugin it would be very strange for any of them to be unavailable.

the problem was only occuring one www verion of the site not the non-www

Could you please elaborate about your setup? Do you serve site on two different URLs?

@Rarst Rarst changed the title Managed Wordpress Class __PHP_Incomplete_Class has no unserializer May 17, 2016

@iamazik

This comment has been minimized.

Copy link
Member

commented May 20, 2016

There are a solution and more details information on this thread about this issue: https://wordpress.org/support/topic/error-warning-class-_php_incomplete_class-has-no-unserializer

@Rarst

This comment has been minimized.

Copy link
Contributor

commented May 23, 2016

Unfortunately no closer on how to reproduce it exactly. A little suspicious that a lot of people connect it with GoDadday caching implementation. but might be coincidental because they host a lot of people.

@Rarst Rarst removed the wait for feedback label Jun 6, 2016

@IgorCode

This comment has been minimized.

Copy link

commented Jul 8, 2016

I can tell you an easy way to reproduce one of scenarios where this errors appears:

  1. Make sure Yoast XML sitemaps are activated and that Yoast transients are in database
  2. Download Search and Replace script (https://interconnectit.com/products/search-and-replace-for-wordpress-databases/)
  3. Use dry run and errors will popup

We are using this tool for deploying from staging to live website, and as you can imagine it's not working anymore.

@Rarst

This comment has been minimized.

Copy link
Contributor

commented Jul 8, 2016

I am familiar with the tool, could you be more specific which command you run that causes the issue? Dry run by definition should perform no changes to database.

Or do you mean you get the error while using the tool?

@IgorCode

This comment has been minimized.

Copy link

commented Jul 8, 2016

I mentioned dry run just because it's quickest way to get this error and it's easy to test because it doesn't save changes in database. It will still load serialized string and fail with replace action because it triggers Class __PHP_Incomplete_Class has no unserializer error as you can see in this screenshots:

dry-run
list

@Rarst

This comment has been minimized.

Copy link
Contributor

commented Jul 8, 2016

This sort of make sense, since it's acting from a different runtime environment...

I am getting not too happy about this whole storing serialized object instance thing. Will ponder getting rid of it in favor of more storage-friendly implementation.

@vielhuber

This comment has been minimized.

Copy link

commented Mar 23, 2017

Any update on this? Yoast really should not do this runtime based serialization.

@iamazik

This comment has been minimized.

Copy link
Member

commented Mar 24, 2017

@vielhuber This issue is specific to the GoDaddy managed WordPress hosting. If you're running the GoDaddy managed WodPress hosting, please reach out the GoDaddy support and ask them to clear the object caching for you and which should resolve this issue.

@vielhuber

This comment has been minimized.

Copy link

commented Mar 24, 2017

@iamzik Thanks for your answer.
I don't use GoDaddy. And this has nothing to do with GoDaddy.
The issue is that Yoast serializes classes that are only available at runtime or under certail circumstances.
The serialized string practically can't be unserialied elsewhere.
This is a huge design failure.

@codevscolor

This comment has been minimized.

Copy link

commented Apr 4, 2017

For Godaddy Managed wordpress hosting : click on Godaddy -> Flush Cache ( inside wpadmin ).

@HongPong

This comment has been minimized.

Copy link

commented Apr 6, 2017

So just to be clear you can clear this issue by disabling XML sitemaps in Yoast SEO first? That should remove the rows. I think I got around this that way earlier.

@jameslau

This comment has been minimized.

Copy link

commented Apr 6, 2017

Thanks @HongPong! This definitely removed the issue I was seeing during the dry run in Search Replace DB.

Dashboard Controls:
dashboard_controls

Enable/Disable Controls:
enable_disable_controls

@vielhuber

This comment has been minimized.

Copy link

commented Apr 6, 2017

This is just a workaround. Can anybody make a PR to completely prevent those serialized classes? They can simply be avoided.

@moorscode

This comment has been minimized.

Copy link
Member

commented Oct 31, 2018

As we no longer store a class in the database, I'm closing this issue.

@moorscode moorscode closed this Oct 31, 2018

@moorscode moorscode removed the bug label Oct 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.