• Resolved Gaia Clary

    (@gaia-clary)


    I have seen errors during database access when i tried to filter by category. The error shows up in this SELECT statement:

    SELECT *, title * 5 + content + comment * 0.75 + tag * 0.75 + link * 0 + author + category * 0.75 + excerpt + taxonomy + customfield + mysqlcolumn AS tf \n\t\t\t\t\t FROM wp_relevanssi WHERE (term LIKE '%cylinder' OR term LIKE 'cylinder%') AND doc IN (\n\t\t\t\t\t\t\tSELECT ID FROM wp_posts WHERE 1=1 \n\t\t\t\t\t\t\tAND (\n\t\t\t\t\t\t\t\tSELECT COUNT(1) \n\t\t\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t\tWHERE term_taxonomy_id IN (555,557) \n\t\t\t\t\t\t\t\tAND object_id = wp_posts.ID ) = 2\n\t\t\t\t\t\t\t) AND doc NOT IN (16442,16446,0) AND ((doc IN (SELECT DISTINCT(ID) FROM wp_posts\n\t\t\tWHERE post_type IN ('page'))) OR (doc = -1)) ORDER BY tf DESC LIMIT 500

    I could track the problem down to

    wp-content/plugins/relevanssi/lib/searh.py

    I suspect the problem is caused by an unintended underscore. I searched for this string:

    "FROM $wpdb->_term_relationships"

    and removed the first underscore as follows:

    "FROM $wpdb->term_relationships"

    And now my queries work as expected (as far as i can tell at least). Maybe you want to check this and possibly fix it.

    https://www.ads-software.com/plugins/relevanssi/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘i suspect there is a typo in search.php’ is closed to new replies.