Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Carsten,

    Are you using version 5.3.1? Version 5.3 had some issues with JavaScript.

    Thread Starter Carsten Lund

    (@carsten-lund)

    yes, I’m using 5.3.1, but I can’t say it has happened after updating

    Plugin Author Andrea Tarantini

    (@dontdream)

    Could you see if versions 5.2.4 and 5.3 work correctly?

    You can quickly change versions using the WP Rollback plugin.

    Thread Starter Carsten Lund

    (@carsten-lund)

    5.3 fixed the non collapsible form hight, which then is back in 5.3.1

    From 5.3.1 style sheet:

    element.style {
    display: block;
    height: 0px;
    }

    None of the rollback fixed the clear form issue.

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Carsten,

    Please try these workarounds:

    1. To fix the form height, open the file bps-request.php, locate line 134:

    //	if (isset ($form_fields[$form]))  return [$form_fields[$form], $errors[$form]];
    

    and un-comment it:

    	if (isset ($form_fields[$form]))  return [$form_fields[$form], $errors[$form]];
    

    2. To fix the Clear problem, add this code to bp-custom.php:

    add_action ('bps_before_filters', 'change_action');
    function change_action ($F)
    {
    	// enter the correct directory URL, followed by '?bps_form=clear', e.g.:
    	$F->action = 'https://example.com/directory/?bps_form=clear';
    }

    Do they change anything?

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi Andrea, thanks for the suggestions.

    1. I have tried to clear cache several times to test this, and apperantly un-commenting helped on the form hight, until a search has been performed, then the hight is 0px again.

    2. This code with correct directory URL, breaks the site.

    Regards
    Carsten

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hello Carsten,

    1. It’s hard to tell without looking at your site, but I’m afraid that the first problem is caused by scripts not properly enqueued, or by calls to wp_register_script() and/or wp_enqueue_script() made before the wp_enqueue_scripts action hook is processed, see the first note on:

    https://developer.wordpress.org/reference/functions/wp_enqueue_script/

    Could you make a list of all the scripts you are using, and how they are added to your page?

    2. Did you replace my sample URL with your correct URL? Could you please post your code and the error you get?

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi Andrea, here is a video of what is going on, does this help?

    View post on imgur.com

    2. Yes I replaced the sample url to the correct url:

    add_action (‘bps_before_filters’, ‘change_action’);
    function change_action ($F)
    {
    // enter the correct directory URL, followed by ‘?bps_form=clear’, e.g.:
    $F->action = ‘https://domain.com/search/?bps_form=clear’;
    }

    This is the error I get:
    Unable to connect to this website The website at https://domain.com/ may be temporarily down or it has been permanently moved to a new URL.
    ERR_FAILED

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi Andrea, the clear search issue has been located to this snippet:

    //Returns to search page instead of members directory
    
    add_action( 'bps_before_filters', 'change_action' );
    function change_action( $F ) {
    	$F->action = 'https://domain.com/search/?bps_form=clear';
    }
    

    Regards
    Carsten

    Plugin Author Andrea Tarantini

    (@dontdream)

    Probably that’s a former suggestion of mine, when you needed to go back to the search page when hitting Clear.

    Try to remove all the snippets starting with:

    add_action( 'bps_before_filters', ....

    and, by default, Clear will bring you back to the directory page.

    Alternatively you can keep one of those snippets, and make sure you use the real, working URL of the page where you wish to return.

    About the problem with the form height, I’m investigating, and I’ll keep you informed.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Issues with the search form after updating’ is closed to new replies.