@@tedmanders, can you check if version 3.0.1 was working correctly for you?, can you check if version 3.0.1 was working correctly for you?
Sure, let me download it and I’ll post ASAP
Thanks
No, it doesn’t work. Takes a long to perform the query (in localhost) and returns a 500 error
Hi @curdaneta,
Please make update to latest version (3.1.2) and change one line in /functions/search.php file:
View post on imgur.com
Did it help?
Additionally please make this sql command in phpmyadmin:
SHOW VARIABLES LIKE 'auto_inc%';
and show me results.
Done,
But returns no results found
The sql command returns this
Variable_name Value
auto_increment_increment 1
auto_increment_offset. 1
https://www.dropbox.com/s/wu4nlq717sl7e7q/sql-1.png?dl=0
Make this change in plugin code, then try to search for post and copy query that will be displayed:
https://gbiorczyk.pl/img/8jYkbzF.png
Done, this is the result
SELECT DISTINCT SQL_CALC_FOUND_ROWS rd45fa_wp_posts.* FROM rd45fa_wp_posts INNER JOIN rd45fa_wp_postmeta AS a ON (a.post_id = rd45fa_wp_posts.ID) INNER JOIN rd45fa_wp_postmeta AS b ON ((b.meta_id = a.meta_id + 1) AND (b.post_id = rd45fa_wp_posts.ID)) INNER JOIN rd45fa_wp_posts AS c ON ((c.post_type = 'acf-field') AND ((c.post_content LIKE '%:"text"%') OR (c.post_content LIKE '%:"textarea"%') OR (c.post_content LIKE '%:"number"%') OR (c.post_content LIKE '%:"file"%'))) LEFT JOIN rd45fa_wp_posts AS d ON (d.ID = a.meta_value) WHERE 1=1 AND (((c.post_name = b.meta_value) AND (a.meta_value LIKE '%washer%')) OR ((rd45fa_wp_posts.post_title LIKE '%washer%') OR (rd45fa_wp_posts.post_content LIKE '%washer%') OR (rd45fa_wp_posts.post_excerpt LIKE '%washer%')) OR (d.post_title LIKE '%washer%')) AND rd45fa_wp_posts.post_type = 'parts' AND (rd45fa_wp_posts.post_status = 'publish' OR rd45fa_wp_posts.post_status = 'acf-disabled' OR rd45fa_wp_posts.post_status = 'private') ORDER BY rd45fa_wp_posts.post_title LIKE '{8290295b167a775f3456bcbdc90b18d96820f632ec17e3986acb6c8cf262675b}washer{8290295b167a775f3456bcbdc90b18d96820f632ec17e3986acb6c8cf262675b}' DESC, rd45fa_wp_posts.post_date DESC LIMIT 0, 6
Please try use “Lite mode”.
Returns this
SELECT DISTINCT SQL_CALC_FOUND_ROWS rd45fa_wp_posts.* FROM rd45fa_wp_posts INNER JOIN rd45fa_wp_postmeta AS a ON (a.post_id = rd45fa_wp_posts.ID) INNER JOIN rd45fa_wp_postmeta AS b ON ((b.meta_id = a.meta_id + 1) AND (b.post_id = rd45fa_wp_posts.ID)) WHERE 1=1 AND (((b.meta_value LIKE 'field_%') AND (a.meta_value LIKE '%washer%')) OR ((rd45fa_wp_posts.post_title LIKE '%washer%') OR (rd45fa_wp_posts.post_content LIKE '%washer%') OR (rd45fa_wp_posts.post_excerpt LIKE '%washer%'))) AND rd45fa_wp_posts.post_type = 'parts' AND (rd45fa_wp_posts.post_status = 'publish' OR rd45fa_wp_posts.post_status = 'acf-disabled' OR rd45fa_wp_posts.post_status = 'private') ORDER BY rd45fa_wp_posts.post_title LIKE '{37a6be52b8e6fd52a2af9233111f63520fc6dfa6618b5fafbf0969d5151b508b}washer{37a6be52b8e6fd52a2af9233111f63520fc6dfa6618b5fafbf0969d5151b508b}' DESC, rd45fa_wp_posts.post_date DESC LIMIT 0, 6
Please give me your database dump (only rd45fa_wp_posts and rd45fa_wp_postmeta) tables. Please delete all private data from them.
Hi @curdaneta,
I am sorry for waiting, but I was abroad and I didn’t have time. I checked your database. You have an error. I have marked green, what ACF field looks correctly saved, and wrong in red.
Do you understand the difference? If the field isn’t saved correctly, search can’t work.
Hi @mateuszgbiorczyk
Could you please show me where is the error. I can’t see any attached image/code
Thanks
Ciro