Closed (duplicate)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2012 at 01:45 UTC
Updated:
2 Jun 2015 at 03:07 UTC
Jump to comment: Most recent
i see there are a few other open issues on nesting level too deep error; but this seemed specific enough i should raise a new issue
i rcv a huge ajax error:
An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /en/batch?id=91&op=do StatusText: OK ResponseText: stdClass::__set_state(array( 'type' => 'question', 'changed' => 1343180248, 'created' => 1343180248, 'status' => 1, 'promote' => 0, 'sticky' => 0, 'uid' => '1', 'revision' => false, 'comment' => '0', 'menu' => array ( 'link_title' => '', 'mlid' => 0, 'plid' => 0, 'menu_name' => 'main-menu', 'weight' => 0, 'options' => array ( ), 'module' => 'menu', 'expanded' => 0, 'hidden' => 0, 'has_children' => 0, 'customized' => 0, 'parent_depth_limit' => 8, ), 'log' => 'Created by FeedsNodeProcessor', 'feeds_item' => stdClass::__set_state(array( 'entity_id' => 0, 'entity_type' => 'node', 'id' => 'questions_3', 'feed_nid' => 0, 'imported' => 1343180248, 'hash' => '7a0feb67e9d999b0d8db6e69e217debb', 'url' => '', 'guid' => '', )), 'title' => '1.4.1.2', 'language' => 'en', 'field_questions' => array ( 'und' => array ( 0 => array ( 'entity' => FieldCollectionItemEntity::__set_state(array( 'fieldInfo' => NULL, 'hostEntity' => stdClass::__set_state(array( 'type' => 'question', 'changed' => 1343180248, 'created' => 1343180248, 'status' => 1, 'promote' => 0, 'sticky' => 0, 'uid' => '1', 'revision' => false, 'comment' => '0', 'menu' => array ( 'link_title' => '', 'mlid' => 0, 'plid' => 0, 'menu_name' => 'main-menu', 'weight' => 0, 'options' => array ( ), 'module' => 'menu', 'expanded' => 0, 'hidden' => 0, 'has_children' => 0, 'customized' => 0, 'parent_depth_limit' => 8, ), 'log' => 'Created by FeedsNodeProcessor', 'feeds_item' => stdClass::__set_state(array( 'entity_id' => 0, 'entity_type' => 'node', 'id' => 'questions_3', 'feed_nid' => 0, 'imported' => 1343180248, 'hash' => '7a0feb67e9d999b0d8db6e69e217debb', 'url' => '', 'guid' => '', )), 'title' => '1.4.1.2', 'language' => 'en', 'field_questions' => array ( 'und' => array ( 0 => array ( 'entity' => FieldCollectionItemEntity::__set_state(array( 'fieldInfo' => NULL, 'hostEntity' => stdClass::__set_state(array( 'type' => 'question', 'changed' => 1343180248, 'created' => 1343180248, 'status' => 1, 'promote' => 0, 'sticky' => 0, 'uid' => '1', 'revision' => false, 'comment' => '0', 'menu' => array ( 'link_title' => '', 'mlid' => 0, 'plid' => 0, 'menu_name' => 'main-menu', 'weight' => 0, 'options' => array ( ), 'module' => 'menu', 'expanded' => 0, 'hidden' => 0, 'has_children' => 0, 'customized' => 0, 'parent_depth_limit' => 8, ), 'log' => 'Created by FeedsNodeProcessor', 'feeds_item' => stdClass::__set_state(array( 'entity_id' => 0, 'entity_type' => 'node', 'id' => 'questions_3', 'feed_nid' => 0, 'imported' => 1343180248, 'hash' => '7a0feb67e9d999b0d8db6e69e217debb', 'url' => '', 'guid' => '', )), 'title' => '1.4.1.2', 'language' => 'en', 'field_questions' => array ( 'und' => array ( 0 => array ( 'entity' => FieldCollectionItemEntity::__set_state(array( 'fieldInfo' => NULL, 'hostEntity' => stdClass::__set_state(array( Fatal error: Nesting level too deep - recursive dependency? in E:\wamp\www\boma\sites\all\modules\feeds\plugins\FeedsProcessor.inc on line 155 \n
and after tracking it down it is simply due to importing this cell from a CSV:
Quel est l'indice d'accessibilité piétonnière du bâtiment? Plus de 80%##Quel est l'indice d'accessibilité piétonnière du bâtiment? Plus de 80%##na
once i removed all the french characters; node imports fine.
other info which could be to blame:
- i am using feeds_tamper to split this into an array (## is the delimiter)
- this is going in to a field_collection field
Comments
Comment #1
liquidcms commentedughhh.. quite the mess.. no idea where the proper place to fix this is but i can force fix a solution by removing odd characters like funny quotes, etc and htmlentifying the rest in the _after_parse hook
only issue is that i then get the entified string in the final import; so i could, i would guess, de-entify in the _presave hook but that's a nightmare as it is a nested field collection mess of various arrays and objects (of different types)
my guess would be must be a better way; likely something to do with why special chars mess up field collection import to begin with.
Comment #2
liquidcms commentedgave up trying to figure out what the bug is in feeds/field_collection that causes this so went with replacing with htmlentities in _after_parse and then i had to write a script to post process the tables (much much easier than trying to handle in _presave) to replace the entities with proper utf chars.
Comment #3
charlie-s commentedEdit: My issue is not related, it was an error in a setting at the field level.
Comment #4
XmhO commentedHey liquidcms,
How did you do to fix this? I have exactly the same issue (getting AJAX error, using french characters (é, à, ...) with Feeds Tamper delimiter and Field Collection).
Thanks
Comment #5
liquidcms commentedin hook_feeds_after_parse() i pre-clean all my input with a function like this:
Comment #6
XmhO commentedThanks for your answer.
In fact, I solved my similar problem with my CSV encoding. It was ANSI by default or something similar (Excel sucks with encoding). I encoded it with UTF-8 and I no longer have any problem with this. Have you tried to check your CSV encoding?
Comment #7
liquidcms commentedno; haven't checked. where would i do that?
Comment #8
XmhO commentedYou should try to open your CSV file with another editor (like Notepad++), check for accents and so on in order to see if they are displaying good. If It is not the case, try to encode your file in UTF-8 ("Encoding" menu => "Encode in UTF-8 (without BOM)") and check if your accents are ok.
If It's not the case, replace them.
Another solution as you said would be to try to encode fields when you are importing them, using hook_feeds_after_parse().
It could be something like that :
What do you think about that?
Comment #9
liquidcms commentedlove it. this should get committed to the module.
Comment #10
XmhO commentedI don't think that in that state, It could be commited to the module, because It fails if your file is already in UTF-8. However I think It'd be interesting to see if the maintainer is aware of the problem.
Comment #11
Anonymous (not verified) commentedI save my CSVs in UTF-8 in Libre Office and that seems to do the job. Note that when I do do that the accented characters become �, so you'll have to edit those. But if you stick with only editing in Libre Office then their encoding is great. Excel's sucks.
Comment #12
twistor commentedWould someone give me a file that causes this problem?
Comment #13
liquidcms commented@sypl question marks are because libre is too stupid to know what to do with these.. lol... if the idea was to go through and remove all the characters that were going to be an issue; this really wouldn't be an issue... but not really the most efficient way to handle this is it?
Comment #14
twistor commented#1953008: PHP Fatal error: Nesting level too deep - recursive dependency? in FeedsProcessor.inc on line 199