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.
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”.
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.
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.!