Closed (fixed)
Project:
Rules
Version:
6.x-1.4
Component:
Rules Core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2011 at 15:40 UTC
Updated:
26 May 2012 at 19:52 UTC
Hi everybody,
I have problem with the action "Fill in a Field" for CCK-Fields.
I'm generating JPGs with a little script (which saves the picture into a folder) and wanted to save this picture within a FileField of my content type. For this I worte this PHP-Code to fill the field:
return array(
0 => array(
'filename' => $node->nid.'.jpg',
'filepath' => 'sites/default/files/plakate/'.$node->nid.'.jpg'
) );But it doesn't attatch the File to the FileField. Where is the problem? Is there something missing?
Greetings
lundj
Comments
Comment #1
lundj commentedHello everybody,
My translation was not correctly - the action is called "Populate a Field (CCK)"
There I put my custom php-code (see first post) into the section "run custom PHP". The script should take an image - which is processed by a script on saving/updating the content-type - an put it into a FileField. But the action doesn't work - the picture would not be assigned to the FileField...
How can I fix this?
Kind regards
lundj
Comment #2
itangalo commentedI'm not sure, but I think the file fields store absolute paths, meaning that you'll have to start it with http:// and all of that.
Please reopen if this doesn't help. Good luck!
//Johan Falk
I'm a part of the Rules Issue Squad, helping out in the issue queue. You can join, too!
Comment #4
mitchell commentedUpdated component.