Project:Import-export
Version:4.6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I find this module quite useful but use 4.6.3

Comments

#1

Does not work? I hope there is no system API change.

#2

Title:Support for 4.6.0» XML books from 4.5 to 4.6?
Version:master» 4.6.x-1.x-dev
Category:feature request» bug report

I exported a book successfully from drupal 4.5. Now I am trying to import into 4.6 and getting the following error:

Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0
Cannot force new node id nodeid 0

for the record, that is one line for each node I am trying to import in the XML file. None of those nodes are ID #0, so I'm not sure what the deal is.

#3

Nid is unique id generated by drupal (sequences) so when importing xml with nid, import_export does not import it unless ALLOW_FORCE_NEW_NODE_ID is True. But you should know what you do and manually increase sequencesid after. Safer way is replace nid with xnid. Xnid is a alias string that will be replaced with real nid generated by drupal.

Yes, none of nodes have #0 but no new node is craeted due warning.

<?php
function _import_export_node_load_check($action, $nid, $def_type, &$type, &$node, $mand_arr, &$fixups, &$output) {
....
  if (
$nid) {
   
$node = _import_export_node_load($nid);
    if (!
$node->nid && !ALLOW_FORCE_NEW_NODE_ID && $action == 'insert') {
     
$output .=  t('Cannot force new node id');
      return
false;
    }
  }
  else {
   
$node = new StdClass();
  }
?>

#4

Could somebody help me understand what tma0 is posting?

Where do I change nid to xnid? Is this entirely safe? Why is nid used, when only xnid works? Has this been changed? If not, why not?

Thanks.