-
- 158 Posts
edit: problem solved - see Doze’s reply.
I have narrowed down the problem to this:
- Upsample a photo in Photoshop (see attached sample).
- then use the Photoshop "Save for Web..." feature. If i just save the file normally the problem doesn’t occur.
- Try to upload the photo via the Manage pictures button. The following error (below) occurs every time.
- FYI - you CAN insert the same "bad" photo into your resource via the resource browser
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: exif_read_data(acc_cleats.jpg) [function.exif-read-data]: Incorrect APP1 Exif Identifier Code
Error type/ Nr.: Warning - 2
File: C:\xampp\htdocs\modx\ezdacc\assets\snippets\maxigallery\maxigallery.class.inc.php
Line: 431
Line 431 source: $exif = exif_read_data($this->path_to_gal.$name, 0, true);
-
- 4,213 Posts
You can fix it by commenting out the exif data reading.. it’s not necessary, see
this.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
-
- 158 Posts
Thank you Doze - that fixed it!
Steve
-
- 572 Posts
Hi,
is that commenting out lines 613-618 in: maxigallery.class.inc.php ?
that doesn’t seem like the right code?
www.9thwave.co.uk
WEB | DESIGN | PRINT
-
- 4,213 Posts
Yes, that’s the correct file. Line numbers can be different depending on your version.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
-
- 129 Posts
Have just commented out this bit of code on lines 428-437 which seems to have done the trick (613-618 were completely unrelated):
//read EXIF information
if($type == "jpeg"){
if(function_exists("exif_read_data")) {
$exif = exif_read_data($this->path_to_gal.$name, 0, true);
if(array_key_exists("EXIF", $exif)) {
$pic_date = " ’".$exif["EXIF"]["DateTimeOriginal"]."’ ";
}
}
}
//if gif image, convert to png
However, very curious that my client had the issue but I was able to upload images from my own computer without problems ... Anyway, seems to be working now.