This may be really hard to replicate, but here's the scenario.
* I have a feature which has a dependency to page_title.
* I am writing a DrupalWebTestCase which uses the feature.
* I get an ajax error of node_page_title_alter() already having been defined, when I try to run the test.
* The error goes away if I change line 658 in page_title.module to:
include_once DRUPAL_ROOT . "/{$info['path']}/{$module}.page_title.inc";
* I also tested and the error goes away if I rely on the standard static var; which leads me to think there is a problem with drupal_static() OR it is getting reset somewhere in the module, during the test process.
static $runonce = FALSE;
So my conclusion is that something in the test scenario is reseting the static $runonce. Hopefully this report can be of some help.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1800426-page_title_include_once_fix-1.patch | 590 bytes | igor.ro |
error.png | 155.68 KB | aklump |
Comments
Comment #1
igor.ro CreditAttribution: igor.ro commentedHave the same problem
It is easy to reproduce by running tests with simple test clone module
Here is patch