Conflict with All in One SEO’s Sitemap query
-
Hello, everyone. Please, let me know if I should report this anywhere else.
I’ve discovered an issue with having bbp_pre_get_posts_normalize_forum_visibility function attached to pre_get_posts action. It’s messing up a query from All in One SEO’s Sitemap plugin, which is for getting all the posts for its Sitemap generation, making it return only bbPress topics, when the query was asking for posts from several post types (not only forum topics).
The reason is the meta_query that bbp_pre_get_posts_normalize_forum_visibility is adding to the query, in order to exclude private forums. Which ends up making the query to only return posts of type ‘topic’.
The condition it adds should end up turning into a SQL query that doesn’t force all posts to require a meta key ‘bbp_forum_id’. So it should be done in a way that it only limits the posts with that meta key to those that meet the condition, but allows posts without that meta key.
- You must be logged in to reply to this topic.