Hello, I am testing this module with Drupal 7 and Domain Access module.
To switch my site from holding, I am clearing the 'Holding sites' text box. Once I do my site loads fine, but with the following error:
Notice: Undefined index: argc in holding_boot() (line 32 of C:\xampp\htdocs\sites\all\modules\holding\holding.module).
To work around, I disable the module completely and re-enable as needed. As a feature it would be nice to have a basic switch 'on' or 'off' setting?
Cheers for the work on this!
Tim
Comments
Comment #1
joachim commented> As a feature it would be nice to have a basic switch 'on' or 'off' setting?
That's on the modules page ;)
Comment #2
Tim Jones Toronto commentedOK.
What was the problem with Undefined index: argc in holding_boot() ?
Comment #3
joachim commentedWere you getting that only when trying to clear the holding sites setting?
Comment #4
Tim Jones Toronto commentedOn first install of the module I didn't check the site as I went straight to the holding admin page to enter into holding mode.
On entering 'default' it works fine for a holding site.
To enable the sites (off hold), I cleared the box and site gives error I reported.
Today with more time I did a quick debug:
php_sapi_name() is ‘apache2handler’
$_SERVER['argc'] is NOT set.
Would this new API function be more helpful for version 7 (with isset part)?:
drupal_is_cli:
http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/drupal...
Thanks.
Comment #5
joachim commentedOh yes, that would be rather handy! Thanks for the tip, I didn't know about that one :D
Can you try this patch and see if it fixes the error message?
Comment #6
Tim Jones Toronto commentedHi,
Yes, meant to add this to you earlier - just wanted to double check with you suitability on D7 function :)
Patch works fine with my configuration; however I do not have Drush to 'Allow drush through' and test.
The problem does seem fixed with !isset logic added in the D7 API function.
Thanks for this module!
Tim
Comment #7
joachim commentedOk will give it a spin with drush when I have time.
Thanks for testing it :)
Comment #8
joachim commentedJust got round to trying this for myself, and I can't reproduce your error message at all -- you're not on some wacky webserver like IIS are you?
Comment #9
Tim Jones Toronto commentedIIS works fine ;) and am using latest 'wacky' Apache server to get error ... :P
Being serious, maybe something in XAMPP configuration - not sure.
Anyway, the '!isset($_SERVER['SERVER_SOFTWARE'])' in the D7 API function logic fixes. You could double-check over at the Drush group etc.
Comment #10
joachim commentedI'm not convinced this works:
|| (is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0))
On a web page I am seeing $_SERVER['argc'] set to 1.