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.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 654728_parsing_data_handling-1.patch | 2.5 KB | aron novak |
| #5 | 654728_parsing_data_handling-1.patch | 2.5 KB | aron novak |
| #2 | 654728_parsing_data_handling.patch | 2.49 KB | aron novak |
Comments
Comment #1
aron novakSidenote: the above URL just works w/ FeedAPI + Common Syndication Parser
Comment #2
aron novakStraightforward fix.
Comment #3
alex_b commentedLet's keep the errot text simple and the same in any case: 'Could not retrieve title from feed.'
Comment #4
aron novakWell, 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:
:)
Comment #5
aron novakAttached the new patch.
Comment #6
aron novakNew 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.
Comment #7
alex_b commentedCommitted. 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.