If I manipulate the file which I want to re-import with ni_cron's 'from the begining' options I am getting error:

warning: md5_file() [function.md5-file]: Filename cannot be empty in /home/.../sites/all/modules/ni_cron/ni_cron.module on line 51.

I think it can be useful if it doesn't check md5 or file size when we select 'from the beginning' with 'delete old nodes' option.

Comments

lupus78’s picture

can you explain at what step do you get this error?

Yura’s picture

Steps I pass
1. Upload file through ftp to /files/imports (allow ftp uploads checked and file owner user 1 at the node import settings)
2. Import content with node import interface DONE
3. If I add or remove only a row everything is working well but manipulating rows ...
A)
Each rows in the file looks like that:

Country Name Route Buy Interval Sell Interval Destination Tags Type Trunk Rates Sell Default
Honduras Grey 1 60 Megatel Honduras,Megatel Mobile VoipPro VoipPro,Grey,Mobile
Hong Kong Grey 1 60 Hong Kong Fixed VoipPro VoipPro,Grey,Fixed 1

I edit some fields with opening file remotely such as 'sell interval' 60 -> 30, 'type' fixed -> mobil etc. (There is no row's addition or delete). Then I save the file.
Set ni_cron's 'from the begining' options and 'delete old nodes' checked. Cron is run ERROR!
B)
I delete all content through VBO and just want to re-import same content without changing any data. Cron is run ERROR!

dealancer’s picture

This bug was fixed in new dev release (http://drupal.org/node/857604). To see the changes you need to reinstall ni_cron.

Take into account that the dev release works only with dev release of Node Import module. If you need a patch for 1.5, please write here and I will make it for you.

dealancer’s picture

Status: Active » Fixed
dealancer’s picture

This is not a patch, but you could add following code to ni_cron.module in you 1.5. release to fix that problem:

/**
 * Implementation of hook_node_import_task.
 */
function ni_cron_node_import_task($taskid, $op) {
	if ($op == 'delete')
		db_query("DELETE FROM {ni_cron} WHERE taskid=%d",$taskid);
}

Status: Fixed » Closed (fixed)

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