Support » Plugin: FileBird - WordPress Media Library Folders & File Manager » Column ‘ID’ in where clause is ambiguous.

  • Resolved Lionel Pointet



    I’m using Filebird Lite with Polylang.
    I just ran into an issue while browsing the folders. What I did is the following:
    1. Select a folder
    2. Switch language to a specific one

    Then the following error occurs: Column ‘ID’ in where clause is ambiguous.

    It seems it’s the “Folder::postsClauses” method that causes this, because there is no prefix before the “ID” field.

    I used the following workaround:

    function my_fix_filebird_clauses( $clauses ) {
    	global $wpdb;
    	foreach( $clauses as &$clause ) {
    		// Add the prefix for posts.ID field when it's missing
    		$clause = str_replace( 'AND ID ', 'AND ' . $wpdb->posts . '.ID ', $clause );
    	return $clauses;
    add_filter( 'posts_clauses', 'my_fix_filebird_clauses', PHP_INT_MAX );

    Thanks for your support and plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Bruce


    Hi @lpointet

    Thanks for using FileBird and sorry about this issue.
    Please note that the issue has been fixed in our soon-to-be-released general update, please anticipate.

    Kind regards,

    Plugin Support Bruce


    Hi @lpointet ,

    The update has been released, please install and check again.
    Thank you!

    Kind regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Column ‘ID’ in where clause is ambiguous.’ is closed to new replies.