Closed (outdated)
Project:
Drupal core
Version:
6.16
Component:
statistics.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Mar 2010 at 07:31 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gaellafond commentedI tried to look for a solution, but I can't find one. Now, the "deactivating - activating the View module" bug is gone (it was a bug with the cache I guess), but I still have a bug with the SimpleTest module.
In attachment:
with-access-log.png: SimpleTest run on itself, with "Enable access log" set to "Enabled" => Fatal error
without-access-log.png: SimpleTest run on itself, with "Enable access log" set to "Disabled" => Pass successfully
NOTE: If I deactivate the Views module and run a test with Access Log activated, I have no error.
I can reproduce this bug in all my Drupal installations. Maybe it's due to the extra DB call made by the access log module:
[...] Enabling the log adds one database call per page displayed by Drupal [...]
[http://drupal.org/handbook/modules/statistics]
Comment #2
gaellafond commentedSame error with last version of Views
I upgrade the module Views from 6.x-2.8 to 6.x-2.10 and now, when I run a test with access log enabled, I have a more descriptive error message:
The error occur when the method "override_option()" is called:
The method $view->new_display() return a null value... Since I'm running a test, the view do not have to display anything. Maybe there is no display at all it that case...
I added a few block to check if the handler is null in the views_default.inc:
and ended with the exact same error as before (view.inc on line 372).
Comment #3
gaellafond commentedSeems to be a Bug in SimpleTest...
Environment:
OS: Ubuntu
DB: MySQL
PHP: 5.2.10-2ubuntu6.4
Drupal Core: 6.16
SimpleTest: 6.x-2.10
Views: 6.x-2.10
Just tell me if you need any more information.
Comment #4
gaellafond commentedBug cause:
I discover the real cause of the bug.
I think the workflow is pretty close to the following: When access log is enable, it log all page access by the Web site, including the pages requested during the tests. Access log is using Views when Views is enabled. When the test initialised, it request a page (using Ajax I guess, to run the test as a separate process), but Access Log is not able to log the page access because the Views module is not initialised in the context of the test. The error do not occur it the module Views is enabled in the test.
This result in a error that makes all tests to fail.
If
I disable Access Log from Administer > Reports > Access log settings
OR
I disable Views module
OR
I add Views on the test setUp function,
the test execute nicely.
I guess it's a Bug in access log after all.