Say you import a file, and it fails for some reason. You get the first few nodes successfully imported.

You want to try again, so you set the option to skip existing nodes. However, when running the import again, no nodes will be imported. This is because the code is written such that as soon as it finds a single node that has already been imported, it skips over all subsequent nodes in the import.

This is because the $save variable is overloaded and used in two different spots for two different things, so once $save gets flipped to false once, it never gets reset to true for any of the other nodes after that. I've attached a simple patch to address the problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ralf.huebl’s picture

This issue was reported twice. See: https://www.drupal.org/node/1954568

danielb’s picture

Status: Needs review » Closed (duplicate)