This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

IE8 support and shortcode in searchform.php – infinite loop

Home Forums Product Support Forums Ajax Search Pro for WordPress Support IE8 support and shortcode in searchform.php – infinite loop

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #33216
    Ideaz20Ideaz20
    Participant

    Dear support,

    we have one site with ASP Pro installed that has been getting segfaults (SIGSEGV). Upon further inspection of core dumps, we have determined that the cause is an infinite loop, caused by ASP that calls get_search_form() recursively until everything crashes.

    By analyzing access logs we have determined that this is caused by bots with MSIE agent strings and “Display the default search box on old browsers?” being turned on.

    This is our searchform.php:
    if (conditions) {
    echo do_shortcode(‘[wd_asp id=2]‘);
    } else {
    echo do_shortcode(‘[wd_asp id=1]‘);
    }

    How should we handle this to prevent segfaults?

    Best regards,
    Andrej

    #33232
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Make sure to turn that option of for starters, to make sure to prevent that behaviour. I’m almost certain it has to do with something else as well, as there are no reports of this similar issue, I can’t see any problems on our live servers either.
    Only thing I can think of is, when the plugin injects into the default search hook, it calls the default search function when IE8 string is found, and then maybe there is something executing that same hook again and it gets into the endless loop.
    I tested this on our local servers by changing the conditions, but it seemed all right.

    #33279
    Ideaz20Ideaz20
    Participant

    Hi,

    IE8 support is turned off, so no more segfaults. I’m attaching the backtrace. IMHO the loop might be unavoidable if search shortcode is in searchform.php because of the way get_search_form() function works. Maybe add a warning to the IE8 toggle?

    Best regards

    #33290
    Ernest MarcinkoErnest Marcinko
    Keymaster

    That is it for sure then. If you can, you should avoid placing the shorcode directly to that file, use the automatic replacement feature instead. That should avoid the segdefault error as well.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.