Hello.

I test aggregator2 and leech modules. I see, that not all rss-feed loaded correctly.

I have a partner feed (http://votpusk.ru/news.xml). This feed not contain error (IE7. firefox. opera etc - worked with this. Also practically all rssvalidator says, that - no error in this feed.

But used in your module(leech) code tell me - "Error while checking URL: 0, " (Also as aggregator2 in my another drupal 4.7.6 site)

What is a problem?

CommentFileSizeAuthor
#7 leech1.jpg35.55 KBtoologic

Comments

alex_b’s picture

Category: support » bug

Same problem here, http://votpusk.ru/news.xml seems not to work.

Will White’s picture

W3C Feed validator says its too long to validate.
http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fvotpusk.ru%2Fnew...

I'm not getting that error but I wonder if the size of the feed is causing it.

aron novak’s picture

Assigned: Unassigned » aron novak

The size of the feed is not important. The issue is that this feed uses windows-1251 encoding instead of UTF-8. When I convert this news.xml to UTF-8 and upload somewhere and try to insert the new feed into leech, it worked perfectly. The parser don't use mb_ functions of PHP in order to handle these "exotic" encodings.
Basically the concept of UTF-8 is to eliminate this chaos of encoding. Is it worth to implement a solution into leech to handle this situation of non-UTF-8 + "exotic" charset? I think it have to be pretty rare because of every serious website use UTF-8 in case of nation characters (like Hungarian, Russian, etc)

alex_b’s picture

Title: Error while load rss-feed. » Error parsing a windows-1251 encoded feed
Status: Active » Postponed

I'd say let's see how many of those feeds are out there. Any ideas on what program produced that feed? Is there a way to contact the web admin of the website?

toologic’s picture

There are dozen thousands feeds encoding in windows-1251.

I think that your module must reed feed any codepage. As example - any desktop feedreaders can do it.

aron novak’s picture

Status: Postponed » Fixed

"any desktop feedreaders can do it" - yes, you are right. But you mentioned aggregator2 not surprisingly failed with this feed... It's PHP-related problem. But I committed a patch into the CVS. At my environment it handles the problem fully. Please tell me your experiences with it!

toologic’s picture

StatusFileSize
new35.55 KB

Test results...
1. After enter leech url (see above) i see message -

Fatal error: Call to undefined function: mb_check_encoding() in c:\www\test2\modules\leech\leech.module on line 2059

Note: i have mb_string module correctly installed.

Please see attached screenshot

aron novak’s picture

Please see this:http://hu2.php.net/manual/en/function.mb-check-encoding.php
If you have an old PHP version this function is not available.
I made a quick fix in order to not brake the site w/ an older PHP version. You find it at the latest CVS rev. of DRUPAL-5.
If you have a recent version, please read trough this: http://hu2.php.net/manual/en/ref.mbstring.php#49544

toologic’s picture

sorry Aaron!

mea culpa

I do upgrade my PHP under 4.4.5 and Apache 1.3.37. And all stay ok!

Excuze me for my previous post!
Andrew

toologic’s picture

Step 2.
I create feed-source with these url. And i run proccess - "leech data now". Wait a few seconds(minutes) and crash

Fatal error: Maximum execution time of 60 seconds exceeded in c:\www\test2\modules\leech\leech.module on line 2288

I close page and open again. I see:

warning: Illegal offset type in c:\www\test2\modules\taxonomy\taxonomy.module on line 1150. 
warning: Illegal offset type in c:\www\test2\modules\taxonomy\taxonomy.module on line 1151. 
warning: Illegal offset type in c:\www\test2\modules\taxonomy\taxonomy.module on line 1154.

Repeated so many times, as feed items loaded (20).

What is it?
Also I have a few futures request. If you want i send it in PM.

aron novak’s picture

Have you turned on leech_yahoo_terms module too? Let me know that is it turned on or not! And try it out with leech_yahoo_terms module turned off.

toologic’s picture

leech_yahoo_terms turned off

I have node type - story with 2 vocaburaries (Fisrt - single-choice, second-multichoice) used as node template for leech.

aron novak’s picture

Fatal error: Maximum execution time of 60 seconds exceeded in c:\www\test2\modules\leech\leech.module on line 2288

To avoid this please make sure that at admin/settings/leech Advanced settings/Sleep time is set to zero. This is the most likely reason for PHP to run into this limit.

aron novak’s picture

Status: Fixed » Closed (fixed)
toologic’s picture

Aron, sorry.

As I write above after leech feed i have a massive quantity of error messages.

warning: Illegal offset type in c:\www\test2\modules\taxonomy\taxonomy.module on line 1150. 
warning: Illegal offset type in c:\www\test2\modules\taxonomy\taxonomy.module on line 1151. 
warning: Illegal offset type in c:\www\test2\modules\taxonomy\taxonomy.module on line 1154.

And "leeched" node have the first value (first term) in each vocabularies assigned to nodes.
If my vocabularies not contain term from feed.items - lets it will be default values that I sets in "template for leech"

Please, lets solve this problem