Active
Project:
Consistent Language Interface
Version:
6.x-3.7
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2011 at 20:12 UTC
Updated:
14 Nov 2012 at 22:56 UTC
It's not possible to call the update.php or cron.php after the module activation.
It seems to be a critical bug that should be fixed as soon as possible.
I've inserted the following code to help myself with this issue:
if (variable_get('language_redirect', 0) == 1) {
+$script_name = $_SERVER['REQUEST_URI'];
+if (strpos($script_name, "update.php") !== FALSE || strpos($script_name, "cron.php") !== FALSE) {
+ return;
+ }
Comments
Comment #1
relaxy commentedComment #2
dave_______1 commentedGot this too.
Uninstalled the Consistent Language Block and the update.php worked!
Comment #3
mvcI believe this is happening because this code uses $_SERVER without checking php_sapi_name(). Because this happens at bootstrap in languageinterface.module in code that isn't wrapped in hook_init() or hook_boot(), this breaks CLI operations on sites with this module, notably via drush. I know you have your reasons for placing code here which isn't wrapped inside a function, but you'll need to be much more careful.
To see what I mean, try to run the command "drush st" using drush 5.x on any site with this module enabled. You'll get the following error:
aegir@ceres:.../drupal-6-2012.11.01-production/sites/www.SITENAME.org% drush st
WD php: Notice: Undefined index: HTTP_REFERER in include_once() (line 13 of /srv/aegir/platforms/drupal-6-2012.11.01-production/sites/all/modules/contrib/languageinterface/languageinterface.module).
WD php: Notice: Undefined index: QUERY_STRING in include_once() (line 17 of /srv/aegir/platforms/drupal-6-2012.11.01-production/sites/all/modules/contrib/languageinterface/languageinterface.module).
WD php: Notice: Undefined variable: _SESSION in include_once() (line 19 of /srv/aegir/platforms/drupal-6-2012.11.01-production/sites/all/modules/contrib/languageinterface/languageinterface.module).
WD php: Notice: Undefined variable: _SESSION in include_once() (line 28 of /srv/aegir/platforms/drupal-6-2012.11.01-production/sites/all/modules/contrib/languageinterface/languageinterface.module).
Comment #3.0
mvcerror = bug