not found the opportunity to update the existing node?

Comments

dman’s picture

That is usually correct.
Import files usually do not include the node id - which would be needed to be sure of what data is replacing what node. If your import file file does include a nid field, there would probably be a chance of supporting replacement. I'm not sure if even that is available however.

Indexing on title is problematic (which may seem like a quick idea) as if the title changes in either end, they would no longer match up. And other cases may have more than one page named the same.

Anyway, try setting the nid - if possible

temp’s picture

Ok - thanks
But version 5.x have the option
"Titles must be unique for this node type.
Check this box if you do not want to import nodes if there is already a node with the same title."
And it gives me hope that this opportunity will appear.

Robrecht Jacques’s picture

Title: can i update the existing nodes? » titles must be unique
Category: support » feature

No update possibility yet. Also not possible to map the "nid".

I will implement the "title must be unique" again as a temporary "solution" until updating works. Expect it in -rc5.

temp’s picture

Thank you.
I have to use SQL commands to update prices field.

zeezhao’s picture

Subscribing... Thanks for the ugraded version.

A suggestion: it would be nice to have a choice of which field to use as the key for updating e.g. apart title (as in version 5 suggested above), any of the cck fields.

For instance, if a specific CCK field was added for mainting the unique key, this should be made available. As an example, for Products, these fields will be one of the cols in the content_type_product table. The User then has a choice to decide what should be used in the update process.

hutch’s picture

A good candidate for a unique key in 'Products' would be uc_products.model, the SKU field.

tomsm’s picture

Indeed, I have a CCK field called article number that has to be unique. This field also exits in my ERP software.
I want to export a csv file from this ERP program and import it into Drupal to update the prices.
So, it would be great if I could select the field that holds the unique key.

dman’s picture

Yes, the SKU field is the one to index on.
We just need the import to be able to index on a foreign key - and merge/update when it finds it.

...I've done this for my import_html where I index on path and merge/update pretty well over top of existing nodes. Can be done.

temp’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.