Closed (fixed)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2011 at 23:28 UTC
Updated:
6 Jun 2012 at 04:01 UTC
Jump to comment: Most recent file
I'm trying to import a CSV into a content type I created, and I get this error. I've tried some stripped down and simplified CSVs and they still do it. There are no helpful errors in the log entries either.
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | feeds-unsupported_opperand_types-1213472-28.patch | 1001 bytes | emarchak |
| #25 | temp-feeds-workaround-patch.diff | 935 bytes | Nigel_S |
| #5 | FeedsConfigurable-patch.diff | 439 bytes | paulgemini |
| error.txt | 787.76 KB | Jorenm |
Comments
Comment #1
C.H.Riss commentedsubscibe - I get the same error here (in german: "Ein AJAX-HTTP-Fehler ist aufgetreten HTTP-Rückgabe-Code: 200 Im Folgenden finden Sie Debugging-Informationen. Pfad: /cwwb/batch?id=28&op=do Statustext: OK Antworttext: Fatal error: Unsupported operand types in /Volumes/Data/htdocs/cwwb/sites/all/modules/feeds/includes/FeedsConfigurable.inc on line 149")
My csv is very simple - 5 fields and about 20 rows. First row is imported, then the error pops up....
Comment #2
C.H.Riss commentedFound a solution/hack for this:
depending on php-version (or..? - here: 5.3.1) one of the two arrays to be combined seem to be not an array (even if print_r() returns an array (?!))
I changed line 149 in modules/feeds/includes/FeedsConfigurable.inc
from
return $this->config + $defaults;
to
$cnf = $this->config;
return (array)$cnf + (array)$defaults;
- works.
Comment #3
enkore commentedthx c.h.riss for the fix, works also for me
Comment #4
Dale Baldwin commentedseems to work with xpath parser though it doesn't work with the YouTube parser.
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=18&op=do StatusText: Service unavailable (with message) ResponseText: Recoverable fatal error: Argument 2 passed to FeedsProcessor::process() must be an instance of FeedsParserResult, null given, called in /data/drupal7/sites/all/modules/feeds/includes/FeedsSource.inc on line 349 and defined in FeedsProcessor->process() (line 101 of /data/drupal7/sites/all/modules/feeds/plugins/FeedsProcessor.inc).fun error
Comment #5
paulgemini commentedPatch based on #2
Comment #6
paulgemini commentedComment #7
Dale Baldwin commentedAn AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /?q=batch&id=8&op=do StatusText: OK ResponseText: {"status":true,"percentage":"24","message":""}Uncaught exception thrown in session handler.PDOException: SQLSTATE[08S01]: Communication link failure: 1153 Got a packet bigger than 'max_allowed_packet' bytes: UPDATE {sessions} SET uid=:db_update_placeholder_0, cache=:db_update_placeholder_1, hostname=:db_update_placeholder_2, session=:db_update_placeholder_3, timestamp=:db_update_placeholder_4 WHERE ( (sid = :db_condition_placeholder_0) AND (ssid = :db_condition_placeholder_1) ); Array ( [:db_update_placeholder_0] => 1 [:db_update_placeholder_1] => 0 [:db_update_placeholder_2] => 192.168.1.145 [:db_update_placeholder_3] =>Ok updated the script this morning and got that at around 20% of the import. I'm importing around 3k xml files using xpath parser.
Comment #8
Dale Baldwin commentedDid some more testing, doesn't seem to work well with larger imports at all, I get to around 220 nodes and the whole thing crashes out. What was interesting was that I tried to create a config array in settings.php
$conf['feeds_node_batch_size'] = 200;
I started getting that error. It seems to import the first node and then crashes out. When you go back to the import screen it then says its importing but it sits at 0%.
Comment #9
Dale Baldwin commentedWow the errors here are misleading, fix works for xpath parser, anything over 200 nodes look at bumping up your php mem limit (I'm running at 512) and increase the script execution time from 60 to 120 seconds.
Still not sure what is going on with youtube feeds parser but will have a mess around with that later tonight.
Comment #10
anacronaut commentedGetting an identical error with the YouTube parser.
Comment #11
elijahmeeks commentedI'm getting the Ajax error using EditableFields.
Comment #12
doompal commented#2, #5 worked for me.
Comment #13
John Bryan commentedIf you are not using taxonomy with Feed items then this comment is not relevant.
If you are trying to have RSS or XML (etc.) "Feed Item" nodes inherit a taxonomy term from the parent "Feed" importer node and seeing "An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows." :-
Multiple Feed project issues have been created for this, or with similar message but the relvant one appears to be:-
"taxonomy_node_get_terms doesn't work with drupal 7"
http://drupal.org/node/959984
Comment #14
handsolo commentedi used the patch and it eliminates the error but i don't actually get any nodes created, it just says they were created but only the 1 that i used to run the import is created. What am i doing wrong?
Comment #15
Lythimus commentedI used this fix and it appears to be working, but is throwing a "Download of failed with code -1002" error. I'll update if I get it resolved if I feel like it's related.
Comment #16
jayray11 commentedi get this error when i use fix in post #2- "Download of failed with code -1002"
Comment #17
manu manuFor the ones having the
Undefined property: stdClass::$feeds in feeds_node_update()message, see #1273622: Feeds error on node_save() witch also solved this issue (Unsupported operand types) for me.It's worth mentioning that the feeds source configuration was deleted during VBO actions on feed nodes.
Comment #18
dooug commentedLooks like error code -1002 is related to uri scheme (http, https, ... ):
http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ht...
Make sure you are importing the files with complete urls. That solved the problem with error code -1002 for me.
Comment #19
liupascal commented@dooug
I have the 1002 error, while my url looks are correct (it's in my local installation, like /Users/myuser/..../file.png, when i copy and paste the link in my browser it works).
If the file is supposed to be in a local folder, what uri scheme should it be (and what function do you use to format it ?)
Many thanks
Comment #20
dooug commented@liupascal
looks if your are using the HTTP Fetcher for you feeds importer these are the options:
feed,httporhttpsare the options in drupal_http_requestMaybe in your case you need to use the File Upload fetcher instead?
Change it at:
/admin/structure/feeds/YOUR_FEED_IMPORTER/fetcherIf you can't use the File Upload, maybe look at the contributed modules for Fetchers:
http://drupal.org/node/856644
Comment #21
ghmercado commentedthanks c.h.riss (#2) worked for me.
Comment #22
lahode commentedHi,
Here are a few tips to make it work:
The only tiny problem that still appears is a "Resource is not a file or it is an empty directory" warning
Hope this help and thanks to everyone!
Cheers
Comment #23
hafis commentedThank you, #2 worked for me, 95 items, csv-import.
Comment #24
FranckV commentedGreat thanks ! [#2] worked perfectly for me ! I used that in an RSS Feed import via http generated with Views (using Views RSS) : From a Drupal 6 site to a Drupal 7 site.
Comment #25
Nigel_S commentedThe patch above is really not a solution. The problem is that when FeedsNodeProcessor attempts to save the target node type module_invoke_all dutifully calls all of the feed module's hooks including feed_node_insert. feed_node_insert then manually calls feed_node_update which *assumes* that $node->feeds exists but it doesn't on anything other than the actual importer (it having been set by the node module when its form was processed).
The absence of $node->feeds immediately causes errors in drupal but it's not until Feeds tries to append the configuration settings together that an actual PHP error is caused. Casting to an array merely masks the problem until other errors show up.
This error won't occur if the check in feed_node_update/insert isn't satisfied so people are seeing this when the content type they are processing is the same as the one to which the feed itself is bound. It's for that reason that the News sub-module isn't affected for instance; it's processing feed_items but the feed itself lives on a 'feed' type. Creating a separate type for the feed itself will avoid this problem though better checks within feeds.module to ensure that the hooks don't activate on the wrong content type might be in order.
Adding an && isset($node->feeds) for instance so
if (($importer_id = feeds_get_importer_id($node->type)) && isset($node->feeds))
would be a better temp fix than the typecast but it doesn't solve the problem that the created content types have some aspects of a feed importer (for example an import tab) which can't work unless properly set up. Processing the same content type as the importer is attached to is generally not a good idea then. :P Perhaps form validation to make sure the processor isn't touching the same content type that the importer is attached to?
Comment #26
jnettikSo the hack in #2 worked for me. I was only importing 80 nodes or so containing only a title and some address information.
After my import I noticed my logs were all filled with the three messages shown in #8 though all my nodes seemed to import with no problem.
Comment #27
drupalvino commentedHi,
Im using drupal 7. While importing the csv file and excel file the error is occuring
"An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /example/batch?id=447&op=do StatusText: OK ResponseText: >>>>>> .r48 {"status":true,"percentage":"99","message":""}"
I dont know how to solve this. If u have any idea plz guide me.
Comment #28
emarchak commentedFormatted the diff from #26 to a patch for testing. Seems to be working for me.
Comment #29
emarchak commentedHi Drupalvino. It seems like that error is unrelated to the issue that we're discussing here. I'd suggest you open up a new one specifically for that, hopefully more people will be able to find it and give you a hand.
Comment #30
OldAccount commentedThe patch in #28 worked for me, thank you!
Comment #31
handsofaten commented#25 works for me. Thank you!
Comment #32
twistor commentedSo, there are a few things going on here and a few decisions we have to make.
Starting from the assessment done in #25:
Comment #33
twistor commentedCommitted the simple fix to 7.x
This stops at least one of the very common "Unsupported operand types" issues.
Followup issue, #913458: Sanity check importer configurations.
http://drupalcode.org/project/feeds.git/commit/255005b
Does this need a backport?
Comment #34
twistor commented6.x
http://drupalcode.org/project/feeds.git/commit/6a12168
Comment #35
sagraham commented#25 was helpful to me. Creating a new content type for import, or even better just using the standalone form solved the problem for me.
Comment #36
Cadyfatcat commentedI was getting the following error, a bit different, but this patch worked for me also, the error was:
An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: XXXXX StatusText: OK ResponseText: Fatal error: Unsupported operand types in XXXXX/sites/all/modules/feeds/includes/FeedsConfigurable.inc on line 149
oh wait that is the same error!
Comment #37
citricguy commented#2 worked for me as well.
Running PHP version 5.3.2