I use the latest -dev, just using the default Feed content-type w/o touching any settings.
I'm trying to add this feed:
http://bugs.php.net/rss/bug.php?id=37675&format=rss

Got this:

Fatal error: Cannot use object of type stdClass as array in /var/www/html/drupal-6.14/sites/all/modules/feeds/feeds.module on line 260
Call Stack
#	Time	Memory	Function	Location
1	0.0001	99256	{main}( )	../index.php:0
2	0.2231	14710776	menu_execute_active_handler( )	../index.php:18
3	0.2259	14995392	call_user_func_array ( )	../menu.inc:348
4	0.2259	14995544	node_add( )	../menu.inc:0
5	0.2268	15016296	drupal_get_form( )	../node.pages.inc:58
6	0.2275	15098016	drupal_process_form( )	../form.inc:119
7	0.2366	15388072	drupal_validate_form( )	../form.inc:403
8	0.2366	15388200	_form_validate( )	../form.inc:584
9	0.2412	15421080	form_execute_handlers( )	../form.inc:719
10	0.2412	15421080	node_form_validate( )	../form.inc:774
11	0.2412	15421080	node_validate( )	../node.pages.inc:65
12	0.2420	15424336	node_invoke_nodeapi( )	../node.module:809
13	0.2427	15508992	feeds_nodeapi( )	../node.module:673
if (!isset($result->value['title']) || trim($result->value['title']) == '') {

Here feeds should simply check if ->value is really an array or something weird happened in the parser.

Comments

aron novak’s picture

Sidenote: the above URL just works w/ FeedAPI + Common Syndication Parser

aron novak’s picture

Assigned: Unassigned » aron novak
Status: Active » Needs review
StatusFileSize
new2.49 KB

Straightforward fix.

alex_b’s picture

Status: Needs review » Needs work

Let's keep the errot text simple and the same in any case: 'Could not retrieve title from feed.'

aron novak’s picture

Well, for users it could be very helpful to know for example if they installed a bogus parser and that's the reason of the error. Normally this error message won't appear only if there is a serious error in the parser.
I do not prefer to do:

} catch (Exception ex) {
  out.println("Error happened");
}

:)

aron novak’s picture

Status: Needs work » Needs review
StatusFileSize
new2.5 KB

Attached the new patch.

aron novak’s picture

StatusFileSize
new2.5 KB

New patch, there is a related bug at #663830: When download of URL failed, node w/ empty title is created, but cannot fix them separately without a conflicting patch.

alex_b’s picture

Title: Parsing + data handling error » Parsing + data handling error with RSS 1.0 feeds
Status: Needs review » Fixed

Committed. Thanks.

The feeds.module portion of the patch got obsolete with #641522: Consolidate import stage results and provide generalized enclosure class. I will try to debug the title issue now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.