Closed (fixed)
Project:
Node export
Version:
7.x-3.x-dev
Component:
Node export
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2011 at 20:51 UTC
Updated:
10 Aug 2011 at 05:21 UTC
I'm using Node Export with the Biblio module, and the Biblio module requires the 'cid' field to be removed from export because it handles those fields differently. It looks like the previous solution with Node Export 2.x was to use biblio_node_export_node_alter() but that doesn't appear to work. Does hook_node_export_node_alter still exist in 3.x or otherwise changed significantly?
This was the original code posted here
function biblio_node_export_node_alter(&$node, $original_node, $method) {
if ($method == 'export') {
foreach ($node->biblio_contributors as $cat => $authors) {
foreach ($authors as $key => $author) {
unset($node->biblio_contributors[$cat][$key]['cid']);
}
}
}
Comments
Comment #1
danielb commentedFrom node_export.api.php (has all the hooks documented in it) unless this info is wrong....
$method is removed as this hook now only handles exports. A new hook was created for imports hook_node_export_node_import_alter().
Don't forget in D7 you have to clear caches after adding a hook.
Comment #2
danielb commentedNoticed a bug at the bottom of that api file where a hook is documented as "node_export_node_export_import" whereas I think it should be "hook_node_export_import".
Comment #3
rory_o commentedThanks, that helped considerably and I have it working.
Comment #4
danielb commentedURRGGHHHHH why did you close this
lucky I stumbled on it by chance
one of these days I'm going to snap and start finding out where you people live
Comment #5
danielb commentedalright I've fixed that and had my medication now