Page 1 of 1

T_STYLESHEET_LINK & error

Posted: Mon May 09, 2011 10:40 pm
by gregtampa
http://tracker.phpbb.com/browse/PHPBB3-6753

Kellanved closed this, when it should have been fixed!

Using the "&" sign makes the code invalid and non-compliant with w3c.

I can not find the file that is generating the link or I'd fix it myself.

Find:

Code: Select all

&id=
Replace with:

Code: Select all

&id=
Kellanved added a comment - 03/Jan/08 12:16 PM
& is correct.
ERROR http://validator.w3.org/
If you meant to include an entity that starts with "&", then you should terminate it with ";". Another reason for this error message is that you inadvertently created an entity by failing to escape an "&" character just before this text.
Nice new bug tracker system, I would like to request an account ASAP please, I found so many things to fix.
As you can see from my record(hopefully it wasn't nuked since the forum change) I been a member for over 10 years! I have many many plugins/mods that I developed when phpBB was first starting out.
I was also a core developer many many years ago. I decided I will use phpBB again and see how it is coming along vs. the other BB systems.

If anyone would like to point me in the right direction so I can have a valid W3C website(even though Kellanved said it is right and didn't tell that to the validator), please post.

Re: bug tracker login, and also a bug report 4 u

Posted: Mon May 09, 2011 10:50 pm
by Noxwizard
Kellanved posted &, but the converter to the new tracker changed it. You can see the original ticket here: http://www.phpbb.com/bugs/phpbb3/18015

As for your tracker account, it uses the same credentials as this forum.

Re: bug tracker login, and also a bug report 4 u

Posted: Mon May 09, 2011 10:54 pm
by gregtampa
I tried to login didnt work...

I tried to login to the forums and got some error about my password wasn't carried over to the new forums please reset it blablablabla..
so maby it will work now in the bug tracker login screen..
thx..

right now im editing functions.php to solve the problem... I read the old post before I went to the new post he still didnt solve it, and left it... I have latest version of phpbb3 and it still has the bug..

must change in repo..

firing up eclipse right now...

Found it on line 4483

Code: Select all

		'T_STYLESHEET_LINK'		=> (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&lang=' . $user->data['user_lang']),
Now to figure out what to change it to.


Note: after reading the old/original bug tracking post, I believe Kellanved didn't notice that there was multi-able & signs, the author of the bug report was referring to the ones that was correct to show examples that one of them was wrong compared to the others.

If it is written the right way and nothing should be changed as Kellanved pointed out then why are the other & displayed and rendered using ASCII?

Re: T_STYLESHEET_LINK & error

Posted: Mon May 09, 2011 11:22 pm
by gregtampa
anyone get this to validate?
This is pissing me off... no matter what I do I get the error.
Atleast the error moved from before the id to after and now its before lang
Line 76, Column 34: reference not terminated by REFC delimiter

Code: Select all

<link href="./style.php?id=2&lang=en" rel="stylesheet" type="text/css" media="s…
If you meant to include an entity that starts with "&", then you should terminate it with ";". Another reason for this error message is that you inadvertently created an entity by failing to escape an "&" character just before this text.

Re: T_STYLESHEET_LINK &amp; error

Posted: Mon May 09, 2011 11:33 pm
by gregtampa
Woot a workaround:

replaced the

Code: Select all

{t_stylesheet_link}
in my overall_header.php file
with:

Code: Select all

./style.php?id=2&lang=en&sid=202a8e82f56c921873e9e1d41f1c13d2
if anyone else does this just be sure to pick your right lang, and grab the sid from whatever the source code is creating currently.

Re: T_STYLESHEET_LINK &amp; error

Posted: Wed May 11, 2011 2:43 pm
by gregtampa
If you see this error please vote for it
http://tracker.phpbb.com/browse/PHPBB3-10183
Keep in mind if this is not fixed every phpBB3 site will not be valid to be on the web, and it is not browser compliant code.

Re: T_STYLESHEET_LINK &amp; error

Posted: Wed May 11, 2011 3:56 pm
by Noxwizard
This doesn't appear at any of the sites I checked. They all correctly use &. Additionally, hard coding session IDs is not a good idea. Only one account will have that session ID, yours. In append_sid(), $is_amp defaults to true, so if it has to append the sid for the stylesheet, it's going to use &.

Re: T_STYLESHEET_LINK &amp; error

Posted: Wed May 11, 2011 6:58 pm
by gregtampa
would you provide me the code that line 4483 in functions.php contain?

Re: T_STYLESHEET_LINK &amp; error

Posted: Wed May 11, 2011 7:07 pm
by Noxwizard
It's the same as what you've posted.

Code: Select all

		'T_STYLESHEET_LINK'		=> (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&lang=' . $user->data['user_lang']),
You can see it here at phpbb.com and at area51.phpbb.com that it works fine. These run nearly stock copies of phpBB.

Re: T_STYLESHEET_LINK &amp; error

Posted: Wed Mar 14, 2012 3:14 pm
by gregtampa
THanks Nox, I forgot to thank you..