Page 1 of 1

[BUG]Parse Error Bug

PostPosted: Wed Jan 17, 2007 4:33 pm
Author: Frost
Your phpBB Version: 2.0.
phpBB Type: Integramod 141
MODs: No
Your knowledge: Advanced Knowledge
Board URL: http://www.black-fusion.com/imod141/

PHP Version:
MySQL Version:


What was done before the problem appeared?
I cloned subSilver theme


What was done to try to solve the problem?
I know how to fix the problem when it occurs



De.scription and Message

I don't know if this is a bug or not and I really hope it isn't because I don't want to be the first one to find one <img>

Anyways this isn't really a problem because it's easy to fix but it might annoy people.
The other day I was having difficulty getting the cloning feature on eXtreme Styles Mod to work on a different board using a different premod that I was making a theme for.

Today before I removed the copy of subSilver I had just updated I got curious and went to clone all the styles that were there to make sure that the clone feature worked on 141. It clones newer templates (more specificaly Integra2) just fine, but when I went on to the next one, which was subSilver, it said the style was uploaded and installed. Then when I pushed ok I got this error:

Code: Select all
Parse error]

So I went and looked and sure enough there was an error in the code. On line 40 where the newly installed templates data was put, it double slashed "" twice around a font.

With error:
[code]                 4 => array('themes_id' => '4', 'template_name' => 'BF_Spider', 'style_name' => 'BF_Spider', 'head_stylesheet' => 'BF_Spider.css', 'body_background' => '', 'body_bgcolor' => 'E5E5E5', 'body_text' => '000000', 'body_link' => '006699', 'body_vlink' => '5493B4', 'body_alink' => '', 'body_hlink' => 'DD6900', 'tr_color1' => 'EFEFEF', 'tr_color2' => 'DEE3E7', 'tr_color3' => 'D1D7DC', 'tr_class1' => '', 'tr_class2' => '', 'tr_class3' => '', 'th_color1' => '98AAB1', 'th_color2' => '006699', 'th_color3' => 'FFFFFF', 'th_class1' => 'cellpic1.gif', 'th_class2' => 'cellpic3.gif', 'th_class3' => 'cellpic2.jpg', 'td_color1' => 'FAFAFA', 'td_color2' => 'FFFFFF', 'td_color3' => '', 'td_class1' => 'row1', 'td_class2' => 'row2', 'td_class3' => '', 'fontface1' => 'Verdana, Arial, Helvetica, sans-serif', 'fontface2' => 'Trebuchet MS', 'fontface3' => 'Courier, \'Courier New\', sans-serif', 'fontsize1' => '10', 'fontsize2' => '11', 'fontsize3' => '12', 'fontcolor1' => '444444', 'fontcolor2' => '006600', 'fontcolor3' => 'FFA34F', 'span_class1' => '', 'span_class2' => '', 'span_class3' => '', 'img_size_poll' => '0', 'img_size_privmsg' => '0'),  [/code]

Notice the double slash? \'Courier New\',

So then I just removed the double slash and reuploaded the file and it worked fine.  So I deleted Integra2's clone and recloned it (Integra2) and got the same error as I did with subSilver. But this time when I went and looked it wasn't the new cloned Integra2 with the problem. The mysterious double slashes appeared back onto the subSilver clone. This doesn't make any sense to me so I looked closer and the only difference I see in the code is that Integra2 doesn't have any fonts set within that data and subSilver does.

Here is the same line of code for Integra2]                 5 => array('themes_id' => '5', 'template_name' => 'BF_Goth', 'style_name' => 'BF_Goth', 'head_stylesheet' => 'BF_Goth.css', 'body_background' => '', 'body_bgcolor' => '', 'body_text' => '', 'body_link' => '', 'body_vlink' => '', 'body_alink' => '', 'body_hlink' => '', 'tr_color1' => '', 'tr_color2' => '', 'tr_color3' => '', 'tr_class1' => '', 'tr_class2' => '', 'tr_class3' => '', 'th_color1' => '', 'th_color2' => '', 'th_color3' => '', 'th_class1' => '', 'th_class2' => '', 'th_class3' => '', 'td_color1' => '', 'td_color2' => '', 'td_color3' => '', 'td_class1' => 'row1', 'td_class2' => 'row2', 'td_class3' => '', 'fontface1' => '', 'fontface2' => '', 'fontface3' => '', 'fontsize1' => '0', 'fontsize2' => '0', 'fontsize3' => '0', 'fontcolor1' => '', 'fontcolor2' => '006600', 'fontcolor3' => 'ff0000', 'span_class1' => '', 'span_class2' => '', 'span_class3' => '', 'img_size_poll' => '0', 'img_size_privmsg' => '0'),


So anyways, if anyone gets this error, simply remove one set of the two sets of slashes (if any) in def_themes.php and it should work fine. I just tested with cloning the style, so I don't know if the slashes will reappear if anything else is done with the site. I am going to go and remove the fonts from the acp and see if that works. The problem still needs to be figured out of why the double slashes are getting added anyway.

Edit

Ok I looked in the cloned theme_info.cfg file and found that it was put with a slash here so that would explain why the slash was included twice.

theme_info.cfg:
Code: Select all
${'BF_Spider'}[0]['fontface3'] = "Courier, 'Courier New', sans-serif";


I guess it is like that for the 140 version? When I repackage subSilver should I remove those slashes?

Edit#2 Just looked in the subSilver.css and found this
[code]/* Quote & Code blocks */.code {     font-family]

Removed the 's from there also

Re: Parse Error Bug

PostPosted: Wed Jan 17, 2007 7:40 pm
Author: Teelk
I remember this bug, it was fixed in 140... the last minute update I made to XS MOD removed it... I'll have to search for it again.

EDIT: Marking this as bug.

Re: Parse Error Bug

PostPosted: Thu Jan 18, 2007 4:38 pm
Author: Frost
Well if it matters it seems to be just to the subSilver clone (first clone)

And this happens also if you add/install/clone any more themes after it. It just gives the error again until you edit the file and remove the slashes