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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

znerol’s picture

How about just inlining node_tag_new? Patch attached.

simg’s picture

Status: Needs review » Closed (fixed)

patch applied to dev

simg’s picture

Status: Closed (fixed) » Needs review

not keen on inlining node_tag_new for obvious reasons but it is a pragmatic solution.

I've applied the patch to dev for now

znerol’s picture

Status: Needs review » Closed (fixed)

Fixed in 7.x-1.1

znerol’s picture

Issue summary: View changes

Fix markup