• On a user’s site on his freshly setup dedicated server, we have a bit of an oddity.

    In a post, if he inserts a gallery and does anything other than direct manual ordering, say:
    [gallery columns="1" orderby="rand"]

    The order will always be the same. Doing a trace on the process produces:
    SELECT distinct wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_parent = 8600 AND (post_mime_type LIKE ‘image/%’) AND wp_posts.post_type = ‘attachment’ AND (wp_posts.post_status <> ‘trash’ AND wp_posts.post_status <> ‘auto-draft’) ORDER BY wp_posts.menu_order, wp_posts.post_date DESC;

    Which, of course, is not random. The same query is run regardless of what options are chosen. The results correlate directly with what is on the site, so I know that the data is not being processed after it gets the query result.

    Is this the proper forum for this or is there a more proper place to put bug reports?

The topic ‘Image Gallery Feature produces incorrect SQL.’ is closed to new replies.