CMS MADE SIMPLE FORGE

CGExtensions

 

[#5728] Unable to upload images for custom fields

avatar
Created By: Kenneth Griffith (kendo451)
Date Submitted: Mon Nov 22 12:04:18 -0500 2010

Assigned To:
Version: 1.21.3
CMSMS Version: None
Severity: Critical
Resolution: Works For Me
State: Closed
Summary:
Unable to upload images for custom fields
Detailed Description:
This problem is found in Products and CGBlog using the last two versions of
CGExtensions, so I think it is a problem in CGExtensions.

Steps to recreate:
1. Verify that CGExtensions preferences allows jpg,png,gif,jpeg.
1.b Also verify that the module specific image settings permit uploading all the
image types.
2. Create a custom image field in Products or CGBlog.
3. Edit a product and try to upload an image in the custom field.
4. It will say "Field customfield: Files of this type cannot be uploaded -"


History

Comments
avatar
Date: 2010-11-22 16:49
Posted By: Robert Campbell (calguy1000)

I just tesed uploading files with CGBlog today had no problems.
      
avatar
Date: 2010-11-22 17:10
Posted By: Kenneth Griffith (kendo451)

I have tested this on four different websites and two different servers
including Linux and XAMPP for Windows.  It has been happening since 1.8.2 but
continues with the new versions of CMSMS and CGExtensions.

The error is consistent in both upgrade as well as installing CGBlog from
scratch.

I have PHP 5.2.13 on the Linux server and 5.2.14 on the XAMPP server.
      
avatar
Date: 2010-11-22 17:16
Posted By: Kenneth Griffith (kendo451)

In XAMPP it gives this error message when you select an image and click
"submit":
Cannot fetch image or images details.Preprocessing of the uploaded file failed
      
avatar
Date: 2010-11-22 19:06
Posted By: Robert Campbell (calguy1000)

I tested thumbnailing and preview generation today so it has to be iether a
permissions or disk space issue of some type.

Does the initial image actually get uploaded?  Because those errors are
generated during the watermarking  and thumbnailing process.
      
avatar
Date: 2012-06-21 10:43
Posted By: Michael Didszun (mdidszun)

Hi Robert, hi Kenneth,

I've got almost the same issue (german installation):

DE: Feld customfield: Beim Verschieben der hochgeladenen Datei in das gewünschte
Zielverzeichnis ist ein Fehler aufgetreten -

EN: Field customfield: Error occured on moving the uploaded file to the target
folder.

I asked about this in the german forum:
http://forum.cmsmadesimple.de/viewtopic.php?id=2304

Problem may be caused by permission settings, as you say. But I permitted ALL
now for testing purposes.
Escpecially the generated target folder (e.g. product_1 for article 1) has
recursive full RW rights.

So I was wondering what happend in detail - and where. 

Line 231 in action.editproduct.php
$destdir =
cms_join_path($gCms->config['uploads_path'],$this->GetName(),'product_'.$compid);
targets the correct folder and seems to use the correct path.

Something like this is used around L345, too - and I'll step through the whole
stuff if nobody has an idea. This would be cool, but it'll be nicer if we could
save some time here ;)

Ah, the real question here is: What could produce this error message if all
permissions are set - or which permissions could I have forgot?

(Image file types and sizes are set global, in your (calguys) extension mod and
in the products mod, too.)

Best regards,
Michael
      
Updates

Updated: 2011-12-23 10:38
cmsms_version_id: => -1
state: Open => Closed

Updated: 2010-11-22 16:49
resolution_id: 5 => 11

Updated: 2010-11-22 12:04
version_id: -1 => 28783
resolution_id: => 5