I have a form to edit data. in this form i have some fields to upload images.
The upload works using as field name the model name of cronoconnectivity, but when i try to use the action to resize image if i use the same name (of model) the action is triggered but the result is:
probably because the action don'tfind the file.
Any idea ?
The upload works using as field name the model name of cronoconnectivity, but when i try to use the action to resize image if i use the same name (of model) the action is triggered but the result is:
Array
(
[quadri] => Array
(
[image] => Array
(
[name] => audio-tv-01.jpg
[original_name] => audio-tv-01.jpg
[path] => /Applications/MAMP/htdocs/admin.quadri/htdocs/images/quadri/originali/audio-tv-01.jpg
[size] => 42279
[link] => http://localhost:8888/images/quadri/originali/audio-tv-01.jpg
)
[thumb_big] => .
[thumb_med] => .
[thumb_small] => .
)
)
and before this php error and warning:
Notice: Undefined index: name in /Applications/MAMP/htdocs/admin.quadri/htdocs/administrator/components/com_chronoforms5/chronoforms/actions/image_resize/image_resize.php on line 93
Notice: Undefined index: path in /Applications/MAMP/htdocs/admin.quadri/htdocs/administrator/components/com_chronoforms5/chronoforms/actions/image_resize/image_resize.php on line 94
Notice: Undefined index: extension in /Applications/MAMP/htdocs/admin.quadri/htdocs/administrator/components/com_chronoforms5/chronoforms/actions/image_resize/image_resize.php on line 128
Notice: Undefined index: extension in /Applications/MAMP/htdocs/admin.quadri/htdocs/administrator/components/com_chronoforms5/chronoforms/actions/image_resize/image_resize.php on line 128
Warning: getimagesize(): Filename cannot be empty in /Applications/MAMP/htdocs/admin.quadri/htdocs/administrator/components/com_chronoforms5/chronoforms/actions/image_resize/image_resize.php on line 238
probably because the action don'tfind the file.
Any idea ?
Hi Tasso,
Is the Files Upload action before the Image Resize action?
Dos the form work on it's own from the View Form link in the Forms Manager?
Bob
Is the Files Upload action before the Image Resize action?
Dos the form work on it's own from the View Form link in the Forms Manager?
Bob
the upload file action is before and the upload works.
The form give the same problem also from the link.
The form give the same problem also from the link.
Hi Tasso,
Thank you, Do you have image.quadri in the Image field name box of the Image Resize action?
Bob
Thank you, Do you have image.quadri in the Image field name box of the Image Resize action?
Bob
the error is because i have only quadri in the name of image resize. but if i use quadri.image or image.quadri i have no error but the action in not triggered
sorry, maybe is more clear. i have 10 upload fields and each is called image, image_1, ecc. Because is an edit form i use the model name from cronoconnectivity: quadri (is the name of the model) and each filed is quadri[image], quadri[image_1], ecc.
in the upload action i use only the model name (quadri) and the upload works correctly, but after image resize is triggerend only if i use quadri but give error.
in the upload action i use only the model name (quadri) and the upload works correctly, but after image resize is triggerend only if i use quadri but give error.
Hi Tassi,
Thank you - it looks as though the Image Resize action doesn't work with Model IDs. You can possibly get round this with Custom Code actions before and after it.
If you add this in a Custom Code action before the Image Resize
Bob
Thank you - it looks as though the Image Resize action doesn't work with Model IDs. You can possibly get round this with Custom Code actions before and after it.
If you add this in a Custom Code action before the Image Resize
<?php
$form->data['temp_image'] = $form->data['quadri']['image'];
?>
Then put temp_image in the Image Resize action and add a Debugger after it does that work? There will need to be a second Custom Code action to rename the results - the Debugger should show what needs to be done.
Bob
This topic is locked and no more replies can be posted.