The place where everyone hangs out, chats, gossips, and argues
User avatar
By Adam
#246785
Hi,

Noticed this has been been showing when clicking on various threads - any ideas what it might be? Seems to be okay when you refresh.



Code: Select allThe XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Whitespace is not allowed at this location. Error processing resource 'http://chrismoyles.co.uk/phpBB2/viewtopic.php?t=1457...

<link rel="chapter forum" href="viewforum.php?f=38" title="News & Site Updates" />
------------------------------...
 
User avatar
By Console
#246787
I understand the error, although what's causing, and why it seems to correct itself, is far harder to see.

A few people have seen this, infact I think there was a thread about it a while ago, although I haven't actually seen it myself.
User avatar
By Mcqueen_
#246797
I take it it's just people using Internet Explorer getting this problem?

IE doesn't handle xhtml right and interprets it as html which could be causing the problem (as this new styles doctype is xhtml transitional). If it's changed to html transitional it should stop it.
User avatar
By Adam
#246798
Mcqueen_ wrote:I take it it's just people using Internet Explorer getting this problem?

IE doesn't handle xhtml right and interprets it as html which could be causing the problem (as this new styles doctype is xhtml transitional). If it's changed to html transitional it should stop it.


Yeah, currently using IE - so possibly? Doesnt appear on Safari as far as I know.
User avatar
By nood
#253025
It's because this erroneous xml header is at the top of the page source
<?xml version="1.0" encoding="iso-8859-1"?>

It should start at this line
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
User avatar
By MK Chris
#253035
Mcqueen_ wrote:I take it it's just people using Internet Explorer getting this problem?

IE doesn't handle xhtml right and interprets it as html which could be causing the problem (as this new styles doctype is xhtml transitional). If it's changed to html transitional it should stop it.

Nope, I've had it before using Firefox (but not for a while).

nood wrote:It's because this erroneous xml header is at the top of the page source
<?xml version="1.0" encoding="iso-8859-1"?>

It should start at this line
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

That's a logical explanation but doesn't explain why the problem is intermittent.
User avatar
By nood
#253046
There's some discussion on the phpbb board, but no real solution.
http://www.phpbb2.de/ftopic17330.html

Ah, I've got it.

Code: Select allWhitespace is not allowed at this location. Error processing resource 'http://chrismoyles.co.uk/phpBB2/viewtopic.php?t=1457...

<link rel="chapter forum" href="viewforum.php?f=38" title="News & Site Updates" />


The "Whitespace is not allowed at this location" warning is referring to & not being outputted as &amp; in the source: title="News & Site Updates" since whitespace follows the & when it should be &amp; in XML. It would occur with URLs such as ?f=38&page=2 too.

The fact it only happens sometimes would be because an ampersand is not always in the title. That wouldn't explain why it works on refresh, but & on its own there will definately interrupt an XML output.

So, without having the phpbb source to hand, a quick fix might be either a str_replace( '&', '&amp;', $string) or htmlentities($string) somewhere, whichever is most appropriate.

Examples:
http://www.popnoodles.com/stuff/xml/
You will still get the no style info error.
User avatar
By Console
#253074
While that is technically accurate, it doesn't explain why it only happens some of the time, and only in IE. Hopefully whatever it was is fixed in IE7; has anyone seen it with IE7 yet?
User avatar
By nood
#253096
Yes, I said that, but it could be down to so many other things, IE may be a bit random, phpbb may be chaning the session which could affect IE's behaviour, it (phpbb) could also be outputting something different on refresh for reasons that aren't apparent, it could somewhere between your ISP compressing the page and the browser caching it for all we know - I use NTL, what do people who get the error use?
There are so many tiny tiny things that could cause it. Pulling a tooth out stops pain from a cavity, your dentist won't ask you to recall exactly what confectionaries you've eaten throughout your life, so the code may as well just be fixed to be technically correct.

If the page on occasion still outputs as XML, without errors, then you need to look at why the xml header hack was put there (the info from the phpbb board says it's there to fix another bug) and fix that one properly.
User avatar
By Boboff
#256397
That is like so so amazing !

I thought my posts were hard to understand, respect guys. Why won'y my page load today then ?
User avatar
By DemonHorse
#256411
boboff wrote:That is like so so amazing !

I thought my posts were hard to understand, respect guys. Why won'y my page load today then ?


have you tried turning it off and back on again? [/tech support]
User avatar
By Boboff
#256419
good suggestion, should this thing with three pins be plugged in anywhere ?
User avatar
By DemonHorse
#256421
have you tried kicking it? Yes? well thats probably why it's not bloody workin then... (I have genuinely used that one at work... GET IN!)
User avatar
By Boboff
#256423
What was that program about IT blokes in the basement, very funny, big fat bloke, and geek with black hair, was that based on you ??
User avatar
By DemonHorse
#256426
nah, that was made BEFORE I got a job in Tech Support... I liked it though... used it as a training film. Loved that one where he was Emailing the fire service...
User avatar
By MK Chris
#256456
Ha, The IT Crowd, I found it very funny. Only seen one or two though.
User avatar
By DemonHorse
#256474
Indeed. Very underrated in all the reviews I saw.