• Resolved thijs4alliander

    (@thijs4alliander)


    I have entered an URL containing a custom login page, this URL contains & signs after the ? mark because we got multiple parameters.

    But when UM redirects to this page it converts the & to &
    Then the URL does not work anymore.

    I would expect that the URL would not be converted into something else, or at least a possibility to escape. Does anyone know how to fix this or see how the bug is happening

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support andrewshu

    (@andrewshu)

    Hello @thijs4alliander

    Sorry for the late answer.

    I checked my local site and I haven’t this issue. Did you set up redirect in the UM login form setting? In the “Options” sidebar?

    Thank you.

    Thread Starter thijs4alliander

    (@thijs4alliander)

    Hello Andrewshu,
    Thanks for your reaction,

    We set it up on the UM/Settings/Acces/Restrictions Content
    We set Global Site Acces to “Site accessible to logged in users”
    We filled in our own Custom Redirect URL which includes &

    The UM works mostly as expected, users that are not logged in are redirected to the custom URL. But every & sign gets replaced by & #038; (without the space like the html code over here https://www.toptal.com/designers/htmlarrows/punctuation/ampersand/)

    This makes the URL not work properly anymore.

    Thread Starter thijs4alliander

    (@thijs4alliander)

    Excuse my multiple tries, the editor converts the html code to a real ampersand, something that does not happen in the navigation
    https://www.toptal.com/designers/htmlarrows/punctuation/ampersand/

    Plugin Support andrewshu

    (@andrewshu)

    Hello @thijs4alliander

    Thank you for your feedback. We will fix this in the next release. As a hotfix you could use this code in functions.php file in your child theme:

    add_action( 'um_access_check_global_settings', 'my_access_check_global_settings', 10 );
    function my_access_check_global_settings() {
    	$arr_params = array(
            'param1' => 'value1',
            'param2' => 'value2',
        );
    	$redirect = add_query_arg( $arr_params, um_get_core_page( 'login' ) );
    	wp_redirect( esc_url_raw( $redirect ) );
        exit();
    }

    You need to change the $arr_params array to your params from the link.

    Thank you.

    Thread Starter thijs4alliander

    (@thijs4alliander)

    @andrewshu Thank you for your fast reaction, hotfix and fix in next release.

    Plugin Support andrewshu

    (@andrewshu)

    Hello @thijs4alliander

    Did it help you? Can I close this topic?

    Thank you.

    Thread Starter thijs4alliander

    (@thijs4alliander)

    @andrewshu We didn’t get the hotfix to work. We decided to go with an other hotfix for now (knowing it will be fixed in next release) of a shorten url.
    I’ll close the topic.

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

The topic ‘Redirect url & changes to &’ is closed to new replies.