Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Error: views_plugin_display::destroy() [views-plugin-display.destroy]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "authcache_views_plugin_display_extender" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition (line 272 of ../sites/all/modules/views/plugins/views_plugin_display.inc).
I can not flush the cache at the moment.
Comments
Comment #1
znerol CreditAttribution: znerol commentedI believe this could be a bug in views (see #2040281: Views PHP Fatal error: view::destroy() on cache clear when autoload enabled). In order to work around this issue either incorporate the changes proposed in the linked issue into your views module or just make sure that the
authcache_views_plugin_display_extender
class is available while you are trying to clear the cache. You may enforce that by including the authcache_views_plugin_display_extender.inc from withinsettings.php
using the following line:Then you should be able to clear caches and afterwards you may remove the line again.
Comment #2
funature CreditAttribution: funature commentedas you suggest I add these two lines to settings.php, but it says this file can not be found
Comment #3
znerol CreditAttribution: znerol commentedThe file authcache_views_plugin_display_extender.inc is shipped with authcache. Therefore make sure that authcache is installed properly (you do not need to enable it, just make sure it is there). As an alternative you also may just download the file and place it into your drupal root directory. Then include it like this:
Comment #4
funature CreditAttribution: funature commentedboth methods give me the message
Fatal error: Class 'views_plugin_display_extender' not found in ../sites/all/modules/authcache/modules/authcache_views/views/authcache_views_plugin_display_extender.inc on line 16
My question is why is the function of Authcache still called even if I disabled them, can I get it work again if I clean some table in database? If yes, how?
Comment #5
funature CreditAttribution: funature commentedafter I clean the "cache_views" table in database manually, now I can flush the cache again. Is that possible to make this happen after "authcache_views" module is disabled? I mean with some new function in this module, like:
Comment #6
funature CreditAttribution: funature commentedComment #7
znerol CreditAttribution: znerol commentedActually I tried to reproduce this issue but over here disabling Authcache Views does not lead to this behavior. I think that the Views API is properly implemented in Authcache Views and it is certainly not the responsibility of Authcache to mess with the Views Cache.
Thanks anyway for the report. If this problem should crop up repeatedly people will hopefully find this issue and may reopen it if necessary.
Comment #8
StryKaizerSame issue here.
Truncating cache_views fixed the error for me.
Comment #9
dibyadel CreditAttribution: dibyadel commentedthanks alot. It worked for me
Comment #10
znerol CreditAttribution: znerol commentedI am trying to reproduce this to no avail. If anyone hits this again, then please provide a proper backtrace such that I can understand what is going on. Also try to describe the steps on how to reproduce the bug exactly, give information about the combination of modules, the PHP version, etc.
As per #1 I still believe this is a bug in views and not in authcache.
Please understand that the solution in #5 is not working for non-database caches and therefore cannot be included as is in Authcache Views.
Comment #11
cthshabel CreditAttribution: cthshabel commentedWell, I had this issue occur on 4 separate servers that I use. Same error with flushing caches every time after disabling "Authcache Views" specifically.
Steps to reproduce:
1. Enable Authcache Views (and required modules)
2. Flush caches
3. Disable only Authcache Views
4. Error
5. Refresh Page
6. Flush caches
7. Error
Solution: truncate Views Cache table in database resolved things.
Thanks everyone.
Comment #12
znerol CreditAttribution: znerol commented@cthshabel: There is a patch in #2040281: Views PHP Fatal error: view::destroy() on cache clear when autoload enabled. Does it resolve this issue for you?
Comment #13
cthshabel CreditAttribution: cthshabel commentedznerol, I assume that patch is also compatible with 7.x? It references 6.x there?
I have resolved the issue by truncating the tables, but for the sake of confirming a solution, let me repeat the steps to get the error and I will test with that patch if it is compatible with 7.x.
Comment #14
cthshabel CreditAttribution: cthshabel commented@znerol,
this did not resolve the problem. i had to still rely on truncating views cache to clear the errors and fix drush cc
Comment #15
znerol CreditAttribution: znerol commentedOk, can you give me clear step by step instructions on how to reproduce that? #11 does in fact not expose the problem for me when starting from a fresh drupal install.
Comment #16
jprstoney CreditAttribution: jprstoney commentedClearing the views cache in the database works for me. I have to clear it before disabling any module it seems. As long as I do that, I get no errors.
Comment #17
znerol CreditAttribution: znerol commentedViews patch referenced in #12 just got committed. This is now part of the views 7.x-3.x-dev and will be included in the next stable release (likely 7.x-3.12).
Comment #19
vadym.kononenko CreditAttribution: vadym.kononenko commentedhttps://www.drupal.org/commitlog/commit/1174/7fb3fd65f1dec47c15bee0bd6c5... - June 25, 2015 9:26 - Commit 7fb3fd6 on 6.x-3.x
https://www.drupal.org/commitlog/commit/1174/8c7e365739e480a44889e862ffa... - June 25, 2015 12:28 - Commit 8c7e365 on 6.x-2.x
You are wrong. It was commited into 6.x branches only.
Comment #20
znerol CreditAttribution: znerol commentedI cannot do anything about that in Authcache, thus closing this issue.