After searching for keywords, the page does not match results

This topic has 5 replies, 2 voices, and was last updated 5 months ago ago by Luca Rossi

  • Avatar: dada2023
    dada2023
    Participant
    July 15, 2024 at 18:58

    Question 1: When I enter keywords in the search box, the search results can be returned through AJAX, but after pressing the Enter key, when I enter the search page, there are no matching results.

    Question 2: AJAX response is very slow! Is it a problem with the topic query database? What are your optimization suggestions?

    Files is visible for topic creator and
    support staff only.
    4 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    July 16, 2024 at 10:53

    Hi @dada2023,

    1. We’ve checked your search form and it’s working correctly(please check our screenshot). Could you please clear all the caches and check again?

    2. For your second question concerning the slow AJAX response, this could indeed be related to how the database queries are being handled or possibly due to other factors such as server performance or additional plugins that may impact the loading time. Here are a few optimization suggestions:
    – Ensure that your theme and all plugins are up to date.
    – Optimize your website’s database by cleaning up old data, reducing post revisions, and using a database optimization plugin.
    – Check your server’s response time and consider upgrading your hosting plan if necessary.
    – Implement caching solutions to reduce the load on your server and speed up content delivery.

    For more information, please take a look at these articles:

    https://www.8theme.com/documentation/xstore/troubleshooting/how-to-speed-up-my-website/
    https://www.8theme.com/documentation/xstore/troubleshooting/how-to-improve-wp-rocket-settings-with-xstore/

    Best Regards,
    8Theme’s Team

    Files is visible for topic creator and
    support staff only.
    Avatar: dada2023
    dada2023
    Participant
    July 16, 2024 at 12:17

    For example, if the search term entered is “studio”, ajax is a responsive product, but when the search button is clicked, no results are matched.

    Avatar: dada2023
    dada2023
    Participant
    July 16, 2024 at 17:52

    tail /usr/local/php/var/log/php-fpm.log -f

    
    [16-Jul-2024 23:31:50] WARNING: [pool www] child 31449 said into stderr: "PHP message: WordPress database error Column 'post_type' in IN/ALL/ANY subquery is ambiguous for query SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.ID"
    [16-Jul-2024 23:31:50] WARNING: [pool www] child 31449 said into stderr: "                                       FROM wp_posts  INNER JOIN wp_postmeta AS a ON ( a.post_id = wp_posts.ID ) LEFT JOIN wp_postmeta AS b ON ( (( b.post_id = a.post_id )) AND (( b.meta_key LIKE CONCAT( '\_', a.meta_key ) )) ) LEFT JOIN wp_posts AS c ON ( ( c.post_name = b.meta_value ) AND ( c.post_type = 'acf-field' ) AND (( c.post_content LIKE '%:"text"%' ) OR ( c.post_content LIKE '%:"textarea"%' ) OR ( c.post_content LIKE '%:"wysiwyg"%' ) OR ( c.post_content LIKE '%:"checkbox"%' ) OR ( c.post_content LIKE '%:"radio"%' )) ) "
    [16-Jul-2024 23:31:50] WARNING: [pool www] child 31449 said into stderr: "                                       WHERE 1=1  AND ( "
    [16-Jul-2024 23:31:50] WARNING: [pool www] child 31449 said into stderr: "  wp_posts.ID NOT IN ("
    [16-Jul-2024 23:31:50] WARNING: [pool www] child 31449 said into stderr: "                              SELECT object_id"
    [16-Jul-2024 23:31:50] WARNING: [pool www] child 31449 said into stderr: "                              FROM wp_term_relationships"
    [16-Jul-2024 23:31:50] WARNING: [pool www] child 31449 said into stderr: "                              WHERE term_taxonomy_id IN (6)"
    [16-Jul-2024 23:31:50] WARNING: [pool www] child 31449 said into stderr: "                      )"
    [16-Jul-2024 23:31:50] WARNING: [pool www] child 31449 said into stderr: ") AND ( ( ( b.meta_id IS NOT NULL ) AND ( c.ID IS NOT NULL ) AND ( a.meta_value LIKE '%studio%' ) ) OR ( ( wp_posts.post_title LIKE '%studio%' ) OR ( wp_posts.post_content LIKE '%studio%' ) OR ( wp_posts.post_excerpt LIKE '%studi..."
    [16-Jul-2024 23:31:51] WARNING: [pool www] child 31449 said into stderr: "PHP message: WordPress database error Column 'post_type' in IN/ALL/ANY subquery is ambiguous for query SELECT  DISTINCT wp_posts.ID"
    [16-Jul-2024 23:31:51] WARNING: [pool www] child 31449 said into stderr: "                       FROM wp_posts  INNER JOIN wp_postmeta AS a ON ( a.post_id = wp_posts.ID ) LEFT JOIN wp_postmeta AS b ON ( (( b.post_id = a.post_id )) AND (( b.meta_key LIKE CONCAT( '\_', a.meta_key ) )) ) LEFT JOIN wp_posts AS c ON ( ( c.post_name = b.meta_value ) AND ( c.post_type = 'acf-field' ) AND (( c.post_content LIKE '%:"text"%' ) OR ( c.post_content LIKE '%:"textarea"%' ) OR ( c.post_content LIKE '%:"wysiwyg"%' ) OR ( c.post_content LIKE '%:"checkbox"%' ) OR ( c.post_content LIKE '%:"radio"%' )) ) "
    [16-Jul-2024 23:31:51] WARNING: [pool www] child 31449 said into stderr: "                       WHERE 1=1  AND ( "
    [16-Jul-2024 23:31:51] WARNING: [pool www] child 31449 said into stderr: "  wp_posts.ID NOT IN ("
    [16-Jul-2024 23:31:51] WARNING: [pool www] child 31449 said into stderr: "                              SELECT object_id"
    [16-Jul-2024 23:31:51] WARNING: [pool www] child 31449 said into stderr: "                              FROM wp_term_relationships"
    [16-Jul-2024 23:31:51] WARNING: [pool www] child 31449 said into stderr: "                              WHERE term_taxonomy_id IN (6)"
    [16-Jul-2024 23:31:51] WARNING: [pool www] child 31449 said into stderr: "                      )"
    [16-Jul-2024 23:31:51] WARNING: [pool www] child 31449 said into stderr: ") AND ( ( ( b.meta_id IS NOT NULL ) AND ( c.ID IS NOT NULL ) AND ( a.meta_value LIKE '%studio%' ) ) OR ( ( wp_posts.post_title LIKE '%studio%' ) OR ( wp_posts.post_content LIKE '%studio%' ) OR ( wp_posts.post_excerpt LIKE '%studio%' ) ) )  AND wp_posts..."
    
    Avatar: Justin
    Luca Rossi
    Support staff
    July 17, 2024 at 07:50

    Dear @dada2023,

    We hope this message finds you well. Upon reviewing the error logs you submitted, it appears that there are issues pertaining to your MySQL database. We recommend that you reach out to your hosting provider to address this matter effectively.

    Should you require further assistance, please do not hesitate to contact us.

    Best Regards,
    The 8Theme Team

  • Viewing 5 results - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.