backdrop-contrib / gin

Admin theme with a strong focus on improving the Editorial Experience.
https://backdropcms.org/project/gin
GNU General Public License v2.0
5 stars 2 forks source link

If making Gin default theme - generates error #133

Closed stpaultim closed 2 months ago

stpaultim commented 2 months ago

Steps to Reproduce

1) Add Gin to site 2) Enable and set to default (Not something you are likely to do on purpose, but something that is easy to accidentally do) 3) Visit home page

When Gin is set as the default site, if you try to visit a page you get this fatal error. I recognize that GIN is not designed to be a front end default theme, but it's easy to make this mistake and I would expect a more graceful failure, if failure is inevitable.

implode(): Argument #1 ($array) must be of type array, string given

Log shows:

Warning: Undefined variable $html_classes in include() (line 42 of /var/www/html/themes/gin/templates/page/page.tpl.php).

TypeError: implode(): Argument #1 ($array) must be of type array, string given in implode() (line 42 of /var/www/html/themes/gin/templates/page/page.tpl.php).

image

laryn commented 2 months ago

@stpaultim Thanks for the report. Can you test the attached PR?

stpaultim commented 2 months ago

@laryn This seems to do the trick. I tested with the PR and did not see the problem.