[RC][1.1.0-r2] FIND

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
Locked
User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [RC] RSS Input

Post 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]);
			}
		}
User avatar
Neuropass
Registered User
Posts: 1162
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: [RC] RSS Input

Post 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?
User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [RC] RSS Input

Post 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.
User avatar
Neuropass
Registered User
Posts: 1162
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: [RC] RSS Input

Post by Neuropass »

thanks PoPoutdoor i can't wait for it..
User avatar
Neuropass
Registered User
Posts: 1162
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: [RC] RSS Input

Post 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?
User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [RC] RSS Input

Post 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
User avatar
ibraronaldo
Registered User
Posts: 45
Joined: Fri Jul 16, 2010 11:11 am

Re: [RC] RSS Input

Post by ibraronaldo »

Thanks works fine, except that there is no way to set up separate threads? Instead of viewing them all together?
User avatar
Neuropass
Registered User
Posts: 1162
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: [RC] RSS Input

Post 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..
User avatar
Neuropass
Registered User
Posts: 1162
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: [RC] RSS Input

Post by Neuropass »

Will you consider an option in the ACP for timing feed import?

My server doesn't have crontabs option... :cry:
Flowgrow
Registered User
Posts: 12
Joined: Tue Dec 21, 2010 3:15 pm

Re: [RC] RSS Input

Post 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
User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [RC] RSS Input

Post 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.
Flowgrow
Registered User
Posts: 12
Joined: Tue Dec 21, 2010 3:15 pm

Re: [RC] RSS Input

Post by Flowgrow »

Hi,

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

Best regards
Tobi
Flowgrow
Registered User
Posts: 12
Joined: Tue Dec 21, 2010 3:15 pm

Re: [RC] RSS Input

Post 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
User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [RC] RSS Input

Post 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.
Flowgrow
Registered User
Posts: 12
Joined: Tue Dec 21, 2010 3:15 pm

Re: [RC] RSS Input

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

Return to “[3.0.x] MODs in Development”