This topic was marked solved by its starter, on February 17th, 2014, 07:05 PM
Error on Skin/Theme Select

Wanchope

  • Posts: 234
Error on Skin/Theme Select
« on February 10th, 2014, 05:36 PM »
I Selected my own theme in the admin page - select skin, chose Wild for Forum default and Wilderness for Mobile default and my forum lost the css. I got this from the error log

Code: [Select]
Apply Filter: Only show the error messages of this URL http://website.com/do/admin/?area=theme;b7ce3eff=a12183dcf5753c58b27a5…
Apply Filter: Only show the errors with the same message 8: Undefined index: -1
Apply Filter: Only show the errors from this file File: /part-to-the-forum/gz/app/Subs-Cache.php

Many of them.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Error on Skin/Theme Select
« Reply #1, on February 10th, 2014, 07:30 PM »
Please, I need line numbers...

Also, why isn't Wilde+Wilderness your default combo already..?

Wanchope

  • Posts: 234
Re: Error on Skin/Theme Select
« Reply #2, on February 10th, 2014, 08:27 PM »
Don;t know why. I downloaded it yesterday and installed today.
There two lines in the error log -  line 1456   and line 1460

Type of error: Undefined
http://website.com/do/admin/?area=theme;b7ce3eff=a12183dcf5753c58b27a5
Apply Filter: Only show the errors with the same message 8: Undefined index: -1
Apply Filter: Only show the errors from this file File: part-to-the-root/gz/app/Subs-Cache.php
Line: 1456

Type of error: Undefined
http://website.com/do/admin/?area=theme;b7ce3eff=a12183dcf5753c58b27a5
Apply Filter: Only show the errors with the same message 8: Undefined index: -1
Apply Filter: Only show the errors from this file File: part-to-the-root/gz/app/Subs-Cache.php
Line: 1460


Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Error on Skin/Theme Select
« Reply #3, on February 10th, 2014, 09:08 PM »
I don't see anything special in these lines. They're unrelated, not addressing the same (undefined) index, and don't make sense generally.
Did you change your skins in any way..?
Re: Error on Skin/Theme Select
« Reply #4, on February 10th, 2014, 09:26 PM »
Can you open /core/app/Subs-Cache.php, search loadSource('Themes'); and insert, BEFORE that line, this line?

Code: [Select]
echo "<pre>", print_r($css_folders, true), "</pre>";

Then please tell me what it says on your web page after uploading it...

Wanchope

  • Posts: 234
Re: Error on Skin/Theme Select
« Reply #5, on February 10th, 2014, 10:45 PM »
Sorry for the late reply, I was not free
It says

Array
(
   
  • => -1
)
.................................
The error mentioned index because I visited the forum index (?)
Note: the Forum works fine if I log out and will continue one I log in.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Error on Skin/Theme Select
« Reply #6, on February 11th, 2014, 07:14 PM »
I think this should be fixed now...
Can you test with the updated versions of core/app/Themes.php and core/html/Themes.template.php...?

Thanks for the report!

Wanchope

  • Posts: 234
Re: Error on Skin/Theme Select
« Reply #7, on February 13th, 2014, 02:13 AM »
Updates the core/app/Themes.php  and  core/html/Themes.template.php but it is still showing the error, same report in the error log.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Error on Skin/Theme Select
« Reply #8, on February 13th, 2014, 07:44 AM »
Anyone else..?

I didn't test before committing but iirc the reason for the bug was obvious (a theme removal collateral) and the fix was crystal clear. I'm curious as to whether I did another last minute blunder or you did. :P

Wanchope

  • Posts: 234
Re: Error on Skin/Theme Select
« Reply #9, on February 13th, 2014, 08:56 PM »
I don't know if the 'blunder' is from me but I copied the two edited files, replacing the existing ones. Sorry I am not free, currently on a very tight schedule. Another person should please test and report.
Thanks.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Error on Skin/Theme Select
« Reply #10, on February 14th, 2014, 12:40 AM »
See latest commit for a fix that shows you the actual defaults.
I don't know if that's the problem you were having.

But the problem with "-1" in the error log should, most definitely, be fixed... As long as Themes.php is updated in core/app, and Themes.template.php in core/html, of course.

Wanchope

  • Posts: 234
Re: Error on Skin/Theme Select
« Reply #11, on February 17th, 2014, 07:02 PM »
removed the old forum entirely, did a fresh install and it works like charm. Thanks.
Topic marked as solved.

Nao

  • Dadman with a boy
  • Posts: 16,079