[wp-trac] [WordPress Trac] #55218: WP_Comment_Query: "Column 'comment_ID' in where clause is ambiguous" when mixing 'include_unapproved' and 'meta_query'

WordPress Trac noreply at wordpress.org
Mon Feb 21 17:52:47 UTC 2022


#55218: WP_Comment_Query: "Column 'comment_ID' in where clause is ambiguous" when
mixing 'include_unapproved' and 'meta_query'
----------------------------+-----------------------------
 Reporter:  genosseeinhorn  |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Comments        |    Version:  5.9
 Severity:  minor           |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 On my site, I have a custom filter for `comments_template_query_args`
 which sets `$comment_args['meta_query']`. This works fine except when
 submitting a comment that needs to be approved. The result page will use
 the `?unapproved=` query parameter, triggering the bug.

 I've created a patch which I will attach here.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55218>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list