Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Florian

WordPress-Database-Error

Hi,

i’ve install the Plugin and set the options for my custom post type. If i’ll filter by one specific column, only the second click on filter works. By the first one, i’ve got the following error…

WordPress-Datenbank-Fehler Not unique table/alias: 'wp_postmeta' für Abfrage SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id WHERE 1=1 AND (
( wp_postmeta.meta_key = 'country' AND wp_postmeta.meta_value != '' )
AND
( mt1.meta_key = 'anrede' AND mt1.meta_value = 'Frau' )
) AND wp_posts.post_type = 'licad_form' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_status = 'future' OR wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending' OR wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY CAST(wp_postmeta.meta_value AS CHAR) DESC LIMIT 0, 20 von WP_Posts_List_Table->prepare_items, wp_edit_posts_query, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, QM_DB->query

Do you have an idea?

best regards,
Florian

7 years, 6 months ago
Stefan van den Dungen Gronovius
Developer

Hi Florian,

I think that there is another plugin or something in your theme that is also altering the wp_query in a not compatible WordPress way. You could try to disable some other plugins to see if it fixes the problem. You probably want to test some plugins first that does something on the WordPress backend like filtering, searching stuff etc.

If that doesn’t work you can try to switch between themes to see if the problem comes from within the current theme. If so you could try to search for some filters that alters the WP_Query. For example pre_get_post or posts_where ( https://codex.wordpress.org/Plugin_API/Filter_Reference/posts_where )

7 years, 6 months ago
Stefan van den Dungen Gronovius
Developer

Florian,

Did you already found out what is causing the error?
Otherwise I will close this ticket.

7 years, 5 months ago
Florian

Hi,
i’ve got an own filter who produced the Error!

Thank’s,
Florian

7 years, 5 months ago
Stefan van den Dungen Gronovius
Developer

Ok great you’ve found it. Does that also mean you find a way to make it work on the overview?

7 years, 5 months ago

You must be logged in to reply to this topic.