Page 1 of 1

RSS feed from News module

Posted: Tue Feb 15, 2005 4:03 pm
by 100rk
Hi all,
do anybody knows, how to force module News send header

Code: Select all

header('Content-type: text/xml');
properly? I mean - if I click on my RSS (XML) button, i will allways receive page with text/html content type... Try it and check page info in Your browser. Because of this bug some RSS readers cannot work properly and returns error...
PHP function void header ( string string [, bool replace [, int http_response_code]] ) has parameter 'replace' with default value 'true', but it doesn't works...

Or - error will be in another place of code - I was change file /moduleinterface.php -
lines

Code: Select all

header("Content-Language: " . $current_language);
header("Content-Type: text/html; charset=" . get_encoding());
I was move right after include file 'include.php' at beginning of script, but ALL my news with í things caused in browser this error:
XML Parsing Error: undefined entity. Maybe those HTML characters are not allowed in XML document? They was converted by TinyMCE from national characters - how can i turn off this feature of TinyMCE?
Cheers, 100rk.

RSS feed from News module

Posted: Tue Feb 15, 2005 5:27 pm
by Ted
I fixed the content-type issues. There is now a $gCms->variables['content-type'] that defaults to 'text/html'. A module can override that if they like and it will use something else. Solves the rss problem nicely.

As for the TinyMCE problems, I'm not totally sure. I don't use it, myself.

Re: RSS feed from News module

Posted: Wed Jun 01, 2005 6:40 pm
by Alex_Leipzig
How do I make the RSS button show in News 2.0 under beta3 - in the templates? How?

With the ordinary News-tag, I get an error message:
Warning: Wrong parameter count for array_merge() in /data/homewww/isuew/webdir/cms/modules/News/News.module.php on line 402

Warning: Invalid argument supplied for foreach() in /data/homewww/isuew/webdir/cms/lib/classes/class.module.inc.php on line 1297

Re: RSS feed from News module

Posted: Wed Jun 01, 2005 6:54 pm
by Ted
Quick fix for this is get rid of the array_merge part

Code: Select all

$params = array("showtemplate"=>"false");
That's what I get for cutting and pasting.  I'd commit a fix, but I'm in the middle of trying to get an rss feed meta tag to show up in the header and it's currently breaking the module...

Re: RSS feed from News module

Posted: Wed Jun 01, 2005 7:07 pm
by Alex_Leipzig
OK, the XML button is there, but the news items are gone...
And the feed seems to invalid: "XML interpretation failed: syntax error (line: 1, character: 48)"

Re: RSS feed from News module

Posted: Wed Jun 01, 2005 7:09 pm
by Ted
Hmm.  That's weird.  I ran it through an RSS validator after it was finish and it went through fine.

Re: RSS feed from News module

Posted: Fri Sep 09, 2005 11:33 am
by Vsmash
I think the problems here are (again) the html-entyties.
Not every(on some systems none) news-reader knows what a ü is  but the WYSIWYG-editor is translating it. Therefore a syntax error is given here.
Got the same problem in  0.10 "Antigua".

short said:the xml is valid, but the reader doesnt understand the entities.

just a thought .. could be right could be wrong.


(i apologize for bad language, i am a little bit in a hurry at the moment.)