Posted by jurta on September 29, 2009 at 9:30pm
| Project: | Imagefield Import |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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]".
Comments
#1
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.
#2
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 :(
#3
This has been fixed in the latest development version of the module.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.