Hi,
I have just upgraded from 2.5.4 to 2.6.1 on Windows Server 2008R2, MSSQL Server 2008R2, IIS 7.5, PHP 5.3.8 and have found that theme selector is not displaying any themes.
Standard theme is applied to the site and the clean theme kicks in on mobile devices.
Site Administration > Appearance > Themes displays a list of themes and each link from this list allows me to configure the themes with logo etc. However Theme Selector displays nothing.
With debugger on the following error is displayed on the theme selector page:
Warning: array_keys() expects parameter 1 to be array, object given in <server>\lib\classes\useragent.php on line 216 Warning: array_merge(): Argument #2 is not an array in <server>\lib\classes\useragent.php on line 216 Warning: Invalid argument supplied for foreach() in <server>\theme\index.php on line 100
line 216 in useragent.php is highlighted below:
public static function get_device_type_list($includecustomtypes = true) {
$types = self::$devicetypes;
if ($includecustomtypes) {
$instance = self::instance();
$types = array_merge($types, array_keys($instance->devicetypecustoms));
}
return $types;
}
line 100 in index.php is highlighted below:
foreach ($devices as $thedevice) {
$headingthemename = ''; // To output the picked theme name when needed. $themename = core_useragent::get_device_type_theme($thedevice); if (!$themename && $thedevice == 'default') { $themename = theme_config::DEFAULT_THEME; }
Has anyone come across this and have any insights as to how I can get theme selector to recognise and display a list of themes to choose from?
Cheers
Dave P