Author Topic: invalid xml error  (Read 7315 times)

0 Members and 1 Guest are viewing this topic.

Offline bigwave

  • Newbie
  • *
  • Posts: 36
  • stuck on the North Shore of Maui
    • View Profile
    • Maui Tropica
invalid xml error
« on: August 01, 2006, 04:18:49 AM »
Hello,
Wizz RSS News Reader running with Firefox gives me an "Invaid XML was retuned" error when I use it with my new install of 1.73.¬  In the Wizz help forum there was a reference to
http://feedvalidator.org/
which says that:

'utf8' codec can't decode byte 0xa9 in position 1151: unexpected code byte (maybe a high-bit character?)
 alert("? Copyright by Maui Tropica Gallery");
A common cause of this error is having a high-bit character (such as a curly quote or curly apostrophe) in your RSS feed. This can happen if you copy-and-paste a quote from another page that contains curly quotes. For maximum compatibility with readers, you should remove the invalid character or use a numeric entity equivalent.

You can also try changing your character encoding to a more liberal encoding. For example, if you have this at the top of your feed:

<?xml version="1.0" encoding="utf-8"?>

Try changing it to this:

<?xml version="1.0" encoding="iso-8859-1"?>

This can be a difficult error to diagnose, because the validator can not give you the exact location of the error. (This is due to a limitation of our parsing library; sorry, we tried very hard to work around it!) For example, if the validator says the error occurred at the end of a description element, the actual invalid character could be anywhere within the description.


XML parsing error: <unknown>:1:62: syntax error
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
The text of the error may contain additional helpful details. At a minimum, the actual line and column number where the error was detected will be reported.

The most common cause is encoding errors. There are several basic approaches to solving this: escaping problematic characters, escaping entire blocks of text with CDATA sections, or putting an encoding declaration at the start of the feed.

Another common error is the inclusion of whitespace characters (spaces, tabs, newlines) before the XML Declaration. If an XML Declaration is included, it must be the first thing in the document



Feeds should not be served with the "text/html" media typeExplanation
The web server is reporting an unexpected MIME type for a feed. Although we tried to parse it as a feed, aggregators may well report this as an error and act as if the user had pointed them at something other than a feed.

RSS feeds should be served as application/rss+xml (RSS 1.0 is an RDF format, so it may be served as application/rdf+xml instead). Atom feeds should use application/atom+xml. Alternatively, for compatibility with widely-deployed web browsers, any of these feeds can use one of the more general XML types - preferably application/xml.

Solution
Use the appropriate MIME type for your feed.

For static content served with Apache, use the AddType directive.
For static content served with Microsoft IIS, add a MIME type.
Other information can be found here or in the documentation provided by your server.


Any ideas how to fix this?

In the xml feedvalidator.org has a bunch of ?s highlighted red--for example(even though it's commented out):

Bitte beachten Sie, dass der folgende Copyrighthinweis
   auf JEDER Seite die von 4images ausgegeben wird sichtbar
   sein MUSS. Schriftart, Farbe etc. d?an die eigene
   Website angepasst werden, der Hinweis darf aber unter
   KEINEN Umst?en entfernt oder unsichtbar gemacht werden.
¬  ¬ Auch muss der Hyperlink zu http://www.4homepages.de intakt
¬  ¬ bleiben. Diese Bedingung ist Bestandteil der Lizenz dieser
¬  ¬ Software. Lesen Sie die Lizenz.txt Datei f?tere

and at the top this is highlighted in yellow:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Thanks,

Brian

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: invalid xml error
« Reply #1 on: August 01, 2006, 04:21:05 AM »
Can I see your feed?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline bigwave

  • Newbie
  • *
  • Posts: 36
  • stuck on the North Shore of Maui
    • View Profile
    • Maui Tropica
Re: invalid xml error
« Reply #2 on: August 01, 2006, 04:49:12 AM »
Hello Mr. V@no,

This is a test site to see if I could get your sitemap running in 1.73 because that's the thing that made me commit to 4images:

http://www.maui-tropica.com/maui-tropica-gallery1/rss.php?action=images

I was really supprised that the CAPTCHA thing is working--my php info say that GD Version is only(2.0.28 compatible)--the rss would be a bonus.

Aloha,

Brian


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: invalid xml error
« Reply #3 on: August 01, 2006, 11:04:48 AM »
Well, there are no errors on your test site...the feed passes validation at:
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.maui-tropica.com%2Fmaui-tropica-gallery1%2Frss.php%3Faction%3Dimages
So, perhaps if you could reproduce the error so we could work with it... ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline bigwave

  • Newbie
  • *
  • Posts: 36
  • stuck on the North Shore of Maui
    • View Profile
    • Maui Tropica
Re: invalid xml error
« Reply #4 on: August 03, 2006, 05:46:22 AM »
Yeah, you're right--I took off the old and redid it and it worked first time and try as I might I couldn't break it.  Don't know what I did originally.  Thanks for the help and sorry to bother you.

Aloha,

Brian

Offline tdkpaul

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: invalid xml error
« Reply #5 on: August 03, 2006, 05:19:08 PM »
i found out another problem with invalid XML Feeds on my gallery just yesterday.

btw: i use 1.7.2


your image name must not contain ">" and "<", because the rss.php will think it is a tag and then your xml imight be invalid.

it should be also concern to the image description.

So, never use tags for imagename !

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: invalid xml error
« Reply #6 on: August 03, 2006, 07:59:53 PM »
Do you use rss from v1.7.3? if not, then its the mod you are using problem. in v1.7.3 this is takken care of.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline tdkpaul

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: invalid xml error
« Reply #7 on: August 04, 2006, 12:22:29 PM »
Do you use rss from v1.7.3? if not, then its the mod you are using problem. in v1.7.3 this is takken care of.
i use the rss mod for 4images 1.7.2

probably everybody is using for 4images 1.7.2.

I only want to warn the users. They might get the same problems without knowing what is the problem.
Because some users of my site has uploaded images which names contain tags. Then the feed is xml invalid and no rss reader is able to read it.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: invalid xml error
« Reply #8 on: August 04, 2006, 07:48:26 PM »
Well, then you do it in the wrong place ;) warn them under the MOD's topic ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)