WordPress.org

Forums

Gallery feature...still not working for me (21 posts)

  1. BrandiBoyd
    Member
    Posted 7 years ago #

    I don't know what I'm doing or not doing, but the [gallery] feature in 2.5 is just not working for me. I did get image uploading working in firefox. But if I click the gallery tab, and choose insert gallery, the [gallery] tag goes into my post in the html editor, and when the psot is saved and viewed, the source shows nothing, absolutely nothing, where the gallery should be. With RC2 it was an empty paragraph.
    I have all plugins off.
    Anyone else having this problem?

  2. thrallz
    Member
    Posted 7 years ago #

    I got the same problem, the [gallery] tag does not show up at all. The weird thing is I copied my whole blog to another server using different OS and it works. I have no idea what's going since there's so little info on the gallery tag.

  3. richmaster
    Member
    Posted 7 years ago #

    where did you guys get 2.5

  4. thrallz
    Member
    Posted 7 years ago #

    here of course

  5. richmaster
    Member
    Posted 7 years ago #

    nvm

  6. Dickie
    Member
    Posted 7 years ago #

    I have the same problem... on my main hosting I did an svn switch to 2.5 in two different installs and they both exhibit the same problem (absolutely nothing where the gallery should be)

    On the other hand I know it works because a 2.5 install works fine on my WAMP setup and has done as I have tracked the 2.5 development.

    I was looking for anyone else having this problem yesterday, but did not spot this post!

    For info I am hosted on Site5

    I was going to do some debugging tonight to see if I can get to the bottom of this...

    At least I'm glad to see I am not alone

  7. Dickie
    Member
    Posted 7 years ago #

    Update:
    I have found an SQL error in my error_log file...

    [31-Mar-2008 07:27:27] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\"menu_order ASC, ID ASC\" DESC' at line 1 for query SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_type = 'attachment' AND wp_posts.post_parent = 10 AND (post_mime_type LIKE 'image/%') GROUP BY wp_posts.ID ORDER BY \"menu_order ASC, ID ASC\" DESC made by get_posts

    Will need to look into this a bit more... not sure what is wrong, although it looks like it might be a quotes thing...

  8. Dickie
    Member
    Posted 7 years ago #

    Done a bit more digging and opened a ticket

  9. japje
    Member
    Posted 7 years ago #

    I have the same problem here, the pictures upload fine, but when inserting them into the post nothing happends and the same MySQL error in the logs:

    ''\\"menu_order ASC, ID ASC\\" DESC' at line 1 for query SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_type = 'attachment' AND wp_posts.post_parent = 54 AND (post_mime_type LIKE 'image/%') GROUP BY wp_posts.ID ORDER BY \\"menu_order ASC, ID ASC\\" DESC made by get_posts'

    this was using the most simple [gallery] tag.

  10. japje
    Member
    Posted 7 years ago #

    @Dickie:

    I noticed you made a patch, i patched my install and voila! it works!

    Patch can be found here:

    http://trac.wordpress.org/attachment/ticket/6508/media.patch

  11. Dickie
    Member
    Posted 7 years ago #

    Be careful though, as apparently that patch can screw up gallery that previously worked... so we need to find a solution that works for everyone. But as it is, if you are having that problem then this should get you out of a mess for the time being.
    I will try to keep you informed as to progress on a full solution

  12. UncleZeiv
    Member
    Posted 7 years ago #

    Same problem here.
    What I would really like to know is why is a *syntax* error showing up only for such a minority of people... there must be some really strange configuration interaction going on in our installations. It seems like the code is going to be changed in WordPress, still I would like to know what's going on anyway.

    Here's my configuration: MySQL 5.0.32, Apache/2.2.3 (Debian) and PHP 5.2.0-8+etch7.

    I opened a similar thread before:

    The previously mentioned ticket has been marked as a duplicate of 6476.

  13. velenux
    Member
    Posted 7 years ago #

    I managed to track back why the query works on some systems and doesn't work on some others. I think it's related to the magic_quotes setting in php.ini; if you have magic_quotes active, mysql gets the following query:


    SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_type = 'attachment' AND wp_posts.post_parent = 5 AND (post_mime_type LIKE 'image/%') GROUP BY wp_posts.ID ORDER BY \"menu_order ASC, ID ASC\" DESC

    The \" of course renders the query invalid.

  14. Dickie
    Member
    Posted 7 years ago #

    What I don't understand is why the single quotes around 'attachment' and 'image/%' are not escaped as well???

    I tried replacing the double quotes around the orderby with single quotes and the same problem still existed.
    i.e it produced this
    SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_type = 'attachment' AND wp_posts.post_parent = 5 AND (post_mime_type LIKE 'image/%') GROUP BY wp_posts.ID ORDER BY \'menu_order ASC, ID ASC\' DESC

    Odd

  15. thrallz
    Member
    Posted 7 years ago #

    Hmm I guess for temporary fix, you can either disable the magic_quotes on php.ini or apply the patch. Disabled magic_quotes works for me.

  16. UncleZeiv
    Member
    Posted 7 years ago #

    I suspected "magic quotes" could be the culprit, but unfortunately I couldn't test it as I don't have access to system wide configuration on my server.

    During my "debugging" session I noticed that wp_parse_str calls stripslashes_deep if get_magic_quotes_gpc() is true; if I recall correctly, it brought the slashes from three in a row to a single one. I'm not sure if this is the correct behaviour though, there are so many quoting mechanisms involved here...

  17. jmaxf
    Member
    Posted 7 years ago #

    thank you! The patch worked like a champ for me (after re-applying the gallery). And if anyone cares, you can see what my system looks like here.

  18. Firemaker
    Member
    Posted 7 years ago #

    There is a lot of posts about wp 2.5 and the gallery problems. I picked this one as it was near the top and had disscussion. The problem I am having on my shared server is that the gallery feature does not create thumbnails or medium size images. NextGen Gallery still workes fine. Woodpress installed by my servers Fantastico installer. Tried the patch on this post but no help. The gallery displayes the full sized images only. I would like to switch from NextGen to WP gallery as NextGen uploads do not register for the PicLens plugin.

    Thanks
    Mark McGillveray

  19. Firemaker
    Member
    Posted 7 years ago #

    After poking around some more I found that the wp upload is making thumb nails and mid size images. They are in the upload folder where they belong. However no matter which button I click for the insert image size it only inserts the full size image I uploaded. I size these to 550 pix wide.

    Thanks

    Mark McGillveray

  20. unnerv
    Member
    Posted 7 years ago #

    can you guys help me , i am not able to get the shortcodes to put galleries in to my posts any more this problem came up after i upgraded to 2.5.1

  21. evykau
    Member
    Posted 7 years ago #

    I am still getting this problem and I have tried both the patch and disabling magic quotes but nothing is working. I am running 2.5.1.

    Apache version 2.2.8 (Unix)
    PHP version 5.2.6

Topic Closed

This topic has been closed to new replies.

About this Topic