It's because _element_info returns NULL and drupal_prepare_form() doing: $form += _element_info('form'); (and += working only for the same types).
Problem:
$form += _element_info('form');
want to add new array element and expecting array as result.
Why _element_info returns NULL
function _element_info($type, $refresh = NULL) {
static $cache;
...
if (!isset($cache) || $refresh) {
$cache = array();
foreach (module_implements('elements') as $module) {
$elements = module_invoke($module, 'elements');
if (isset($elements) && is_array($elements)) {
$cache = array_merge_recursive($cache, $elements);
}
...
return $cache[$type];
If none of the modules implement hook_elements, $cache is empty and there is Fatal error.
I'm not sure when exactly does it happen, but it happen especially when static $cache is not defined (could be during shutdown), it's even not initiated so have unknown type.
Comments
Comment #1
kenorb commentedPatch attached.
Comment #2
kenorb commentedRelated topics:
#85900: Can't configure module settings
#124071: Fatal error: Unsupported operand types in /home/a.../public_html/includes/form.inc on line 342
http://drupal.org/node/315481
Comment #3
SoCalCreations commentedI am getting this error on my site when I go to the /user screen to try to log in. The home page is nothing but my offline message and no theme and the "user/1" page is the garland theme with the offline message. I am totally CONFUSED, can any one offer direction?
Thanks in advance
William
Comment #4
kenorb commentedRelated issue: #565968: upgraded and site hosted
Please apply #1 patch and test it.
Or try 2b solution from http://drupal.org/node/482956
Comment #5
SoCalCreations commentedI Don't get it, how is the patch applied, it's not an executable and I am not sure where the code goes, can you be more specific?
I don't see how 2b applies and in any case then next solution down is how I got to this page to ask for help.
UPDATE I did go through and rename each module I had updated by placing an underscore behind the directory name. I then did it to several other modules, but nothing happened to make the following go away.
I keep getting the WSOD with the error, when I go to the login page of /user
Fatal error: Unsupported operand types in /home2/socalcre/public_html/includes/form.inc on line 511
UPDATE I found http://drupal.org/node/332619
However this isn't the issue either, the permissions are correct and the status of the module in the db is also correct according to this article.
Comment #6
kenorb commentedYou can apply patch manually.
Edit file: includes/form.inc in your Drupal dir
and change line as it's with minus, to this with plus as here:
http://drupal.org/files/issues/form_28.patch
It's around 1366 line in form.inc.
Replace:
with:
The error should be fixed.
Comment #7
SoCalCreations commentedKenorb,
I applied the patch as you can see from the attached image, however my site is still not coming up.
http://www.socalcreations.net <- no theme, but offline message
http://www.socalcreations.net/user <- blank screen
http://www.socalcreations.net/user/1 <- themed offline message
Any further ideas?
Thanks for the continued assistance, it is very much appreciated.
Comment #8
kenorb commentedProbably you have some other conflict or problems with your modules.
Please install:
www.drupal.org/project/dtools
And execute .../dtools/wsod/wsod_emergency.php?q=user (followed by correct path of your module dir)
And check what's the message.
Comment #9
SoCalCreations commentedOkay I have done that and I get back something that may mean something to you, but just causes me to raise and eyebrow
hook_exit wasn't executed properly at , possible unexpected exit()/die()
Backtrace:
hook_exit wasn't executed properly at , possible unexpected exit()/die()
Backtrace: wsod_sess_close(:);session_write_close(:);
Got any clue What this means?
I also read that I could edit the "settings.php" file and set the
$update_free_access = FALSE;
TO
$update_free_access = TRUE;
To try to run the update.php, however it seems the update does not execute and the file automatically gets rewritten with the "FALSE" setting AND I still have a WSOD.
Comment #10
kenorb commentedPossible unexpected exit()/die() that means that some module probably have some bug and it terminate the whole website.
If you will send me prv or dump of the whole website, I can debug it why it's terminating in this place.
Comment #11
SoCalCreations commentedWhat is a PRV?
and Define Dump of the whole site.
I would be more than happy to send you anything, please contact me at william@socalcreations.net with your specific requirements.
thanks very much!
Comment #12
kenorb commentedProbably your issue is because of that error:
Follow those issues:
http://drupal.org/node/279450
http://drupal.org/node/112884
or raise the new support issue, because now it's not related to current one anymore and send me the link.
Possible solution:
- Check if you have existing modules/filter/filter.module file
- If you have no duplicated of that filter module
If you have access to phpMyAdmin, you can execute this query to switch off Offline mode:
Comment #13
SoCalCreations commentedUsing the idea from post http://drupal.org/node/112884, which was to Open up update.php and uncomment-out
ini_set('display_errors', FALSE);
I set this to TRUE and got the following error now
Fatal error: Call to undefined function db_is_active() in /home2/socalcre/public_html/includes/bootstrap.inc on line 440
I am currently downloading the site, compressing its' files and will email you the link to download for further assistance.
I really appreciate your help
Will
Comment #14
kenorb commentedOk, you have missing theme directory in your Drupal root directory.
Please download again Drupal sources and replace all the content that you have in Drupal archive.
You have disabled system module.
Try this query:
Comment #15
Anonymous (not verified) commented