Support » Alpha/Beta/RC » Gallery feature…still not working for me

  • 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?

Viewing 15 replies - 1 through 15 (of 20 total)
  • 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.

    where did you guys get 2.5

    here of course

    nvm

    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

    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…

    Done a bit more digging and opened a ticket

    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.

    @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

    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

    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.

    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.

    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

    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.

    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…

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Gallery feature…still not working for me’ is closed to new replies.