When loading admin/config you get the error Warning: usort(): Array was modified by the user comparison function in system_status() (Line 2240 in /srv/www/htdocs/modules/system/system.admin.inc).
After a bit of research I found someone explaining why this happens in post #5 in this thread:
http://drupal.org/node/933684
So piwik creates $requirements['http requests'] = array( ... ) but the http requests is used otherwise already by Drupal itself. A simple fix would be to move the http requests into piwiks name space like this:
$requirements['piwik http requests'] = array( ... ). Unfortunately I have absolutely no idea about Drupal module development and cannot provide an idea on how to fix this in the code :(
Comment | File | Size | Author |
---|---|---|---|
#3 | 1271780-piwik-remove-http-check-2.patch | 1.42 KB | acbramley |
#1 | 1271780-piwik-remove-http-check.patch | 1.12 KB | acbramley |
Comments
Comment #1
acbramley CreditAttribution: acbramley commentedYou are correct. It's caused by the fact that piwik does exactly the same check and set in hook_requirements that the system module does:
This needs to be removed as it causes two things:
a) It causes these errors on the main configuration page and status pages:
b) It causes the HTTP Request requirements warning to have "Array" as the title, warning, and description.
There's no point in having the exact same check in 2 modules, especially since it's causing these bugs.
Here's a patch that removes this check from piwik.install
Comment #3
acbramley CreditAttribution: acbramley commentedRolled patch again using:
Comment #4
acbramley CreditAttribution: acbramley commentedComment #5
wiifmWould be keen to get a module maintainer point of view on this issue. I am not too sure that duplicating the core http requirement check is the best way to go here. I think at the very minimum this patch is a step forward.
+1
Comment #6
hass CreditAttribution: hass commented#1165160: Same requirements breaks drupal core status page (overwrites 'http requests')
Comment #7
wiifmSo @hass, you are saying this is a bug in drupal core? It seems to me like the piwik module is at least partially at fault for re-declaring an existing requirements check. Yes drupal core should probably deal with this nicer, no qualms there - but why not change the name of the piwik requirement to be 'piwik http request' ?
Comment #8
hass CreditAttribution: hass commentedYes, core need to be fixed. The reason is that I'm doing this check in 2 modules + 1 core. This makes 3 times the same EXPENSIVE check with the same result. Core need to merge the array per key and make one check only, and as the check is all times 100% the same - the result is also the same and can be shared between all modules without running the same check 3 times.
You need to see this in a bigger picture... e.g. 30 modules need to verify if they are able to issue HTTP requests with drupal_http_request(). This will timeout the page load. If the check is done only once, there is no problem. This may counts only for expensive checks, but as we do have them we need to solve this. This was never a problem in D6. So it's a D7+ bug.