Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I went to enable the following Authcache modules at the same time:
Authcache
Authcache Varnish
Authcache Personalization API
Authcache Debug
Authcache Menu
Authcache Search
After hitting save, the page appeared broken with this error:
AuthcacheP13nObjectFactoryException: Failed to create instance in AuthcacheP13nObjectFactory->get() (line 142 of /sandbox/d7/all/modules/contrib/authcache/modules/authcache_p13n/includes/AuthcacheP13nObjectFactory.inc).
I flushed the cache and things seemed fine so I continued on and configured Authcache. It seemed to be working correctly. I then went back to enable Authcache Form, and got the same error when saving the modules page. Thanks in advance.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2096967-new-instance.diff | 862 bytes | znerol |
Comments
Comment #1
znerol CreditAttribution: znerol commentedThanks for the report. Is there anything special about your installation? I quickly tried to reproduce this with a fresh drupal but it I runs smooth over here.
Would it be possible for you to enable xdebug on your site in order to gather a stack-trace? That might help me to track down the failure mode.
Comment #2
vinmassaro CreditAttribution: vinmassaro commentedHmm, I've been testing Authcache so far on my laptop under MAMP without this problem. I was attempting to configure this on our university development environment and ran into this error. When I restore a Drush archive of the site in this state to my laptop, I can't reproduce the error when enabling/disabling modules. Is it possible there is a system level requirement we're missing in order for code to run correctly for AuthcacheP13n?
Comment #3
znerol CreditAttribution: znerol commentedNot that I know. The test suite runs without problems on the drupal.org QA infrastructure. I think they are using PHP 5.3. I'm using 5.4 on my laptop.
Comment #4
vinmassaro CreditAttribution: vinmassaro commentedThe environment I get the error on is running PHP 5.3.3 with APC.
I just disabled all Authcache modules and uninstalled them. I then enabled them one at a time in this order.
Authcache
Authcache Varnish
Authcache Personalization API
No errors up to this point. I then enabled Authcache Debug and got the same error again.
Comment #5
znerol CreditAttribution: znerol commentedUgh, 5.3.3 is pretty old. I try to speculate what happens: On line 139 in modules/authcache_p13n/includes/AuthcacheP13nObjectFactory.inc we try to instantiate AuthcacheDebugInfoSetting using
ReflectionClass::newInstanceArgs()
. However that does not work due to PHP bug #52854 because AuthcacheDebugInfoSetting does not have a constructor. If this hypothesis is correct, then it would help when you add an empty constructor to AuthcacheDebugInfoSetting:Does the error go away when you add an empty constructor to AuthcacheDebugInfoSetting?
Comment #6
znerol CreditAttribution: znerol commentedPossibly we could work around this problem in the factory class (see patch). I did not test this (other than the syntax), let's see whether the test bot likes it.
Comment #7
vinmassaro CreditAttribution: vinmassaro commentedYes, Redhat Enterprise Linux runs 5.3.3 :(
I've added your suggestion in #5 and waiting for a build to deploy now.
Comment #8
vinmassaro CreditAttribution: vinmassaro commentedI added your suggestion in in #5 so AuthcacheDebugInfoSetting looks like this. Is this right?
I still get the error when enabling Authcache Debug. Going to try your patch in #6.
Comment #9
vinmassaro CreditAttribution: vinmassaro commentedI applied the patch in #6 and I can enable Authcache Debug without getting the error now.
Comment #10
znerol CreditAttribution: znerol commentedOk, thanks for the testing. I'll include the patch in an upcoming release.
Comment #11
znerol CreditAttribution: znerol commentedCommitted: 69375f6