Ideas for a new serendipity plugins!

Creating and modifying plugins.
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

okay, I've found the faults in this feed...
I'll fix this soon, thanks for the hint
Alexander Mieland, dma147
http://blog.linux-stats.org
bpkri
Regular
Posts: 41
Joined: Tue Aug 09, 2005 2:31 pm

Post by bpkri »

If it's wrong there, it's probably also wrong in the atom 1.0 feed (but I can't figure out the correct parameters for that one... need to look at the source, I fear).
Does the rss feed validate correctly on feedvalidator.org? :)

At the moment I deactivated the plugin, but I am really eager to use it again as soon as it's fixed again.

By the way: i don't know why I wasn't logged in all the time before... :/
In any case: many, many thanks for all the hassle you go through for us. :) You're doing good work there.

And ofcourse you were right. I meant a leading slash :)
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

Okay... now this is fixed too... ;)

You can find the fixed version 1.3-r3 here:
http://blog.linux-stats.org/index.php?s ... thiscat=75

btw. I don't have any hassle with you... I also want that it runs perfectly... ;)
Alexander Mieland, dma147
http://blog.linux-stats.org
bpkri
Regular
Posts: 41
Joined: Tue Aug 09, 2005 2:31 pm

Post by bpkri »

*giggle* small mistake discovered:
your plugin reports the wrong version.
-r2, where it should report -r3

Nothing too bad. :) already fixed that.

And one more thing, this one's important:
somehow using your plugin causes the feed to change its reported mime-type from application/atom+xml to "text/html; charset=UTF-8"

It must have to do with the plugin, since without it the feedvalidator ( http://www.feedvalidator.org ) does not complain about this detail.

The same is true for the RSS feed. The header information somehow is wrong.

And I somehow get the feeling it does something different when inserting the image into the rss feed. Probably entites are not escaped. Will have to take a closer look again, though. Not a problem, it seems, just a difference to links you insert by hand.

The good news is, however, that the feed is now well-formed. :)
Last edited by bpkri on Mon Sep 26, 2005 1:09 am, edited 1 time in total.
Operator

Post by Operator »

Guess what, it's me again, with the same errors. I made some screens for you to make it easier to understand :wink:

Image

Here you can see what happens to special characters and to the picture when style=fancy. In addition, the thumbnails don't work anymore.

Image

This is my current configuration.

Hope this helps! :)


Mark
Wizard
Regular
Posts: 103
Joined: Sat Aug 13, 2005 7:18 am
Location: Southern California
Contact:

RSS Feed

Post by Wizard »

How about a plugin for RSS feeds similar to the one that Sebastian Nohn wrote for the Administrative screen.
Display RSS-Feed in Backend Overview
Displays a RSS feed on the overview page (right after login) to the administration interface
Author: Sebastian Nohn; version: 1.0
This could show up as an entry plugin right before entries or user definable. Probably you would want it to show only in the home page, not categories or static entries.
Wizard
My WeBlog
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

bpkri wrote:[...]
And one more thing, this one's important:
somehow using your plugin causes the feed to change its reported mime-type from application/atom+xml to "text/html; charset=UTF-8"

