Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Right now, admin_menu_output()
uses the following pattern to generate a unique $cid string:
$cid = 'admin_menu:' . $user->uid . ':' . session_id() . ':' . $language->language;
But there are instances in which a user may have differing sets of administrative options even within the same session. With Domain Access, for example, a user could have content publishing options that change from domain to domain. It would be nice if modules could add to the $cid pattern in this kind of instance.
Comment | File | Size | Author |
---|---|---|---|
#3 | admin_menu-cache_cid_alter-1635956-3.patch | 2.36 KB | MrHaroldA |
Comments
Comment #1
Les LimPatch attached.
Comment #2
MrHaroldA CreditAttribution: MrHaroldA commentedThe proposed solution does not work: the $cid is created in at least 2 places, and the call to domain_get_domain() will result in fatal errors on sites without the Domain Access module enabled.
I'll try to create a working patch today. Or something like that ;)
Comment #3
MrHaroldA CreditAttribution: MrHaroldA commentedHere ya go!
I've recreated the patch above; this time with no direct Domains support, as that is a task for the Domain Access module, or you can implement the following code yourself:
Comment #4
Les Lim@MrHaroldA: That domain code was part of the api.php documentation file, as an example implementation of the new hook. I think the patch still needs some kind of example hook there.
Comment #5
MrHaroldA CreditAttribution: MrHaroldA commentedAh! That explains why the tests didn't fail ;)
Comment #6
Greg__ CreditAttribution: Greg__ commentedI tested the patch and it works for me.
I had the same issue with cache between domain so I did use the hook exemple in #3.
Thanks
Comment #7
truls1502I am sorry for no reply until now.
There are many issues regarding this module admin_menu which is a bit difficult for us to follow up since some of the issues might be already outdated, or is already fixed by the module or any other modules or itself core which means that the problem might no longer need to be fixed.
We can see that the issue has been created for a few years ago, I hope it is okay for you that I am postponing the issue, and give you around two weeks. If you still face the problem, could you tell us the step by step when until you get the error message or what is frustrated you, and a list of modules you are using related to admin_menu and a screenshot that might help us? So it makes us easier to reproduce your issue.
However, after two weeks with no feedback - we will close this issue. So in case, you noticed it after the issue is closed, do not hesitate to reopen it like and fill information which is mentioned above.
So before giving us a feedback, do you mind to test it again with our latest 7.x-3.x-dev?
Thank you for understanding! :)
Comment #8
truls1502This issue has been automatically marked as closed because it has not had recent activity after the last post.
However, if you or someone is still facing the same issue as described to the issue, could you please to re-open the issue by changing the status of the issue, and add an explanation with more details which can help us to reproduce your situation.
Again, thank you for your contributions! :)