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

relaxy’s picture

Assigned: relaxy » Unassigned
dave_______1’s picture

Got this too.
Uninstalled the Consistent Language Block and the update.php worked!

mvc’s picture

I 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).

mvc’s picture

Issue summary: View changes

error = bug