Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: Wanchope on February 10th, 2014, 05:36 PM

Title: Error on Skin/Theme Select
Post by: Wanchope 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.
Title: Re: Error on Skin/Theme Select
Post by: Nao on February 10th, 2014, 07:30 PM
Please, I need line numbers...

Also, why isn't Wilde+Wilderness your default combo already..?
Title: Re: Error on Skin/Theme Select
Post by: Wanchope 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

Title: Re: Error on Skin/Theme Select
Post by: Nao 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..?
Title: Re: Error on Skin/Theme Select
Post by: Nao 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...
Title: Re: Error on Skin/Theme Select
Post by: Wanchope on February 10th, 2014, 10:45 PM
Sorry for the late reply, I was not free
It says

Array
(
    )
.................................
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.
Title: Re: Error on Skin/Theme Select
Post by: Nao 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!
Title: Re: Error on Skin/Theme Select
Post by: Wanchope 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.
Title: Re: Error on Skin/Theme Select
Post by: Nao 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
Title: Re: Error on Skin/Theme Select
Post by: Wanchope 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.
Title: Re: Error on Skin/Theme Select
Post by: Nao 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.
Title: Re: Error on Skin/Theme Select
Post by: Wanchope 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.
Title: Re: Error on Skin/Theme Select
Post by: Nao on February 17th, 2014, 07:20 PM
Good!