Plugin Author
Maya
(@tdgu)
Hi,
Thanks for your feedback. Unfortunate i’am not able to reproduce the issue, do you use a specific configuration for Relevansi? Can you send some print-screens?
Thanks
Plugin Author
Maya
(@tdgu)
Also can you see if there’s another plugin which actually interfere with the search?
I am trying to post message with link to screenshots here, somehow it’s not getting published π
-
This reply was modified 6 years, 8 months ago by Saurabh Saneja. Reason: for better understanding
Plugin Author
Maya
(@tdgu)
Thanks for the images.
Can you try a last ting before i check further, disable all plugins expcept Post Types Order and Relevanssi Search, then activate a WordPress default theme. Then check again if the search behave the same.
Thanks man; I am sorry for not deactivating all the plugins before reporting the issue.
I deactivated all plugins and everything WORKED.
I looked for the culprit and to my surprise it’s THEME MY LOGIN plugin. It’s really weird thank’s for the advice man. π
Hi,
I have investigated further. Apparently theme my login is fetching something from wp posts table when I use search form to search something:
I installed Query Monitor plugin to debug and theme my login is doing this when I search something
SELECT wp_posts.*
FROM wp_posts
INNER JOIN wp_postmeta
ON ( wp_posts.ID = wp_postmeta.post_id )
WHERE 1=1
AND ( wp_postmeta.meta_key = '_tml_action' )
AND wp_posts.post_type = 'page'
AND ((wp_posts.post_status <> 'trash'
AND wp_posts.post_status <> 'auto-draft'))
GROUP BY wp_posts.ID
ORDER BY wp_posts.menu_order, wp_posts.post_date DESC
Screenshot link
Thanks,
Saurabh
I can confirm the issue is caused by the Theme My Login plugin. It has a pre_get_posts
function to exclude the TML pages from the search, and that is breaking down Relevanssi searches when combined with the pre_get_posts
function from Post Types Order. Relevanssi can handle one of those filters, but not both at the same time: removing one of those filters will result in a working search.
One fix would be an option to disable Post Type Order for search pages. After all, it makes no sense to use both PTO and Relevanssi at the same time anyway, so for those who want to use a search plugin, it would be nice to be able to disable PTO for searches. It would solve this problem as well.
Thank you very much for looking into the issue. So how can PTO be disabled for searches?
Thanks,
Saurabh π
Thank you so much. New version of Relevanssi is out and issue is resolved π