Currently this modules ignores image tokens specified for the image file field. For instance, when the FileField path is "[termpath]", ALT and Title text is "[title-raw]", then it puts the image file to the directory "[termpath]" literally, and displays a node with literal ALT and Title image tags "[title-raw]".

CommentFileSizeAuthor
#1 imagefield_import-591494-1.patch683 byteslink0ff

Comments

link0ff’s picture

Status: Active » Needs review
StatusFileSize
new683 bytes

Normally (i.e. when a node is saved from the node creation form) filefield_paths_nodeapi called with the "insert" op argument invokes the "filefield_paths_process_file" hook on all modules that implement it (e.g. "imagefield_tokens_filefield_paths_process_file" that replaces 'alt' and 'title' tokens).

But in a batch import filefield_paths_get_fields called from filefield_paths_nodeapi return FALSE, because filefield_filefield_paths_get_fields in filefield_paths/modules/filefield.inc checks for the following condition:

  $node->form_id == $node->type .'_node_form'

but $node->form_id is not initialized when Imagefield import is used. The attached patch should fix this bug.

mojzis’s picture

Status: Needs review » Needs work

I tested this and I think it still needs some polish, I guess the trouble is when the requested path doesn't exist ? The imagefield moduel itself does create, but not this one :(

wulff’s picture

Version: 6.x-1.4-beta1 » 6.x-1.x-dev
Status: Needs work » Fixed

This has been fixed in the latest development version of the module.

Status: Fixed » Closed (fixed)

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