Upgrade of 2.4.0 to 3.1.0
Add new resource, attempting to upload a PNG.
/index.php?P=EditResource&ID=-3&ER=4&EF=28&E1=test.png
- The image file test.png uploaded for the Screenshot field was in an unsupported image format.
Upgrade of 2.4.0 to 3.1.0
Add new resource, attempting to upload a PNG.
/index.php?P=EditResource&ID=-3&ER=4&EF=28&E1=test.png
It may be an issue with your PHP installation. What does it say after Supported Image Formats in the System Information section on the Administration page?
Also, do you have a copy of
SPT--EditResourceCommon.html
in yourlocal/interface/<name>/include
directory?It may be an issue with your PHP installation. What does it say after Supported Image Formats in the System Information section on the Administration page?
GIF, PNG
Also, do you have a copy of SPT--EditResourceCommon.html in your local/interface//include directory?
We did; I've renamed it but the problem is persisting.
Thanks for the additional info. Do GIF uploads work? (Is it just PNG uploads that are failing?)
Do uploads into a File metadata field work? (Is the problem just with Image fields?)
Thanks for the additional info. Do GIF uploads work? (Is it just PNG uploads that are failing?)
Ugh, GIF uploads fail too, with the same error message.
Do uploads into a File metadata field work? (Is the problem just with Image fields?)
Well ... I tried to add a File field to check, and that opened a whole new can of worms. I can't add the field.
I got errors on the three priviliege fields (wish I had recorded them), so I renamed the local copy of EditMetadataField.html to see if that was the issue. But I still get errors (not sure if they are the same) on those fields:
Thank you again for sending me a copy of your local interface. It's already been extremely helpful with debugging.
I'm looking at the permissions editing issue, and when I try to load the EditMetadataField page using your interface... and large parts of the field editing interface are broken. The reason appears to be that your StdPageStart.html is including jquery v1.5 ca line 366. This is overriding the jQuery v1.7 that is being included on line 304. Because of the version difference, the EditMetadataField page then doesn't have a number of js functions that it requires for the interface to work properly.
There's also a similar issue with jquery-ui. You're pulling in v 1.10.2, but we're expecting 1.8.21.
I can send you an updated copy of your local interface that doesn't pull in two versions of each, and it'll make the core CWIS functionality work... but I'm not sure what in your local modifications might have depended on those specific version, and how that might break.
OK, I was now (after getting jQuery version straightened out) able to add a file field.
The file field does allow uploading a PNG. The screenshot field does not.
We've been completely unable to replicate this problem here at Scout, so we've added some extra diagnostic info to image upload, and will be releasing CWIS 3.1.1 later this week with that addition, which will hopefully provide some insight into the problem and a solution.
I think I've finally traced this through!
The problem seems to be:
1. CWIS is trying to convert the PNG to a JPG
2. GD on the server does not have JPG support
output from
var_dump(gd_info());
includes
["JPG Support"]=> bool(false)
And therefore this test is failing:
Is there some reason that CWIS wants to convert the image to a JPG? Is this configurable?
CWIS should not be trying to convert the PNG to a JPG. Where do you see that (or how do you know it's) happening?
I traced it back from geting the
The image file test.png (8) uploaded for the Screenshot field was in an unsupported image format.
error.
I looked through the code trying to figure out where this message is coming from.
I found it coming from this function in Axis--Image.php
Okay. Is
Image::SaveAs()
actually gettingIMGTYPE_JPEG
for the$NewImageType
parameter? Or is it gettingNULL
and then trying to determine the image type inside the method?If
SaveAs()
is gettingNULL
for$NewImageType
, what's being passed in for$FileName
?Yes.
Produces
[17-Nov-2014 14:57:39 America/Detroit] function SaveAs $FileName = local/data/images/previews/Preview--00000029.png $NewImageType = 1
Ah, okay. Could you unzip the attached file, put it into the
objects
directory for the site, and see if that resolves the problem?That worked! Thank you :)