1

I'm using Ultimate member with WPML and logout not working and when click on logout it redirects to again login where there is not login form rather than its showing user as login.

Scenario :

1) Login from login page

2) Logout from Logout page (Ultimate member built in logout page)

-> Still its showing user as login when he/she redirects after click on Logout page

Solutions Tried :

1) Removed Cache plugin 2) exclude Login and Logout page from cache using wp-rocket 3) Tried this solution using this Link : https://wpml.org/forums/topic/wpml-ultimate-member-login-logout-redirection-url-for-both-languages-i-use/

to use config file in wpml configuration text (used below code) :

<wpml-config>
  <admin-texts>
    <key name="um_cached_role_member">
      <key name="login_redirect_url"/>
      <key name="logout_redirect_url"/>
    </key>
  </admin-texts>
</wpml-config>

4) Tried this solution from this link : https://wpml.org/forums/topic/ultimate-member-logout-link-not-working-in-different-languages/

But in above solution 4) i don't know how to pass logout in wpml text configuration file

------> Above issue is resolved but now the only issue is that any action i perform not work until i hard refresh (ctrl + shift + R).

Scenario of issue :

I login then on topbar there is menu for profile and Logout but now when i click on logo it redirects to home page with topbar display me login which is wrong because as i login already it should be profile and logout button.

But when i hard refresh (ctrl + shift + R) it works properly similarly when i walk to other page similar issue it doesn't work as expected till i hard refresh.

Plugin Used are : Ultimate member,WPML,WP-rocket

raju_odi
  • 1,433
  • 13
  • 29

3 Answers3

2

Just check in case, it is useful for others, I found that by changing under "WPML" > "Languages" > "Language URL format"

For Example-

from: "Language name added as a parameter (hidden link - French) "

to: "Different languages in directories (hidden link - English, hidden link - French) "

It all worked!

Priyanka Modi
  • 1,594
  • 1
  • 8
  • 14
1

Might try to insert this in functions.php and tell what happens.

session_cache_limiter('none');
header('Cache-control: max-age='.60*60*24*365 .', public');
header('Last-Modified: '.gmdate(DATE_RFC1123,filemtime(__file__)));
header("Content-type: application/javascript;  charset=utf-8");
T.Todua
  • 53,146
  • 19
  • 236
  • 237
  • I think its caching issue for sure and when i pass query string to url then its working but still requires hard refresh(`ctrl + shift + R`) otherwise its not working – raju_odi Jan 21 '19 at 13:39
  • @raju_eww Please Post one comment, instead of multi-messaged. Please use EDIT and remove extra comments. about caching, it could be because some plugins cache the pages. It need further digg into the problem, which I can't unfortunately. ( – T.Todua Jan 21 '19 at 14:14
-1

is easy create new page and paste this sharecode [utimatemember_loggdout]. that is and good luck