I am populating a Drupal installation with some 15,000 nodes pre-formatted by other software. Errors in the data are corrected via that software -- at this stage. Hence it is convenient to re-import corrected nodes, or any nodes, and have them overwrite those already loaded with the same alias (permanently determined outside Drupal).
There is currently no such overwrite option.
The issue is linked to that of the Delete All function. Having imported nodes, and wanting to re-import them under present circumstances, clearly those already there need to be deleted. Experimenting with both the Quick option and the Normal option the re-import was rejected with the path being indicated as already in use. On listing content, there are no posts. The issue may be due to the fact that I used the Quick option first and only later used the Normal option -- after having received the path in use error.
Comments
Comment #1
Robrecht Jacques commentedNot sure what you mean by Quick and Normal option. Is there such a thing in node_import?
A "Delete all" could be useful or a "Redo import". But the nids (and other stuff) assigned will be different.
"Delete all" will need some work. I don't know what happens when:
1. You create a node
2. You have pathauto installed and so it creates a path /foo/bar
3. You delete the node
Does pathauto delete the /foo/bar?
4. You create the node again
5. As the path already exists the path /foo/bar-1 (or whatever) is created by pathauto.
So modules (like path) should still be able to do extra stuff when "Delete all" and node_delete($node) would not be enough.
Comment #2
Robrecht Jacques commentedOh, and "Overwrite" (or "Update existing nodes") is planned - there is another issue for that.
Comment #3
rhl6856 commentedYes, this is agreed, this module is effectively useless without this feature! If your import 10k items, your not going to try and individually delete all 10k, you need a delete all button, also, when normally going to product -> delete it does not free up the 'path name' having an overwrite here is critical.
Comment #4
zeezhao commentedAlso see this thread for a couple of options on what you are looking for (udpate exsiting nodes):
http://drupal.org/node/422282
And this for deleting all nodes:
http://drupal.org/project/delete_all
Comment #5
rhl6856 commentedI have issues related to this:
http://drupal.org/node/556250