It must have to do with the plugin, since without it the feedvalidator ( http://www.feedvalidator.org ) does not complain about this detail.

The same is true for the RSS feed. The header information somehow is wrong.
I really don't have any ideas where the fault for this could be... :(
The plugin doesn't set the charset.

Maybe garvin has an answer for this?
And I somehow get the feeling it does something different when inserting the image into the rss feed. Probably entites are not escaped. Will have to take a closer look again, though. Not a problem, it seems, just a difference to links you insert by hand.[...]
what differences do you mean? I can't find any differences between the images in my entry and the images in the feeds...?
Last edited by dma147 on Mon Sep 26, 2005 11:47 am, edited 1 time in total.
Alexander Mieland, dma147
http://blog.linux-stats.org
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

Operator wrote:Guess what, it's me again, with the same errors. I made some screens for you to make it easier to understand :wink:

[much too big image]

Here you can see what happens to special characters and to the picture when style=fancy. In addition, the thumbnails don't work anymore.

[again much too big picture]
because the plugin seems to set the wrong charset (see last post above) for UTF-8, which can't display german umlauts and similar, this is the reason for your umlauts-problem.
But as I've said, I really don't know, why it uses utf-8 here, because the plugin doesn't set this.

The same for style=fancy and the thumbnails... I really don't have any ideas, why this doesn't work (only) for you... :(
Alexander Mieland, dma147
http://blog.linux-stats.org
bpkri
Regular
Posts: 41
Joined: Tue Aug 09, 2005 2:31 pm

Post by bpkri »

dma147 wrote:
I really don't have and ideas where the fault for this could be... :(
The plugin doesn't set the charset.

Maybe garvin has an answer for this?
Not really the charset is the problem here. The problem is the content-type. I also didn't find any hint as to why the Content-Type is different when the plugin is used, to when it's not used.

By the way, it seems I also wasn't entirely right, as to the content-type usually used. I think it is text/xml as opposed to text/html.
And I somehow get the feeling it does something different when inserting the image into the rss feed. Probably entites are not escaped. Will have to take a closer look again, though. Not a problem, it seems, just a difference to links you insert by hand.[...]
what differences do you mean? I can't find any differences between the images in my entry and the images in the feeds...?
Errm... I do not know WHAT I thought I had seen there, but obviously my eyes betrayed me. Everything seems to eb allright there.
Only issue left from my side is the Content-Type. Help ;)
Last edited by bpkri on Mon Sep 26, 2005 1:15 pm, edited 1 time in total.
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

dma147 wrote:
Operator wrote:Guess what, it's me again, with the same errors. I made some screens for you to make it easier to understand :wink:

[much too big image]

Here you can see what happens to special characters and to the picture when style=fancy. In addition, the thumbnails don't work anymore.

[again much too big picture]
because the plugin seems to set the wrong charset (see last post above) for UTF-8, which can't display german umlauts and similar, this is the reason for your umlauts-problem.
But as I've said, I really don't know, why it uses utf-8 here, because the plugin doesn't set this.

The same for style=fancy and the thumbnails... I really don't have any ideas, why this doesn't work (only) for you... :(
@Operator: Btw. as you can see here:
http://blog.linux-stats.org/archives/40 ... again.html
There are really no problem with special characters like german umlauts or similar...

So I really don't think, that this has something to do with the plugin... because I also use the same plugin...
Alexander Mieland, dma147
http://blog.linux-stats.org
bpkri
Regular
Posts: 41
Joined: Tue Aug 09, 2005 2:31 pm

Post by bpkri »

Oh wow!

more information:

The results are quite dofferent if I call
http://my.blog.url/feeds/atom03.xml

and

http://my.blog.url/feeds/rss.php?version=atom0.3

In the first case the content-type is wrong (changed to text/html).

If however I call rss.php with parameters, the content-type is done correctly.

Maybe this information helps.

By the way:
I noticed one more thing:
If you accidently insert quotes into the caption parameter of the GImage tag (like this: [GImage caption="blah blubb"]... ) you also break your feed. It's not well formed anymore, because escaped quotes (like this: <img src="..." alt="\"...\""> get inserted.

I also should note that I am using s9y nightly builds, so I am already running the 0.9 line and not s9y 0.8x.
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

bpkri wrote:Oh wow!

more information:

The results are quite dofferent if I call
http://my.blog.url/feeds/atom03.xml

and

http://my.blog.url/feeds/rss.php?version=atom0.3

In the first case the content-type is wrong (changed to text/html).

If however I call rss.php with parameters, the content-type is done correctly.

Maybe this information helps.
I'm quiet sure, that this has nothing to do with the plugin...
By the way:
I noticed one more thing:
If you accidently insert quotes into the caption parameter of the GImage tag (like this: [GImage caption="blah blubb"]... ) you also break your feed. It's not well formed anymore, because escaped quotes (like this: <img src="..." alt=""...""> get inserted.

I also should note that I am using s9y nightly builds, so I am already running the 0.9 line and not s9y 0.8x.
Yeah, well quotes shouldn't be used. And as you've said, if someone "accidently insert quotes", then it will break the feed.
Quotes are not supposed to be used.

But I'll add something which replaces "accidently" inserted quotes... ;)
Alexander Mieland, dma147
http://blog.linux-stats.org
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

dma147 wrote:
dma147 wrote:
Operator wrote:Guess what, it's me again, with the same errors. I made some screens for you to make it easier to understand :wink:

[much too big image]

Here you can see what happens to special characters and to the picture when style=fancy. In addition, the thumbnails don't work anymore.

[again much too big picture]
because the plugin seems to set the wrong charset (see last post above) for UTF-8, which can't display german umlauts and similar, this is the reason for your umlauts-problem.
But as I've said, I really don't know, why it uses utf-8 here, because the plugin doesn't set this.

The same for style=fancy and the thumbnails... I really don't have any ideas, why this doesn't work (only) for you... :(
@Operator: Btw. as you can see here:
http://blog.linux-stats.org/archives/40 ... again.html
There are really no problem with special characters like german umlauts or similar...

So I really don't think, that this has something to do with the plugin... because I also use the same plugin...
@Operator: Ahhh... now I've the same thingy as you... the fancy-style is about 100% in size... I've played a little...
Okay, now I can try to fix this... ;)
Alexander Mieland, dma147
http://blog.linux-stats.org
bpkri
Regular
Posts: 41
Joined: Tue Aug 09, 2005 2:31 pm

Post by bpkri »

dma147 wrote:
.../feed url vs rss.php?...
I'm quiet sure, that this has nothing to do with the plugin...
You're right. Must be a combination of plugin behaviour with standard s9y behaviour. :/
At least I can produce a workaround now, by changing at least the feed autodiscovery link to a call to rss.php. Phew. Not too good, but I suppose that might work then.

So I can now only hope that someone from the s9y helps resolve this issue.
Yeah, well quotes shouldn't be used. And as you've said, if someone "accidently insert quotes", then it will break the feed.
Quotes are not supposed to be used.

But I'll add something which replaces "accidently" inserted quotes... ;)
Hehe, sorry. I work in quality assurance, so I am nearly bound to stumble over stuff like this, especially since using quotes for parameters isn't that uncommon.
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

dma147 wrote:
dma147 wrote:
dma147 wrote: because the plugin seems to set the wrong charset (see last post above) for UTF-8, which can't display german umlauts and similar, this is the reason for your umlauts-problem.
But as I've said, I really don't know, why it uses utf-8 here, because the plugin doesn't set this.

The same for style=fancy and the thumbnails... I really don't have any ideas, why this doesn't work (only) for you... :(
@Operator: Btw. as you can see here:
http://blog.linux-stats.org/archives/40 ... again.html
There are really no problem with special characters like german umlauts or similar...

So I really don't think, that this has something to do with the plugin... because I also use the same plugin...
@Operator: Ahhh... now I've the same thingy as you... the fancy-style is about 100% in size... I've played a little...
Okay, now I can try to fix this... ;)
@Operator: hummm... this was my own fault that I had the same behaviour as you... I've used "size=tumb" instead of "size=thumb".
Maybe this is the same reason for your broken fancy-style??
Alexander Mieland, dma147
http://blog.linux-stats.org
Post Reply