Forums Forums Search & Filter Pro Error (500) with empty search strings or when clicking 'All categories'

Viewing 7 posts - 1 through 7 (of 7 total)
  • Anonymous
    #21986

    Hi there,

    First of all; I’m really loving this plugin. It’s by far the smoothest out there when using it with Woocommerce. However, I ran into a few problems which I didn’t manage to get fixed. I’m trying to replicate this in my theme: http://demo.designsandcode.com/sfpro-woo-mystile/product-search

    It’s working fine, except in the following cases. I tried with and without Ajax and even with the Mystile theme:

    1. If I want to change the order and I don’t provide a search string, it won’t return anything. In the console I’m getting a 500 (internal server error) with the URL behind it ([…]/zoekopdracht/?sort_order=date+asc&_sfm__price=0+50). If I follow this URL, I’m getting a blank page.

    2. When clicking a product-category all’s going well. But if I click ‘All categories’ to show all the categories (like in your demo), nothing happens. The URL doesn’t change and I’m getting an error 500 in the console. If I change the price slider, I also get the same error. But if I choose a category again and choosing another option after that, it’s doing fine.

    For example Chrome’s console says:

    GET http://[...]/zoekopdracht/?_sfm__price=0+50 500 (Internal Server Error)send 
    @ jquery.js?ver=1.11.2:4m.extend.ajax 
    @ jquery.js?ver=1.11.2:4m.(anonymous function) 
    @ jquery.js?ver=1.11.2:4fetchLegacyAjaxResults 
    @ search-filter-build.js?ver=1.4.3:678submitForm 
    @ search-filter-build.js?ver=1.4.3:1197

    Any ideas how I can solve this problem? I’m running the latest version of WordPress and your plugin.

    Thanks in advance!

    Anonymous
    #21987

    Did some additional testing:

    3. Reverting back to ‘All Categories’ when providing a search string is working fine.
    4. When deleting the search string, the error pops up again. So that’s really the problem.

    Anonymous
    #21988
    This reply has been marked as private.
    Ross Moderator
    #21989

    Perfect thanks Dennis!

    I’m concerned that the 500 errors might be from the queries being “too hungry” on your server resources.

    Could you check out your error logs or ask your host what errors are being thrown with these 500 messages?

    Just to let you know S&F 2.0 (in beta) has a caching system in place which makes searches a lot faster, but there is always a limit to complex searching and server resources.

    I’ll try to take a look later on today, in the meantime those error logs would be most useful.

    Thanks

    Anonymous
    #21990

    Wow, you’re really quick! And spot on:

    The error log is full with these lines:

    [Fri Jul 24 12:07:30 2015] [error] [client XXX] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /home/laura/domains/XXX/public_html/wp-includes/wp-db.php on line 2223, referer: http://XXX/zoekopdracht/?_sft_product_cat=armbanden&_sfm__price=0+50

    How could I prevent this?

    Anonymous
    #21992

    I changed ‘Results per page:’ from 999 to 50. No idea how 999 went up there, but setting it to 50 seems to solve the problem!

    Thanks!

    Ross Moderator
    #22037

    Fantastic!

Viewing 7 posts - 1 through 7 (of 7 total)