Closed (fixed)
Project:
Switchtheme
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2010 at 13:33 UTC
Updated:
22 Jan 2011 at 00:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
klonosAlso this one:
warning: Invalid argument supplied for foreach() in /var/www/larisa247/sites/all/modules/switchtheme/switchtheme.admin.inc on line 14.in the module's admin page (
../admin/settings/switchtheme).Beats me! (?)
Comment #2
klonosI noticed that the switchtheme block's drop down selection menu was empty (!?), so I checked my themes page. I saw that all themes where disabled! Even the default one that was actively loaded and being used(?)
Enabling at least one theme made the issue go away. Was that weird behavior or what?
I bet that all themes getting disabled is not related to this module neither caused by it (core perhaps?). I will leave this issue open for a while (if no one minds), just to see if anyone else faced same or similar behavior recently.
Comment #3
klonosActually, this seems to be #305653: Themes disabled during update and perhaps its related #632080: _system_theme_data() should clone the returned objects.. So, I know this is drupal core issue now, but I believe it would be a good thing if there was a check to see if all themes are disabled. If so, warn the user to enable at least one theme or their default theme. The check should be before the
foreach ($options as $option)in both the switchtheme.admin.inc, line 14 and switchtheme.module, line 214 or wherever else required.That because despite the fact that this needs to be fixed in core, it still throws an error that points to switchtheme module files. So, it is more likely that users will end up looking for a solution here first.
Thanks for considering this.
Comment #4
sunThanks for reporting, reviewing, and testing! Committed attached patch.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.