I was exporting a number of nodes (most of which have node references in them) to move to another instance, and I received the following error:
WD php: array_key_exists(): The second argument should be either an array or an object in /var/www/[site-name]/docroot/sites/all/modules/node_export/modules/node_export_relation/node_export_relation.node_reference.inc on line 141.
Upon inspecting the code at that location, I noticed that the variable $nodereference_fields at the beginning of the function was being written as $node_reference_fields (note the extra underscore) at the end of the function, specifically on the offending line 141. I changed the name of the variable to match how it was instantiated and the errors were resolved and the node references imported just fine. Attached is a patch for this.
| Comment | File | Size | Author |
|---|---|---|---|
| node_export-noderefvar_error.patch | 726 bytes | DramaticChipmnk |
Comments
Comment #1
danielb commentedcheers
Comment #2.0
(not verified) commentedsanitizing path in error message