Support » Plugin: WordPress Gallery Plugin - NextGEN Gallery » One image that causes major troubles

  • Resolved ACEkin

    (@acekin)


    I helped a friend who could not sort the images in a gallery. When the “Sort images” button is clicked, an error page appeared instead of an array of thumbnails. II created a new gallery and I could sort its images. That made me wonder if an image in the gallery could be causing it and loaded a few at a time until I identified the image that would cause this problem. It is a JPEG image; I can display it on my screen using an image viewer. But when that image is included in a gallery it simply kills the ability to sort it.

    Since then, I tried a gallery on my site with that image and I got an error telling me that I don’t have access to that page when I clicked on the “Sort images” button. Deleting that image fixed it.

    I am bringing this to your attention partly out of curiosity and partly to alert you that a strange problem exists. What quality of an image could cause this problem? Would you like to see the image?

    For information, his site has NGG and the Pro version installed; my site has only NGG.

    Cemal

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi Cemal, as a fellow user, a few ideas jump to mind, I don’t know if any of them apply.

    a. Is it an odd file format?

    b. Is it a “fake” format i.e. it’s PNG but somehow has a JPG extension? Sometimes systems will let you call it whatever you want, but when it goes to read it, it is expecting JPG and instead finds PNG content. Doesn’t matter often for display, but I’ve had a few files over the years where the file format doesn’t match the extension and my file manager does NOT like it when that happens and I try to preview it.

    c. Is it possible the meta info is corrupted? If so, and you’re trying to sort on something in the meta data, then sorting on it could prove problematic.

    d. Does it have a weird character in the filename? This is a frequent problem with the app, someone has stuck a quote mark or an extra code in the filename and WP+NGG together don’t seem to process it correctly.

    You could try renaming it completely OR run it through a conversion program to change format to PNG and back to JPG to see if that solves it. Just some random thoughts…

    Paul

    Thread Starter ACEkin

    (@acekin)

    @polywogg, thank you for jumping in. The file is a JPEG file. The idea of it being a different file format with the jpg extension occurred to me and I saved it from the image viewing program. That did not fix the problem. I did not try renaming it, I will try and let you know. The filename has letters, numbers, spaces, and dashes. I suppose some visible or space characters may be special characters. Stay tuned. I will write again.

    Cemal

    Thread Starter ACEkin

    (@acekin)

    I’m back. I opened the image in FastStone viewer, saved it as a new JPEG file with a new name, shorter but with spaces and one dash. As soon as I upload that image to a working gallery, I cannot click on the Sort button without getting that strange error message. Something in the file is causing it. The original file was about 875Kb, the new one I saved is about 140KB. So the size is not the problem.

    There are other photographs by the same photographer, about the same size, and named similarly and they do not create a problem. By the way, I click on the Sort button to manually order them by drag and drop. It works if this image is deleted from the gallery but not while it is there.

    Cemal

    • This reply was modified 1 year, 4 months ago by ACEkin.
    Thread Starter ACEkin

    (@acekin)

    Back once more! I stripped the metadata altogether from the image using an online utility. Lo and behold! It no longer breaks the Sort Gallery request. For this image, the problem is fixed. However, what part of the metadata is screwed up and how to prevent it are still points of knowledge that will be valuable to me, and probably to others. I still have the original trouble image if there is a way to perform an autopsy on it.

    Cemal

    So you’ve eliminated file type and special characters. Sounds like a meta info problem…If you go into the NGG menu, and look at the characters that are showing in the other boxes, can you delete all the other info for that photo?

    P.

    Thread Starter ACEkin

    (@acekin)

    @polywogg nothing shows in any of the fields other than the title showing up in the first “Alt/Title” field. All the other fields are empty. I clicked in them to make sure there are no invisible characters, they were empty. I changed the title and tried to save the changes and it was blocked with an error message again.

    I appreciate your spending time on this.

    Cemal

    One of the layouts, I forget which one, has a way to show EXIF data. You could try “showing” it on the original file to see if anything jumps out. I confess I’m a little confused on meta info myself between the different EXIF/Meta formats. My suspicion is it could be a simple data corruption in the file OR it’s simply saving the info outside a given range (like an old date) OR there’s a weird character in one of the fields.

    If you point a full file URL, I could try DLing it to see if I see anything.

    PW

    Thread Starter ACEkin

    (@acekin)

    I looked at the file in a text editor and noticed quite a bit of Lightroom edit info, like the XMP file content. They do not strip much of the unnecessary metadata and it bloats the file size. It shrunk from 870KB to 118KB after stripping the metadata. If you want to take a peek at the file, here is the download link:

    https://www.dropbox.com/s/hhwalu8l9th33h2/Murray_Crusin-on-a-Sunday-Afternoon-Paul-M.-Murray.jpg?dl=0

    Thank you,

    Cemal

    Basic file info seems fine. So I peeked at the IPTC fields…the time created looks a bit odd (200906+0000), the Object Name has an apostrophe in it (Cruisin’), and the copyright field has an actual copyright symbol in it. I doubt the Copyright field would affect anything, but it’s possible the other two could.

    Or it could be simple meta data bloat. It seems really weird to me that removing the meta data would make that much of a difference in size. Not that it matters, as you’ve found a solution (stripping meta data), but I wonder if the person has the original file pre-lightroom…It’s possible somewhere in processing, LR didn’t save everything properly.

    I confess I avoid LR for part of that issue — I feel it wants too much control over my files with nothing else touching them, but I have other tools I like to use too. Instead, I use a slightly lighter photo management tool called Mylio, although it has nowhere near the power of LR etc. But if the friend had a copy of the file pre-LR-import, it would be interesting to see if the camera created the gremlins or LR did.

    In the meantime, I think you have your solution — strip the larger meta info and just go with basics.

    Paul

    Thread Starter ACEkin

    (@acekin)

    Thank you very much, @polywogg for investigating this puzzle. I wonder if the data of creation may be Julian date and time often used in computer programming. People have an unfounded fear that if they save their JPEG files compressed, the image quality will suffer and don’t spend time on what metadata to include in the exports. I use Lightroom and export images from it but never with Lightroom XMP data with edit steps.

    I wonder if a filter could be added to NextGEN upload which can optionally remove the metadata? Just thinking aloud 😉

    Thank you again, Paul,

    Cemal

    Plugin Support mihai-imagely

    (@mihaiimagely)

    Hi @acekin,

    Sorry for reading this one this late. We were busy with the main inbox lately.

    Just wanted to say @polywogg a big thank you for trying to help others from NextGen Gallery community. You have a truly strong point on debugging the current problem and I totally agree with your approach.

    The issue seems to have to do with server side’s ModSecurity preventing NextGen from saving the changes of a gallery that contains at least a single image with special characters in its captions or metadata ( the last isn’t popular but the cases of it happening because of the captions containing special characters is a known problem that pops up from time to time ).

    Good suggestion regarding adding a NextGen setting that would allow removing or sanitizing the images’ metadata on upload, I will be happy to add it to our “feature requests” list.

    Since it’s been a while since we last heard back from you, I’m going to mark this thread resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Cheers! 🙂

    Thread Starter ACEkin

    (@acekin)

    Oh, yes. I was able to upload the file by saving it once more with little xmp data and a new name and it worked. I do not know what exactly triggered the problem with that particular image. If you like, you can still download the problem file for inspection.

    Thank you,

    Cemal

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘One image that causes major troubles’ is closed to new replies.