Periodically when cron is run my site loses it's main theme. In the Drupal log the same 3 errors always appear. The first one is always the following:
array_map() [<a href='function.array-map'>function.array-map</a>]: Argument #2 should be an array in /home/websites/www/httpd/html/sitename/info/modules/system/system.module on line 966.
Which is then always followed by two others:
array_keys() [<a href='function.array-keys'>function.array-keys</a>]: The first argument should be an array in /home/websites/www/httpd/html/sitename/info/includes/theme.inc on line 1771.
Invalid argument supplied for foreach() in /home/websites/www/httpd/html/sitename/info/includes/theme.inc on line 1771.
This doesn't happen every time cron is run, just periodically. I haven't been able to determine what triggers this to happen.
Comments
Comment #1
logicalpat CreditAttribution: logicalpat commentedForgot to add: To fix the issue I have to go to /admin/build/themes which makes the theme come back temporarily. The check box for "Enabled" next to the theme however is unchecked.
Comment #2
logicalpat CreditAttribution: logicalpat commentedIt's looking like it occurs whenever cron is run by a automated cron job and the Status Report page on /admin/reports/status indicates there is no "Drupal core update status" information available and suggests running cron or checking manually.
I tried clearing the cache manually and then running cron manually however that functioned as expected and didn't cause the theme to be lost.
Comment #3
logicalpat CreditAttribution: logicalpat commentedComment #4
pixelmord CreditAttribution: pixelmord commentedI have a similar issue occurring, but I'm not sure this is dependant on the cron-job.
But I get from time to time the exact same Warnings and the custom theme is broken. Flushing all cache helps.
On the administration page with the list of themes also the checkbox for my main theme is not set, although it is the default theme.
Also the link for configuration of this theme is not present until I check the box for theme activation and save.
I use Drupal 6.14 with the module administration theme. The admin-theme is set as Garland and the theme selected for frontend is a custom theme based on ninesixty.
The custom theme is pretty simple so far. Since the code on line 1771 theme.inc is dealing with regions, I already checked the correct settings in my info file and page.tpl.php and that seems to be o.k.
Comment #5
HansRoberto CreditAttribution: HansRoberto commentedHaving the same problem. Is anyone looking into this?
Comment #6
asimmonds CreditAttribution: asimmonds commentedIt's possible that at least one of the theme's .info file is not declaring the regions array properly.
eg
instead of
Look at all the themes, not just the enabled ones.
Comment #7
pixelmord CreditAttribution: pixelmord commentedI looked at all themes, except the core-Themes.
If there were regions declared in the info-file, the declarations were syntactically correct.
The only contributed themes installed in sites/all/themes were ninesixty and zen.
Since the site is running still in a non public environment, all caching is disabled. BUT clearing all caches(via the menu entry in administration menu) solves the problem until it comes back again after e few days.
The last two occurences were October the 7th and 10th, so there is 3 days in between, what can possibly be executed 3 days time apart only?
What type of error causes the checkbox and the configuration link of an active theme to be deactivated, although a theme is set as default?
Comment #8
419 CreditAttribution: 419 commentedmy theme disapeared as well without any apparent reasons. i have to upload to Drupal 6.14 though i don't know whether i should not first fix this theme issue before upgrading.
Having gone to the admin/theme menu, the page shown is completely different from what it should be..
If anyone can help, it will be much apreciated.
Thanks.
Comment #9
419 CreditAttribution: 419 commentedHi again,
it looks like it is linked with the region menu.
When accessing the blocs menu through admin panel the following error msg comes up:
Fatal error: Unsupported operand types in /..../modules/block/block.admin.inc on line 39
Thanks for any help, i am fully confused.
Comment #10
ianchan CreditAttribution: ianchan commentedsubscribe
Comment #11
HansRoberto CreditAttribution: HansRoberto commented@asimmonds: That's not the case.
And the problem seems to appear randomly, not only when cron is run.
Comment #12
pixelmord CreditAttribution: pixelmord commentedI don't think that 419 wanted to be assigned to solve this issue, so I reset this.
Could some of you please tell, what themes you are using, may be that will be a lead?!
Comment #13
HansRoberto CreditAttribution: HansRoberto commentedRight now I am using 0-point, but I have also tried with Zen, Adaptive Theme, Genesis, and some others - the problem still remains.
Comment #14
HansRoberto CreditAttribution: HansRoberto commentedI turned off "Update status" and the problem seems to have disappeared... Strange...
Comment #15
logicalpat CreditAttribution: logicalpat commentedI ended up disabling the Update Status module as well which fixed this problem for me too. However I've since re-enabled it after updating a few other modules and I no longer have this disappearing theme issue. I don't recall which modules I updated but could it be possible some non-core module is interfering with Update Status and causing this problem?
Comment #16
pixelmord CreditAttribution: pixelmord commentedo.k. disabling the Update Satus module is a workaround also for me, but after reenabling the problem with the broken theme is reappearing.
I have a duplicate of a site on a testserver and only on the duplicated site(made with backup/migrate and a copy of the files) the problem is occuring.
What i notice, is that on the original functioning copy of the site, the are update status entries in the update status page for both the base theme (ninesixty) and my custom theme based upon it.
On the duplicate site where the theme always breaks, there are no entries in the update status page for these themes.....
Also the fact that the custom subtheme used as default by the site is not checked as enabled on the theme list page is a hint...
Somehow the themes are not correctly "registered"?
Maybe something on the other server is different in terms of apache or file attributes or the database import by backup/migrate failed to create all inserts correctly, but I did not notice anything so far?
Any of you used also backup/migrate to import the DB?
Comment #17
Alan.Guggenheim CreditAttribution: Alan.Guggenheim commentedSame issue here occurring several times a day on 6.15
Comment #18
Jerome F CreditAttribution: Jerome F commentedSubscribing - same issue with 6.15
Comment #19
wcraft CreditAttribution: wcraft commentedI am having the same problem with 6.16. At first I thought it was related to the cron, but I disabled cron for a few days and the problem still occurred. I see scattered notes about update.php causing this, but that wasn't the case for me either.
I did notice that anytime I ran the Update Status function, the theme would be fine as long as all modules were up to date. If anything needed to be updated, the theme would disappear.
I've disabled the Update Status module for now. Hope it works...
Comment #20
Alan.Guggenheim CreditAttribution: Alan.Guggenheim commentedComment #21
ScottBaetz CreditAttribution: ScottBaetz commentedsubscribe
Comment #22
ScottBaetz CreditAttribution: ScottBaetz commentedIt's just a hunch, but I noticed I hadn't placed an email address in my status update settings page. Hoping this will correct the problem. I have to wait until cron fires... as self running NEVER causes the problem..
Comment #23
kmillecam CreditAttribution: kmillecam commentedSubscribing
Comment #24
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedwe're having the same issue. when i try to fetch the update status information manually then i end up redirected to an error 500 page.
the only module that i'm using that i usually don't use is flashvideo. anyone else using this?
Comment #25
jazzslider CreditAttribution: jazzslider commentedHello!
Just wanted to weigh in with some of our findings on this; we've observed this issue for awhile now on several of the sites we host, and although we haven't pinpointed the problem yet, we have lots of technical details on symptoms :) Here are the facts (in our situation):
Sorry for the crazy brain dump, but I think these details are all relevant; the symptoms you all have described are very similar to what we're experiencing, so I thought these extra details might help.
One question, though …have any of you observed this problem happen for themes that aren't stored in the profiles directory?
Thanks!
Adam
Comment #26
acrollet CreditAttribution: acrollet commentedI've applied the patch at http://drupal.org/node/307756#comment-2819478 to one of our problematic sites - haven't gotten any data back, as we only see themes get disabled once a night. (I work with jazzslider) I would be curious to hear if that patch helps anyone else experiencing this issue.
Comment #27
jazzslider CreditAttribution: jazzslider commentedUpdate: the site @acrollet patched still got screwed up last night, so that patch isn't really a solution to this problem.
Comment #28
acrollet CreditAttribution: acrollet commentedJust in case it helps anyone else - here's a link to the solution for the problem @jazzslider and I were experiencing, it was happening when drush updatedb (and update) were being run: #806190: drush updb removes themes under /profiles from the system table
Comment #29
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedwe seem to have pinned this issue down to a combination of two things:
-on websites where we run cron via the CLI mode of PHP
-on websites where the update status module is enabled
only under these two situations we notice the problem to occur
Comment #30
tnightingale CreditAttribution: tnightingale commentedWe are experiencing exactly what is detailed in #25. While disabling Update Status solves the problem, it is a "band-aid" solution. I am currently looking into a better fix.
FTR some related issues:
Comment #31
arianek CreditAttribution: arianek commentedsubscribe
Comment #32
tnightingale CreditAttribution: tnightingale commentedSolution is to make sure following two variables are set with your install profile's name:
variable_set('install_profile', $value)
ordrush vset install_profile <value>
.This has been bugging us for weeks, it turns out that just setting install_profile in the global $conf array in settings.php is not enough. Kinda feel stupid now :P
See links above for discussion about the wider drupal core issue.
Hope this helps
P.S props to hadsie and adrian for pointing this out :P
Comment #33
dpearcefl CreditAttribution: dpearcefl commentedIs this still an active issue?
Comment #34
dpearcefl CreditAttribution: dpearcefl commentedComment #35
Kars-T CreditAttribution: Kars-T commentedHi
I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.
Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.
Comment #37
emi_bcn CreditAttribution: emi_bcn commentedHi there,
I was experiencing same issue with a sub-sub-fusion theme (an aim subtheme). I was debugging and looking for it on Internet, with no luck. Finally, I added this lines to index.php (just to debug sill more):
You can accomplish the same by adding similar lines to php.ini.
I found I had a PHP bug on my modified theme (into a tpl file). Just corrected the error and all worked again. No more theme lost on some "drush cron". So may be your cases. Be sure to run all your templates and all hooks you've just added to themes or with modules with php debugging on.
Hope it helps.