Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Visiting a node produces the following stack trace in my server log when authcache 7.x-dev is serving pages from cache:
PHP Fatal error: Class name must be a valid object or a string in includes/common.inc on line 7749
PHP Stack trace:
PHP 1. {main}() index.php:0
PHP 2. drupal_bootstrap() index.php:20
PHP 3. _drupal_bootstrap_page_cache() includes/bootstrap.inc:2172
PHP 4. require_once() includes/bootstrap.inc:2294
PHP 5. require_once() sites/all/modules/authcache/authcache.inc:18
PHP 6. _authcache_node_history() sites/all/modules/authcache/ajax/authcache.php:69
PHP 7. node_load() sites/all/modules/authcache/ajax/authcache.php:139
PHP 8. node_load_multiple() modules/node/node.module:928
PHP 9. entity_load() modules/node/node.module:909
PHP 10. entity_get_controller() includes/common.inc:7716
It is clearly triggered in the AJAX phase when node_history
option is set. I figured that this is caused by drupal not being fully bootstraped at this stage, so I just replaced the include_once
calls on top of the function with drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
.
However that solution is not very desirable because we want the AJAX phase to remain as lightweight as possible. Any ideas on how to rewrite _authcache_node_history
such that no node_load
is needed?
Comment | File | Size | Author |
---|---|---|---|
#1 | 0001-Issue-1881982-by-znerol-Fix-fatal-error-in-_authcach.patch | 1.5 KB | znerol |
Comments
Comment #1
znerol CreditAttribution: znerol commentedHow about just inlining
node_tag_new
? Patch attached.Comment #2
simg CreditAttribution: simg commentedpatch applied to dev
Comment #3
simg CreditAttribution: simg commentednot keen on inlining node_tag_new for obvious reasons but it is a pragmatic solution.
I've applied the patch to dev for now
Comment #4
znerol CreditAttribution: znerol commentedFixed in 7.x-1.1
Comment #4.0
znerol CreditAttribution: znerol commentedFix markup