• Resolved maxguerra

    (@maxguerra)


    Hi,
    some days ago I opened a ticket for “Profile data issue”:

    I added some fields to profile module (es. name, email, mobile number, country).

    when I select another user profile from member list to see his details, I still get details of the user I’m logged with.

    It came out that it depended from plugin “Stories for UM” by Suiteplugins, you suggested me to disable cache from UM settings and everything went OK.

    Now I had to switch to UM Multilingual version 2.2.5 downladed from github, because my enviroment needs a 3 langages translation, and the same issue came out again, (when I go to another member’s profile I get data for profile I logged in with) and now neither disabling UM cache works out.

    Is there anything else I can try?

    Thanks a lot for your help. Sincerely. Mx.

Viewing 15 replies - 16 through 30 (of 43 total)
  • Thread Starter maxguerra

    (@maxguerra)

    Thread Starter maxguerra

    (@maxguerra)

    @missveronicatv

    I already tried it and I definitely want to use it, but as now, it has the same behaviour of the Country field (I guess it is bound to it), it gets showed in certain languages for certain countries, it is not for others.

    Thx. Mx.

    @maxguerra

    You can try this code snippet for the logout,
    set the UM logout option for all active roles to “Custom URL”
    and enter your home page URL https://www.cgfmanet.com/
    and the logout redirects to language page except Italian
    with Polylang language codes.

    add_filter( 'um_logout_redirect_url', 'um_logout_redirect_url_polylang', 10, 2 );
    
    function um_logout_redirect_url_polylang( $logout_redirect_url, $um_user_id ) {
    
        if( isset( $_COOKIE['pll_language'] )) {
            if( $_COOKIE['pll_language'] != 'it' ) {
                $logout_redirect_url = $logout_redirect_url . $_COOKIE['pll_language'] . '/';
            }
    
        } else {
    
            if( function_exists( 'pll_current_language' ) && pll_current_language() != 'it' ) {
                $logout_redirect_url = $logout_redirect_url . pll_current_language() . '/';
            }
        }
    
        return wp_safe_redirect( $logout_redirect_url );
    }

    Install the code snippet into your active theme’s functions.php file
    or use the “Code Snippets” plugin.

    https://wordpress.org/plugins/code-snippets/

    Thread Starter maxguerra

    (@maxguerra)

    I tried but unfortunately it’s not working,

    I added the snippet to functions.php, and set logout redirect to URL, but I always get redirected to Italian HP…

    Thx a lot. Mx.

    @maxguerra

    Polylang is updating your language cookie when changing language in your menu.

    https://imgur.com/a/2IrwRLP

    Verify again that you have setup UM logout option for all active roles including the administrator role to “Custom URL” and enter your home page URL https://www.cgfmanet.com/

    Thread Starter maxguerra

    (@maxguerra)

    Hi @missveronicatv,
    I’m very sorry, I changed to custom URL for every Role, even the unused ones, but I still can’t get redirected to the right home page…

    Really appreciate your help.

    Sincerely. Mx.

    @maxguerra

    Try to change the redirect URL to Google.

    Thread Starter maxguerra

    (@maxguerra)

    This is really unexpected….

    even setting https://www.google.com for all active users I’m redirected to my Italian homepage, if I remove the snippet (letting google configured) I’m redirected to Italian login page…that’s really weird….any tips?

    Thread Starter maxguerra

    (@maxguerra)

    if it can help….I set up a staging site and I let only UM active, without the snippet obviously, and https://www.google.com configured as my logout URL, still I’m redirected to my login page.

    I’m using UM Multilanguage version 2.2.5, maybe it’s a bug???

    Thx. Mx.

    @maxguerra

    Try to change the redirect URL to your Registration page URL.

    Thread Starter maxguerra

    (@maxguerra)

    Good Morning @missveronicatv,

    even with my registration page URL (and the snippet on) I always am redirected to my Italian Homepage. 🙁

    Thread Starter maxguerra

    (@maxguerra)

    without the sinppet I am redirected to my Italian registration page….

    Thread Starter maxguerra

    (@maxguerra)

    @missveronicatv
    don’t you worry about it anymore, I solved using a custom logout link in my menu with a static redirection snippet in my functions.php.

    I really appreciate your help. Thank you very much!!!!

    Now I miss the country issue, if you could help me with that I’m really OK.

    Thx again. Mx.

    Thread Starter maxguerra

    (@maxguerra)

    Hi,
    I created a new custom field called countrymx in profile moudules, to get countries and it works, it is being showed in Members list tagline for every language.

    How can I change the country flag extension to use this new custom field to show the appropriate flags?

    Thx as ever. Mx.

    @maxguerra

    Change line 44:

    $user_country = um_user( 'countrymx' ); // Get the users country name (Profile page) or country code (Account page)

Viewing 15 replies - 16 through 30 (of 43 total)
  • The topic ‘Profile data issue (again) with ML version’ is closed to new replies.