• I recently updated WordPress from 2.3 to 2.5. Then used the auto-upgrader in the dashboard to upgrade NextGen Gallery to the latest version.
    But since I did that, singlepic tags won’t display their thumbnails.

    Here’s an example: link
    Using
    [singlepic=364,100,55]
    tries to display
    https://www.samutz.com/blargh/wp-content/plugins/nextgen-gallery/nggshow.php?pid=364&width=100&height=55&mode=
    and Firefox says “The image “https://www.samutz.com/blargh/wp-content/plugins/nextgen-gallery/nggshow.php?pid=364&width=100&height=55&mode=” cannot be displayed, because it contains errors.”
    Other browsers just won’t display it at all.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Samutz

    (@samutz)

    I just tried deleting the plugin then reinstalling it from the download on alexrabe.boelinger.com, but it still doesn’t work.

    Check the permission of your images, which image is behind the id 364 ? can you call it direct via you browser ?

    Thread Starter Samutz

    (@samutz)

    Yea, it loads fine for the direct image. I also checked all the permissions for the folder, sub-folders, and files that I keep the images in.

    Here’s the one from my first post:
    https://www.samutz.com/blargh/wp-content/dumpster/gtaforums/gtasa_steveo.gif
    It also appears fine in the thickbox popup.

    Thumbnails in other places are working fine too.
    Like here for example (a gallery page):
    https://www.samutz.com/blargh/dumpster/?album=1&gallery=7
    The 4th pic from the left is the one from the page in my first post.

    It’s only the singlepic ones that don’t work.

    maybe gif files are a problem, try to use it with a jpg

    Thread Starter Samutz

    (@samutz)

    JPG and PNG don’t work either:

    Here’s a page with all three: JPG, GIF, PNG
    https://www.samutz.com/blargh/dumpster/test-page/
    Each one using [singlepic=id]

    Thread Starter Samutz

    (@samutz)

    After a lot of screwing around and digging through the code. I found that the problem isn’t actually with NGG, but with wordpress itself.
    The reason the images aren’t properly displayed is that something is puting four extra bytes at the beginning of the nggshow.php file when it tries to generate an image. These bytes are OA OA OA OA. Without these bytes the image displays fine.

    After more digging, I found that including wp-config.php at the beginning of nggshop.php is what’s causing this. If I navigate to wp-config.php in my browser, I get a blank page of course, but when I save this blank page and open it in a hex editor, it get those four bytes by themselves.
    I removed the trailing line break at the bottom of wp-config’s code, but it still outputs the four bytes. So I looked at the wp-settings.php file it includes and it also had a trailing line break, which I removed. But wp-settings.php also includes/requires other files, and those files include/require other files, etc.
    So I’m basically stuck combing through every single file until I find out which file is causing the four bytes.

    This sounds like a unicode/ANSI encoding problem. Try to save the file nggshow.php without the BOM as simple ansi file and upload it again..

    Thread Starter Samutz

    (@samutz)

    I found the problem. And I feel so stupid now.

    One of the plugins I rely on had extra line breaks in it. Four to be exact.

    What happened is that the main file of plugin (that eventually gets inluded by WP scripts) had places like this in it:

    ?>
    
    <?php

    Once I removed those, everything start working fine again.

    Thanks for the feedback

    Looks like there is a number of threads on he topic of [singlepic] not working correctly even if the image is accessible via a regular URL.. I have tried many of the various tips (deactivating plugins), looks for spaces on other php files but I am a newbie to this and have had no luck in getting this to work. [gallery=#] works fine but [singlepic=#] just displays the outer border line, broken image icon and the hover text, even if I go back to good ol’ wordpress default theme, same problem

    Any insights?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: NextGEN Gallery] singlepic tag stopped working’ is closed to new replies.