Help talk:Feed format

From semantic-mediawiki.org
(Redirected from Help talk:Feed format)

Talk pages on this wiki should primarily be used to address possible mistakes as well as missing and superseded information in the documentation.
In case you are seeking support concerning individual questions, please have a look at this page. The Semantic MediaWiki user mailing list is always a good idea for seeking help.

These discussions were held with LiquidThreads. Each post's history is on its old Thread page, which now redirects here (list).

RSS/Atom output and HTML tag support

It's probably useful that the display of page content is made optional through page=none/full, but this change introduced a major regression I'm afraid. Page content is no longer rendered and what you get instead is a lot of HTML code. Example: RSS feed example (Now the same goes for format=rss)

Maybe we should leave out this option from the documentation until this bug has been fixed? Cavila (talk) 10:34, 3 February 2013 (UTC)

There is no regression.
This is as it supposed to be because that is what a normal feed program will understand and display. If you are unsure about the HTML tag support in RSS/Atom, please read [1] /[2] also if you look at [3] you can see that the SMW RSS/Atom feed has the same form and output as all other Mediawiki RSS/Atom outputs.
[1] https://tools.ietf.org/html/rfc4287#section-1.1
[2] http://cyber.law.harvard.edu/rss/encodingDescriptions.html
[3] http://www.mediawiki.org/w/index.php?title=Special:RecentChanges&feed=rss James Hong Kong (talk) 11:08, 3 February 2013 (UTC)

Also if you look in how the ask query is designed on the main page (your cited example) you could see the difference in why the output for RSS and Atom is different because the query is different.

{{#ask:[[News date::+]] [[language code::en]]
| sort=news date
| order=desc
| format=feed
| searchlabel=RSS
| title=Semantic MediaWiki – news
| description=Latest news from semantic-mediawiki.org
}} · {{#ask:[[News date::+]] [[language code::en]]
| sort=news date
| order=desc
| format=feed
| type=atom
| page=full
| searchlabel=Atom
| title=Semantic MediaWiki – news
| description=Latest news from semantic-mediawiki.org
}}

James Hong Kong (talk) 11:23, 3 February 2013 (UTC)

Actually, I used to use Google Reader for this (not the web browser directly), but apparently, Google does not support raw RSS outputs, at least not by default - it's quite possible that I've overlooked a setting or Google Reader is simply not the right tool for the job. Cavila (talk) 16:37, 4 February 2013 (UTC)
The same link now gives a perfectly readable page. It must be something in my browser settings (like a news reader I'm not aware of) or Google Reader, I guess. Cavila (talk) 11:39, 1 March 2013 (UTC)
Hi, I encountered the same encoding problem.
On the Feed on SMW site < is displayed correctly meanwhile calling the
Feed on my site the < is changed to &lt; and is thus not rendered by the browser / feed reader.
Source Page my site
Source Page SMW
I already changed language settings / SMW versions. Any help?? Kaboomki (talk) Kaboomki (talk) 15:27, 9 August 2013 (UTC)
I'm guessing you are using SMW 1.8.0.5 while smw.org already uses SMW 1.9. Either you wait until 1.9 is officially released or you use the git master to get access to the updated FeedResultPrinter class. James Hong Kong (talk) 21:15, 9 August 2013 (UTC)
Thanks! I updated to SMW 1.9. See https://docupedia.de/zg/Spezial:Version
However the issue with parameter page=full is still there.
my feed
Source Page
Is it necessary to update MW too? Best (talk) Kaboomki (talk) 14:00, 12 August 2013 (UTC)

When looking at Spezial:Version it shows SMW 1.9 but somehow I got the feeling it is an older version of SMW 1.9.

The ensure you use the current master you should use git clone https://git.wikimedia.org/git/mediawiki/extensions/SemanticMediaWiki.git

You can verify that you have the latest by looking at includes/queryprinters/FeedResultPrinter.php line 281 which should only contain

return FeedItem::stripComment( implode( ',', $items ) ) .
	FeedItem::stripComment( $pageContent );

If you can confirm that this the SMW version you are using then MW might be the next path to look into. James Hong Kong (talk) 01:44, 13 August 2013 (UTC)

I just added a test case [1] that verifies that a text like "A&O Berlin" will output "A&O Berlin" for the current SMW 1.9 master.
[1] https://gerrit.wikimedia.org/r/#/c/78931/1/tests/phpunit/includes/queryprinters/FeedResultPrinterTest.php James Hong Kong (talk) 02:37, 13 August 2013 (UTC)
Aside from the SMW version and not related to the above issue it seems you are using 1.19.2 where its commendable to at least use MW 1.19.7 as unit tests deployed with SMW 1.9 (current master) are tested against MW 1.19.7, 1.21, and 1.22. James Hong Kong (talk) 02:54, 13 August 2013 (UTC)
Your were right. I selected a wrong branch. Now I upgraded my testserver to SMW 1.9 and the RSS printer fullpage option worked well. I will wait until 1.9 is released officially before I update the live system (linked above). Thank You! Kaboomki (talk) 11:47, 13 August 2013 (UTC)

Feed format with RSS type does not display images

Hello there,

For the last few days I have been trying to find a way to display an image via an ASK query without any success. I’ve noticed that the Feed format parameters do not include a field that would be able to hold an image.

I am trying to populate a feed format with type RSS that will also display images.

Would anybody know a way around this problem please?

Many thanks in advance

Pan Pan (talk) 07:57, 27 February 2013 (UTC)

Images are not parsed (by design) to be explicitly linked as resources and only displayed as potential wiki links. Of course if you need an image display, you are free to copy the resource file create your own result printer and parse images as needed. James Hong Kong (talk) 15:22, 28 February 2013 (UTC)
Hello MWJames,
Would this mean that I would have to create different version of the "SMWResultPrinter" class which I found in the file called "SMW_ResultPrinter.php"?
Many thanks again Pan (talk) 14:53, 20 March 2013 (UTC)
SMWResultPrinter (SMW\ResultPrinter in SMW 1.9) is an abstract class which can't be used directly as a template. If at all you should have a look at SMW\FeedResultPrinter (class in SMW 1.9), it is a final class which means you can't use inheritance, you just have to copy the class and change what ever it is you are looking for. James Hong Kong (talk) 12:53, 21 March 2013 (UTC)

RSS feed is not working on Internet Explorer

Hello there,

I’ve just noticed that the feed format is not working on Internet Explorer, even the “RSS feed example“ of this page is not working. It works fine on Mozilla Firefox, which I have been using for testing so far, but not on Explorer.

Would anyone please be able to help me?

Many thanks Pan (talk) 10:24, 28 February 2013 (UTC)

This seems ought because I just checked with IE 7/9 and there seems to be no problem for the listed examples. Further the output is generated in a similar fashion (using the same methods) as Changes which also does not suggest that the display is browser dependent. James Hong Kong (talk) 15:15, 28 February 2013 (UTC)
Hello MWJames,
First of all thanks for replying to my post. I have now uploaded a screen shot of a IE8 browser that is displaying the Changes link that you have mentioned on your above reply.
This is how all of the feed format pages from the ASK query with type RSS look like on all of the IE8 browsers. On Firefox everything seem to be displayed fine however with no problems.
Any ideas on this one?
Many thanks Pan (talk) 08:55, 21 March 2013 (UTC)
Well, I don't know (I'm not a IE user and I'm not planning to be one) but as long as the W3C validates[1] the RSS feed output as "well-formed XML", it also declares that the output abides the official W3C standard.
[1] W3C.org feed validation James Hong Kong (talk) 12:39, 21 March 2013 (UTC)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.