Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After installing LayoutStudio with a custom sub-MYTHEME directory as outlined in the readme.txt file, once that theme has been enabled there is a php-level error that displays on all Admin pages:
warning: array_count_values() [function.array-count-values]: The argument should be an array in /Users/[your username]/Sites/[the project name]/local/sites/all/themes/layoutstudio/template.php on line 138.
warning: Invalid argument supplied for foreach() in /Users/[your username]/Sites/[the project name]/local/sites/all/themes/layoutstudio/template.php on line 142.
This will persist until the Admin goes to: http://[the site name]/admin/build/themes/settings/[the subtheme name]
and explicitly sets and saves one of the 9 layouts at the bottom of the page. Then, the error disappears.
This should either be mentioned in the readme.txt or the error should be taken care of as it's not obvious at all where this error is occurring from.
Thanks.
Comments
Comment #1
rhache CreditAttribution: rhache commentedThe only thing I can do about that bug is to add a note in the documentation that you need to configure the theme after it's enabled.
Thanks,
Rene
Comment #2
rhache CreditAttribution: rhache commentedComment #3
rjay CreditAttribution: rjay commentedI made a small code change to prevent these warnings from occuring when a layout has not yet been selected. I have also added a helpful reminder to the site administrator to configure their theme and select a layout.
Committed to 6.x-2.x.