• Test case:
    – into search input box write just and the only apostrophe(‘)
    – URL will look: ?s=%27
    – in error log, you can see the message bellow.

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘))) AND wp_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘accord_posts’, ‘e’ at line 1 for query SELECT DISTINCT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_term_relationships AS trel ON (wp_posts.ID = trel.object_id) LEFT JOIN wp_term_taxonomy AS ttax ON ( ( ttax.taxonomy = ‘category’ OR ttax.taxonomy = ‘post_tag’ OR ttax.taxonomy = ‘post_format’ OR ttax.taxonomy = ‘accord_taxonomy’ OR ttax.taxonomy = ‘explandict_dictionary’ ) AND trel.term_taxonomy_id = ttax.term_taxonomy_id) LEFT JOIN wp_terms AS tter ON (ttax.term_id = tter.term_id) LEFT JOIN wp_comments AS cmt ON ( cmt.comment_post_ID = wp_posts.ID ) LEFT JOIN wp_postmeta AS m ON (wp_posts.ID = m.post_id) WHERE 1=1 AND ( ( ((())) AND wp_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘accord_posts’, ‘explandict’) AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_type = ‘attachment’ OR wp_posts.post_author = 1 AND wp_posts.post_status = ‘private’)) AND post_type != ‘revision’) AND post_status != ‘future’ ORDER BY wp_posts.post_title LIKE ‘%\\’%’ DESC, wp_posts.post_date DESC LIMIT 0, 10 made by require(‘wp-blog-header.php’), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts

Viewing 1 replies (of 1 total)
  • Plugin Author Sovrn

    (@sovrn)

    Hello @pavelinnuendo,

    Thank you for your inquiry and we apologize for any inconvenience this may be causing. We are actively investigating the issue and working on a solution.

    Thank you for your patience in resolving this issue.

    Regards,

    Sovrn Support

Viewing 1 replies (of 1 total)

The topic ‘Searching single apostrophe(‘) causes SQL error’ is closed to new replies.