[development] strange beavhior after node import
luca capra
luca.capra at gmail.com
Thu Aug 12 09:30:07 UTC 2010
Hi all,
I've built a simple parser to import downloaded webpages with attchments
as drupal (6) node.
It's called with hook_cron() and works the most of the times.
But, some nodes get correctly saved in db tables node, node_revisions,
and other cck tables but if I try to see them in the browser, as
example, www.domain.tld/node/1700 I get a 404 error.
I know those nodes get error, because there isn't any attachment (and no
reference in files nor upload table).
To import nodes I do: (ini_set-ted memory_limit and timeout to proper value)
1 save the file attachment with drupal_write_record('files', $file)
2 node_save with a custom populated array, and the file objects from 1
3 drupal_write_record('upload', $fileinfo, 'fid') to update the
description that sometimes result empty
I've put a lot of watchdog() everywhere, but nothing. If I run from
drush or "by hand" It seems to works...
Can somebody give me some hint?
Thanks in advance.
Luca
More information about the development
mailing list