[wp-trac] Re: [WordPress Trac] #6476: 2.5 Gallery shortcode orderby not working

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 1 19:44:58 GMT 2008


#6476: 2.5 Gallery shortcode orderby not working
---------------------------+------------------------------------------------
 Reporter:  GeoffHarrison  |        Owner:  anonymous
     Type:  defect         |       Status:  reopened 
 Priority:  normal         |    Milestone:  2.5.1    
Component:  General        |      Version:  2.5      
 Severity:  normal         |   Resolution:           
 Keywords:  has-patch      |  
---------------------------+------------------------------------------------
Comment (by velenux):

 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.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6476#comment:14>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list