• Resolved Olv1do

    (@olv1do)


    First of all – great job creating very useful plugin!

    And now the issue itself:
    I started to notice that some combinations of 2 words when searched give the error message: Server error 500

    For example “black list”

    It definitely should find the the correct post.

    The interesting thing that the search works perfectly for the each word separately and even for the both words written without space (blacklist)

    I know that this is related to Relevancy because if I disable the plugin search works well.

    I went through the entire plugin settings page and wasn’t able to find anything relevant.

    Please help.

    Looking forward to your reply.

    https://ww.wp.xz.cn/plugins/relevanssi/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Server error 500 is such a generic error message that it doesn’t really help solving any problems. Do you have access to error logs that would contain a more specific error message?

    How many posts you have in the database? This might be a performance issue, if you have a large database and these are common words.

    Thread Starter Olv1do

    (@olv1do)

    I got this error in the log file:

    PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /var/www/html/wp-content/plugins/tablepress/models/model-table.php on line 277

    We have around 530 posts at the moment but the search is exclude a category that consists of 470 posts. So effectively it is searching only within 60-70 posts.

    I am new to WordPress but can understand that it is related to the TablePress plugin. (Disabling it resolved the issue)

    Do you have any suggestions on how to fix this without disabling the plugin?

    Thanks in advance.

    Plugin Author Mikko Saari

    (@msaari)

    Ok, the number of posts is definitely not an issue. If you keep TablePress on, but disable custom excerpts in Relevanssi, does that solve the issue?

    Thread Starter Olv1do

    (@olv1do)

    I’ve checked it and Yes it does.

    The thing is that it is only the combination of both plugins that cause this. If only one of them is enabled then I can search for anything without reaching the “memory limit”.

    Plugin Author Mikko Saari

    (@msaari)

    add_filter('relevanssi_pre_excerpt_content', 'rlv_remove_tablepress');
    function rlv_remove_tablepress($content) {
        remove_shortcode('table');
        return $content;
    }

    If you add this function to your theme functions.php, does that solve the problem?

    Thread Starter Olv1do

    (@olv1do)

    Nop it gives the same error.

    And the error log is exactly the same as well.

    Plugin Author Mikko Saari

    (@msaari)

    add_filter('relevanssi_pre_excerpt_content', 'rlv_remove_tablepress');
    function rlv_remove_tablepress($content) {
        $content = preg_replace('/[table.*?]/', '', $content);
        return $content;
    }

    Does this help?

    Thread Starter Olv1do

    (@olv1do)

    Yes great it resolved the issue.!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Search gives SERVER error 500’ is closed to new replies.