1

We built an application for a client of ours to track appeals and cases of a legal case. There are currently over 2,000 entries in the system. After we built the app, it was requested we add four more fields for allocation amounts. We added the fields, but he would like to now import the content (which he has already put in a csv format, in proper order for an import).

We originally used Node Import module to import all of the content (I believe 1700 of the 2000 entries were entered through the initial import). However now that we have added extra fields, Node import does not have functionality to import into empty fields, mainly I believe because it does not have the ability to identiy unique identifiers and see that an entry already exists for that Node title.

Node Import Update module, from what I read in the description of the module should be able to do it. However after installing this module and doing the import again, it does not work, instead it creates duplicative entries.

In Node Import Update module's known issues page (http://drupal.org/node/813978), it says one needs to go in and update the node type you want to import. I do not know what value it is asking for here. The name of the Content Type in which the fields are in? This is what I currently have it set to. I know Title is correct - not sure about the node type:

Set custom data * These should/could be defined in admin * */ // Node title as unique identifier //$IMPORT_UNIQUE_ID_NAME = 'title'; // Import field that holds the unique identifier //$IMPORT_UNIQUE_ID_IS_CCK = FALSE; // Is the identifier a CCK field?

// CCK field as unique identifier
$IMPORT_UNIQUE_ID_NAME   = 'title';  // Import field that holds the unique identifier
$IMPORT_UNIQUE_ID_IS_CCK = FALSE;    // Is the identifier a CCK field?

$IMPORT_NTYPE            = 'node';   // Node type to be imported
$IMPORT_UPDATE_DATETIME  = TRUE;        // Settting: update date/time value?

Sorry if it is long winded - however I wanted to ensure I was complete in describing the issue as I really need to get this wrapped up for my client. Thanks!!!

0
2

I'm pretty sure you'll be happy with the excellent Feeds module, which does this every day for thousands of sites. More advanced/customizable techniques are available with Migrate module, which always requires code, but gives enormous flexibility. Both will allow you to update existing nodes. Had you used them for your initial import, you'd be done now. I think you still may be able to use them as long as you have a unique identifier on your existing nodes.

1
  • I am trying to use feeds module to update existing nodes but it required GUID and I do not see GUID as part of existing nodes, thus how can we identify existing nodes so feeds updates nodes instead of trying to create new nodes? – pal4life May 30 '14 at 16:10
0

I'd suggest some custom code that does a SQL UPDATE to your node entries based on the unique ID, in your case the "title" field. I suspect your case is too specific for a general community contributed module. This is not a large task provided you know where to poke. Please post your solution if you get this working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.