Unmasquerade link doesn't work without logging out.

Created on 7 February 2023, almost 2 years ago

Problem/Motivation

I can't completely unmasquerade after I masquerade as a different user.

Steps to reproduce

As an administrator, I go to /admin/people and masquerade as an editor. This changes permissions to editor permissions and the name in the toolbar replaces my name. When I click on “unmasquerade” in the toolbar, the name switches back to mine and my permissions are restored.. If I try to masquerade again, I see the following error message:

Error message
You are masquerading already. Please switch back to your account to masquerade as another user.

Also, “Unmasquerade” is still in the toolbar. I need to sign out and sign back in to resolve this.

I am currently using Drupal 9.5.2 and Masquerade 8.x-2.0-beta4

I have tried the following to resolve this:

Upgrading to 8.x-2.0-rc1

I thought there may be some caching issue so I tested the following patches:
https://www.drupal.org/files/issues/2020-01-08/unmasquerade_visibility_c...

unmasquerade link shows in menu when not masquerading? (Although I don’t think I am masquerading) https://www.drupal.org/files/issues/2023-01-19/3271001-unmasquerade_link...
https://www.drupal.org/files/issues/2022-08-25/3271001-16.patch
https://www.drupal.org/files/issues/2022-05-06/3271001.patch

I have also tried changing the _csrf_token: 'TRUE' to FALSE and removing it all together.

Any other ideas as to what this could be? I can find anything similar in the issues queue.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Component

User interface

Created by

🇺🇸United States kkubali

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024