Media Library query breaks with WPDR enabled #3

Closed
lkraav opened this Issue Mar 7, 2012 · 4 comments

Projects

None yet

2 participants

@lkraav
lkraav commented Mar 7, 2012

This seems related: https://core.trac.wordpress.org/ticket/12750

Steps to reproduce:

  • Edit Post (in my case MarketPress product)
  • Set featured image
  • Choose last tab, "Media Library"

WordPress database error: [Column 'post_mime_type' in where clause is ambiguous]
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT OUTER JOIN wp_posts wpdr_post_parent ON wpdr_post_parent.ID = wp_posts.post_parent WHERE 1=1 AND (post_mime_type LIKE 'image/%') AND wp_posts.post_type = 'attachment' AND (wp_posts.post_status = 'inherit' OR wp_posts.post_status = 'private') AND ( wpdr_post_parent.post_type IS NULL OR wpdr_post_parent.post_type != 'document' ) ORDER BY wp_posts.post_date DESC LIMIT 0, 10

Disabling WPDR makes this go away.

@benbalter
Owner

I opened #20193 and submitted a patch which should hopefully resolve the problem in core going forward, and will look into a hotfix similar to what we did in #19779 over here.

@lkraav
lkraav commented Mar 9, 2012

Thanks a bunch @benbalter. Is that WPDR side hotfix coming up, is it simple? I installed Hotfix plugin for Wordpress' side, but it will probably take longer for the core hotfix to even surface (judging from WP:#20193). In the meanwhile this is sort of holding back fully evaluating WPDR when Media Library doesn't list contents every once in a while when we do other things and I really think otherwise WPDR is the answer to many prayers - so would like to keep it enabled forever :>

@benbalter
Owner

The media library should work in 1.2.1 if you want to try out an older version... https://github.com/benbalter/WP-Document-Revisions/zipball/1.2.1

@benbalter
Owner

79b5e13 should fix this.

@benbalter benbalter closed this Mar 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment