- Issue created by @smustgrave
- Status changed to Needs review
12 months ago 5:07pm 18 December 2023 - πΊπΈUnited States smustgrave
Normally would recommend deprecating this service but it doesn't install at all on 10.2 so if we REALLY wanted to deprecate. Would have to fix the current version to <=10.1 and deprecate the service, start a new branch with the service name changed.
- Assigned to RandalV
- Status changed to Needs work
12 months ago 5:19pm 18 December 2023 - π§πͺBelgium RandalV
Hi @smustgrave,
Thank you for the report.
Sadly, renaming the service would partly nullify this module's functionality.
We need to override the account proxy object so the active roles are taken into account by anyone addressing the `current_user` service.If we didn't do this, calling
\Drupal::service('current_user')->getRoles();
would just return the configured roles for that user rather than the roles selected in Msqrole.Currently, the token service is used in msqrole.manager to allow for tokens in the custom cache tags to be invalidated.
Maybe this is not needed, the less services we can have msqrole.manager depend on, the less situations could lead to circular references.So essentially I see two possible solutions..
- Remove token dependency in the msqrole.manager service (and perhaps more if possible)
- Don't add the msqrole.manager service via the service arguments in the overridden `current_user` service
I do not have the time right now, but I'll do some testing to see what works best performance wise etc, and will push a solution ASAP.
- Status changed to Needs review
10 months ago 3:53pm 24 January 2024 - Status changed to Needs work
10 months ago 3:56pm 24 January 2024 - Status changed to Needs review
10 months ago 4:10pm 24 January 2024 - πΊπΈUnited States smustgrave
Removed variable from RoleManager, initial quick testing seems to still be working.
- Status changed to Needs work
10 months ago 9:32pm 30 January 2024 - πΊπΈUnited States papagrande US West Coast
I tried to apply the patch from MR!4 and it failed. I'm very confused because the patch I downloaded from Gitlab doesn't look the same as https://git.drupalcode.org/project/msqrole/-/merge_requests/4/diffs#note....
- Status changed to Needs review
10 months ago 9:43pm 30 January 2024 - πΊπΈUnited States smustgrave
It applies cleanly to the dev branch, that can be seen in the MR. If youβre using a tagged version that may not apply.
- πΊπΈUnited States papagrande US West Coast
Ah, thanks. I forgot about updating to the dev version.
The patch applies and the error goes away. Beyond that, I don't know this module well enough to properly review the changes.
-
RandalV β
committed 3073528c on 1.0.x authored by
smustgrave β
Issue #3409535: Circular reference detected
-
RandalV β
committed 3073528c on 1.0.x authored by
smustgrave β
- Issue was unassigned.
- Status changed to Fixed
10 months ago 6:49pm 6 February 2024 - π§πͺBelgium RandalV
Sorry for the delayed response.
Thanks for giving a good start on the merge request, I did have to alter some more stuff (removing the dependencies on token etc).
I added a new tagged release (1.0.13) that should fix this!
Automatically closed - issue fixed for 2 weeks with no activity.