T_STYLESHEET_LINK & error

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
gregtampa
Registered User
Posts: 13
Joined: Sat Oct 09, 2004 3:10 pm
Location: Boca Raton, FL
Name: Greg
Contact:

T_STYLESHEET_LINK & error

Post by gregtampa » Mon May 09, 2011 10:40 pm

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.
Last edited by gregtampa on Mon May 09, 2011 11:00 pm, edited 1 time in total.

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10341
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

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

Post by Noxwizard » Mon May 09, 2011 10:50 pm

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.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.

gregtampa
Registered User
Posts: 13
Joined: Sat Oct 09, 2004 3:10 pm
Location: Boca Raton, FL
Name: Greg
Contact:

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

Post by gregtampa » Mon May 09, 2011 10:54 pm

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?

gregtampa
Registered User
Posts: 13
Joined: Sat Oct 09, 2004 3:10 pm
Location: Boca Raton, FL
Name: Greg
Contact:

Re: T_STYLESHEET_LINK & error

Post by gregtampa » Mon May 09, 2011 11:22 pm

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.

gregtampa
Registered User
Posts: 13
Joined: Sat Oct 09, 2004 3:10 pm
Location: Boca Raton, FL
Name: Greg
Contact:

Re: T_STYLESHEET_LINK &amp; error

Post by gregtampa » Mon May 09, 2011 11:33 pm

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.

gregtampa
Registered User
Posts: 13
Joined: Sat Oct 09, 2004 3:10 pm
Location: Boca Raton, FL
Name: Greg
Contact:

Re: T_STYLESHEET_LINK &amp; error

Post by gregtampa » Wed May 11, 2011 2:43 pm

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.

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10341
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: T_STYLESHEET_LINK &amp; error

Post by Noxwizard » Wed May 11, 2011 3:56 pm

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 &.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.

gregtampa
Registered User
Posts: 13
Joined: Sat Oct 09, 2004 3:10 pm
Location: Boca Raton, FL
Name: Greg
Contact:

Re: T_STYLESHEET_LINK &amp; error

Post by gregtampa » Wed May 11, 2011 6:58 pm

would you provide me the code that line 4483 in functions.php contain?

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10341
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: T_STYLESHEET_LINK &amp; error

Post by Noxwizard » Wed May 11, 2011 7:07 pm

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.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.

gregtampa
Registered User
Posts: 13
Joined: Sat Oct 09, 2004 3:10 pm
Location: Boca Raton, FL
Name: Greg
Contact:

Re: T_STYLESHEET_LINK &amp; error

Post by gregtampa » Wed Mar 14, 2012 3:14 pm

THanks Nox, I forgot to thank you..

Locked

Return to “[3.0.x] Support Forum”