Pro plugin is crashing other plugins
-
I have another plugin that uses WP_Query. The query result has to “IF( post_parent = 0, ID, post_parent )” tacked onto the end of the generated query.
First, how the Hell are you doing this, and how do I get around it in another plugin?Also, I am surprised that you haven’t heard about this from other plugin developers.
Example – Pro plug added the last IF… to the query, making it invalid.
SELECT
SQL_CALC_FOUND_ROWS *
FROM (SELECT DISTINCT wp_posts.ID
FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = ‘_EventEndDateUTC’ )
WHERE 1=1 AND (
wp_postmeta.meta_key = ‘_EventStartDateUTC’
) AND wp_posts.post_type = ‘tribe_events’ AND ((wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘future’)) AND (wp_postmeta.meta_value >= ‘2022-08-05 21:14:46’ OR (wp_postmeta.meta_value <= ‘2022-08-05 21:14:46’ AND tribe_event_end_date.meta_value >= ‘2022-08-05 21:14:46’ ))
GROUP BY wp_posts.ID
ORDER BY wp_posts.post_date ASC) a
GROUP BY IF( post_parent = 0, ID, post_parent )
- The topic ‘Pro plugin is crashing other plugins’ is closed to new replies.