Page 25 of 40

Re: [RC] RSS Input

Posted: Mon Dec 13, 2010 6:22 pm
by PoPoutdoor
@Neuropass, bug fix related to force recode

Edit includes/rss_parser.php

Find

Code: Select all

		// Determine encoding from xml
		if (!preg_match('/encoding=["\'](.*?)["\']/', $xml, $match))
		{
			if (empty($recode))
			{
				$this->error_msg = sprintf($user->lang['NO_ENCODINGS'], $url);
				return false;
			}
			// Try to add the XML tag if missing encoding info
			$xml = preg_replace('#<\?xml\s(?:[^>]*)\?>#is', '<?xml version="1.0" encoding="' . $recode . '"?>', $xml);
		}

		// override source encoding
		if (!empty($recode))
		{
			$xml = str_replace($match[1], $recode, $xml);
			$encoding = $recode;
		}
		else
		{
			$encoding = strtolower($match[1]);
		}
Replaced with

Code: Select all

		// Determine encoding from xml
		if (!preg_match('/encoding=["\'](.*?)["\']/', $xml, $match))
		{
			if (empty($recode))
			{
				$this->error_msg = sprintf($user->lang['NO_ENCODINGS'], $url);
				return false;
			}

			// Patch xml header with $recode 
			$xml = preg_replace('#<\?xml\s(?:[^>]*)\?>#is', '<?xml version="1.0" encoding="' . $recode . '"?>', $xml);
			$encoding = $recode;
		}
		else
		{
			// override source encoding
			if (!empty($recode))
			{
				// Patch xml header with $recode 
				$xml = str_replace($match[1], $recode, $xml);
				$encoding = $recode;
			}
			else
			{
				$encoding = strtolower($match[1]);
			}
		}

Re: [RC] RSS Input

Posted: Tue Dec 14, 2010 6:08 pm
by Neuropass
Thanks ,
But it seems that there is still something wrong.

Ok, applied your fix above and i ran two test with this feed :

Code: Select all

http://www.gamespot.com/rss/game_updates.php?platform=1024&type=5
1. test with no encoding selected i got this message and no feed were imported:

http://i56.tinypic.com/25ul2fl.png


2.test with the encoding you suggested which is: iso8859-1

http://i52.tinypic.com/2zdu6qa.png

and i got this error, but the feed were imported successfully when i checked the forum:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 2615: Undefined index: forum_name
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 2615: Undefined index: forum_name
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 2615: Undefined index: forum_name
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 2615: Undefined index: forum_name
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 2615: Undefined index: forum_name

Warning: Cannot modify header information - headers already sent by (output started at /hermes/web09/b1687/moo.newageos/test/includes/functions.php:3706) in /hermes/web09/b1687/moo.newageos/test/adm/index.php on line 155

Warning: Cannot modify header information - headers already sent by (output started at /hermes/web09/b1687/moo.newageos/test/includes/functions.php:3706) in /hermes/web09/b1687/moo.newageos/test/adm/index.php on line 157

Warning: Cannot modify header information - headers already sent by (output started at /hermes/web09/b1687/moo.newageos/test/includes/functions.php:3706) in /hermes/web09/b1687/moo.newageos/test/adm/index.php on line 158

Warning: Cannot modify header information - headers already sent by (output started at /hermes/web09/b1687/moo.newageos/test/includes/functions.php:3706) in /hermes/web09/b1687/moo.newageos/test/adm/index.php on line 159

What do you think about it? am i doing something wrong?

Re: [RC] RSS Input

Posted: Tue Dec 14, 2010 7:48 pm
by PoPoutdoor
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 2615: Undefined index: forum_name
This is a bug I'm working on after switching to 3.0.8, RC3 will be out within an hour.

Re: [RC] RSS Input

Posted: Tue Dec 14, 2010 8:00 pm
by Neuropass
thanks PoPoutdoor i can't wait for it..

Re: [RC] RSS Input

Posted: Thu Dec 16, 2010 2:30 am
by Neuropass
Thanks for the new update, everything seems to be working now..

There is only one thing that i'm not sure about.

I currently have set the feed with the "daily" option, but no feed gets posted..
what do you think about it?

Re: [RC] RSS Input

Posted: Thu Dec 16, 2010 9:54 am
by PoPoutdoor
You are talking about the 'Post Mode' ACP setting, and this setting is NOT for the setting scheduled jobs for automatic import.

Please read post #2: Customize -> 1. Schedule auto posting for timed feed import

Re: [RC] RSS Input

Posted: Thu Dec 16, 2010 6:59 pm
by ibraronaldo
Thanks works fine, except that there is no way to set up separate threads? Instead of viewing them all together?

Re: [RC] RSS Input

Posted: Fri Dec 17, 2010 2:27 am
by Neuropass
ibraronaldo wrote:Thanks works fine, except that there is no way to set up separate threads? Instead of viewing them all together?

You need to select "item" from the feed setting for that... You can select also the number of topics..

Re: [RC] RSS Input

Posted: Mon Dec 20, 2010 5:23 pm
by Neuropass
Will you consider an option in the ACP for timing feed import?

My server doesn't have crontabs option... :cry:

Re: [RC] RSS Input

Posted: Tue Dec 21, 2010 3:21 pm
by Flowgrow
Hi,

thanks a lot for this great Addon.

I have a small error while using it with a feed mod for Joomla (Ninja RSS Syndicator). The RSS Feed is valid:

http://validator.w3.org/feed/check.cgi? ... rmat%3Draw

But when I try to import it I get this error:
[Flowgrow Aquascaping News] XML error: XML_ERR_NAME_REQUIRED at line 90 column 231 byte 5692. URI: http://aquascaping.flowgrow.de/index.ph ... format=raw
I have no Idea why this is happening. The normal Joomla Feed is working absolutely fine and gets imported. Would love to use the RSS Mod for Joomla due to it's additional features.

http://aquascaping.flowgrow.de/aquascap ... d&type=rss

Best regards
Tobi

Re: [RC] RSS Input

Posted: Wed Dec 22, 2010 8:34 am
by PoPoutdoor
Google search have this ;)
XML_ERR_NAME_REQUIRED

This seems to only happen when there is a '&' character in my XML file
This most likely the source issue.

Re: [RC] RSS Input

Posted: Wed Dec 22, 2010 8:38 am
by Flowgrow
Hi,

:oops: thanks for the info ;). Should have used google by myself ;).

Best regards
Tobi

Re: [RC] RSS Input

Posted: Wed Dec 22, 2010 2:07 pm
by Flowgrow
Hi again,

one other question....

Both feeds to have CDATA and "&" but only one gets imported. Both are valid RSS feeds regarding the validator. Could the problem be with this Mod or has it to be with the feed itself?

Code: Select all

http://aquascaping.flowgrow.de/aquascaping-news?format=feed&type=rss

http://aquascaping.flowgrow.de/index.php?option=com_ninjarsssyndicator&feed_id=1&format=raw
First one is working and will be imported by your Mod and the second one gives the XML Error.

Best regards
Tobi

Re: [RC] RSS Input

Posted: Wed Dec 22, 2010 6:11 pm
by PoPoutdoor
The xml parser code never see error "XML_ERR_NAME_REQUIRED" from day 1.

I checked the source xml without any hints, and google give what the possible cause in last post.

BTW, the validator only check source xml compliance, not sure if this a php xml_parser bug.

Re: [RC] RSS Input

Posted: Wed Dec 22, 2010 6:36 pm
by Flowgrow
Hi,

thanks for your efforts. Due to this I'll stick with the feed Joomla has on board and customize the feed output by myself.

Best regards
Tobi