PDA

View Full Version : rss problem


flavenne
05-29-2005, 05:14 PM
Hello,

Could anyone please take a look at my RSS feed:

http://spicy.negimaki.com/index.php?x=rss

Why do I get the error? What shall I fix?
Thank you very much for the help.

Connie
05-29-2005, 05:33 PM
Flavenne,

in those problematic cases it is always good to use FireFox for analysis; he shows that you have wrong characters and when I look into the source of your page I see strange things:

<item>
<title>Ritz Lion</title>
<link>http://spicy.negimaki.com/?showimage=41</link>
<description><img src="http://spicy.negimaki.com/thumbnails/thumb_20050528013447_ritzlion.jpg" align="right"> The lion statue at Ritz Carlton Hotel & Resorts, Bali, Indonesia. December 2003.</description>

<pubDate>Sat, 28 May 2005 01:34 +0700</pubDate>
</item>
XML-Verarbeitungsfehler: nicht wohlgeformt
Adresse: http://spicy.negimaki.com/index.php?x=rss
Zeile Nr. 13, Spalte 184: <description><img src="http://spicy.negimaki.com/thumbnails/thumb_20050528013447_ritzlion.jpg" align="right"> The lion statue at Ritz Carlton Hotel & Resorts, Bali, Indonesia. December 2003.</description>
--------------------------------------------------------------------------------------------------

why the "<" are not interpreted?

1)
if you use PixelPost, the codepage should be set to UTF-8 and not to some ISO... please check the header of your template and change that

2)
the validator which you can call from FireFox gives a lot of warnings that you have "wrong" characters, because the UTF-8 which comes from the database does not fit to the ISO-code which you set in the header

3)
you use "&" in one text and that is, because of all these mismatches, not good..

please check if these hints help!

Good luck!

flavenne
05-29-2005, 07:21 PM
Thank you very much for your help, Connie!

I changed the codepage to UTF-8, and as a result, many of the characters in my site don't work:
© ›› ‹‹
Also, the RSS feed still gives me the same error.
I can't use "&" at all?

I guess I have to sacrifice the RSS feed to make the other things work. If there is no other way out.
Thanks a lot :)

Connie
05-29-2005, 08:51 PM
Flavenne,

one thing: yes, for the moment, you should not use the ampercant, &, in the text, some other people had the same experience

but now your RSS is working, I see it without errors in OPERA and FireFox, you must not give up RSS, it's working!

We had this problem with the &, which other characters did not work?
How did you enter these characters?

I am curious because I re-wrote that RSS-part to make it absolutely valid

and at http://rss.scripting.com/, you get the following result after validating:
Congratulations -- the RSS feed validates! You may include the following logo text into your page if you want to express your support for RSS.

if your browser gives you the sam error again and again, just clear the cache and try again.

so everything is 99,9% ok :lol:

flavenne
05-29-2005, 09:08 PM
Finally, after pondering for a while, I changed some of the chars:

Instead of ››, I used "»"
Instead of ‹‹, I used "«"
Instead of ©, I used "©"

I'm used to just write the chars instead of "&something;" in the html file.

The problem left is the ampersand.. I'm very used to writing "&" in the text >_<

Anyway, I changed the "&" in the text of each photos. Luckily there weren't many of them. I hope I can remember not to use & anymore.

Again, thanks for the help, Connie! It's very helpful indeed.

Joe[y]
05-30-2005, 10:32 AM
& can be replaced with & (for ampersand!)

Connie
05-30-2005, 11:40 AM
flavenne,

I checked it out and found a way, I ask you to try it at your site.

It works at http://www.hafenfotografen.de/pixelpost1 and I tested it with different browsers and feedreaders and it is clean code! It validates in www.feedvalidator.org as valid code.
We will add this to the next update, for sure
Normally, I do not like to suggest to edit the php-files , to hack them, but as you are so desperate, here is the way:

open the index.php near to
// ################################################## ##########################//
// RSS 2.0 FEED
//################################################## ###################################//

find this line:
<description><img src="$image" align="right"> $body</description>

and replace it with that:
<description>
<![CDATA[
<img src='$image' /><br />$headline<br />$body]]></description>


all your special characters will be ok, please report the result!

flavenne
05-31-2005, 03:11 PM
Connie,

Do I put the charset to utf-8 or iso-8859-1 in the image_template.html?
I changed the index.php as you directed, but with the charset utf-8, it still gave me that weird ? character (the browser doesn't recognize the chars).
So that means I have to put the charset to some iso, right?

Thanks for the help!

Connie
05-31-2005, 03:32 PM
Flavenne,

no, not at all, no iso- anymore.
We deliver UTF-8 to the database, we read UTF-8 from the database and we deliver text in the templates with that charset

it should be <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> in all the templates

could you please check your browser-settings?
which encoding is set there? automatic? UTF-8? something else?
which browser do you use?

please test <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> with correct browser-settings

flavenne
05-31-2005, 05:51 PM
My browser is Firefox 1.0.4.
My encoding is set automatic.
I have put charset=utf-8.
The chars all work on the RSS feed (those inside the "<IMAGE_NOTES>").

However, I still have to write "»" instead of "››" (and other chars, such as ‹‹ and ©) on any part of the image_template.html, because the charset is utf-8.

But it's okay. At least the RSS feed doesn't give me errors anymore.

Thanks a lot, Connie!


Joe[y], I don't like writing "&" for image description. It's too bothersome to write it that way everytime.

Joe[y]
05-31-2005, 06:19 PM
Joe[y], I don't like writing "&" for image description. It's too bothersome to write it that way everytime.

i agree - it's only intended as a temporary solution until there's a good, solid workaround we can release.

flavenne
05-31-2005, 07:08 PM
Thanks to Connie:
her RSS feed modification in the index.php has solved the problem permanently :)

Connie
05-31-2005, 07:15 PM
Oh I am so glad.

thanks for your patience, flavenne!

flavenne
10-04-2005, 09:29 AM
Connie,

Does your modification work with pixelpost 1.4.2 as well?
Because I'm getting the same error again with rss at my site: http://spicy.negimaki.com
I already put your modification there, but it still gave me the same error.
Please help?
Thank you so much :)

Joe[y]
10-04-2005, 03:57 PM
Connie,

Does your modification work with pixelpost 1.4.2 as well?
Because I'm getting the same error again with rss at my site: http://spicy.negimaki.com
I already put your modification there, but it still gave me the same error.
Please help?
Thank you so much :)


<br />An answer to the Photo Friday Challenge: Divine.]]></description>
--------------------------------------------------------------^

you need to remove the > from that.