Problems, need help? Have a tip or advice? Post it here.
8 posts Page 1 of 1
Everything was working just fine then all of a sudden all my photo galleries are getting this error.

"This XML file does not appear to have any style information associated with it. The document tree is shown below."

I have done a bit of research and think that it is browser based. I have tried alternate browsers and they all receive the same message. This was working fine for several months prior to this as well. I can't find a solution.

Can anyone assist me with this please?
Something must have definitely changed.

A possible cause could be the, inadvertent, introduction of any white space before the <?xml tag. Please make sure the template has been encoded using 'utf8 without BOM' (viewtopic.php?f=4&t=53).

Please also check the config and kfunctions.php files if you have edited them lately to see if any white space is getting introduced through them.
Ok, I will check this out. I talked with the user(site owner) and they did say they tried to upload some files from thier phone to the website, which I have never tested.

I should also add that I did the 1.4.7 update a while back too, but it was working fine after that to the best of my knowledge.

Thanks for the response, I will post my results back, after trying your recommendations.
I have 3 image galleries that use the same template. Two of the three work fine. This one gallery is giving the above mentioned error in chrome, and just shows me an xml file in IE.

I have checked the file, and here is my line of code.

Code: Select all
<?php require_once( '../couch_dir/cms.php' ); ?><cms:content_type 'text/xml' /><cms:concat '<' '?xml version="1.0" encoding="' k_site_charset '"?' '>' />


This is all on one line of text too.

Since the string is concatenated I am not sure if the space betwen the ' marks would be considered white space or not.

Thanks again, in advance for your assistance.
Could you get me FTP+Couch access to the site?
Please PM me the creds if that is ok and I'll take a look at the issue myself.
KK wrote: Could you get me FTP+Couch access to the site?
Please PM me the creds if that is ok and I'll take a look at the issue myself.



Sent, thank you.
Thank you for your time KK. Your suggestion fixed the issue. I really appreciate your time!
You are welcome :)

For anyone chancing upon this thread - the problem was this:

Suppose 'gallery.php' is the template that is outputting the XML data.
Now if we were to access http://yoursite.com/gallery.php, all browsers will show the output in text form with the message "This XML file does not appear to have any style information associated with it. The document tree is shown below.".

This *is* the expected behavior for XML files if we view them directly. They are meant to be 'consumed' by another script that understands the XML format.

In the case of @cscheck, I found that the two galleries that were working fine were actually being displayed using HTML files that made use of the Couch XML templates using embedded Flash as follows
<script type="text/javascript">
//<![CDATA[
var so = new SWFObject("polaroid.swf", "polaroid", "100%", "100%", "8", "#FFFFFF");
// specify the url to the xml-file, default is photos.xml
so.addVariable("xmlURL","some-gallery.php");
so.write("fullscreendemo");
//]]>
</script>

The one gallery that seemingly did not work was actually linked directly to the XML template and hence was displaying the message.

The solution was to create a similar HTML file as used by the other galleries and then use the XML template from within that.
8 posts Page 1 of 1