RSS feed from News module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
100rk

RSS feed from News module

Post 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.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

RSS feed from News module

Post 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.
Alex_Leipzig

Re: RSS feed from News module

Post 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
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: RSS feed from News module

Post 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...
Alex_Leipzig

Re: RSS feed from News module

Post 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)"
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: RSS feed from News module

Post by Ted »

Hmm.  That's weird.  I ran it through an RSS validator after it was finish and it went through fine.
Vsmash

Re: RSS feed from News module

Post 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.)
Locked

Return to “Modules/Add-Ons”