Closed (fixed)
Project:
Administration menu
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Jul 2013 at 00:27 UTC
Updated:
14 Oct 2020 at 16:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dmousethe global $user->uid has chanche for $user->id(); or $GLOBALS['user']->id();
Comment #2
dmousepatch
Comment #3
klonosGave it a go with and without the patch at simplytest.me. With the patch applied I got this lengthy error:
After hitting the back button, I got this one:
Comment #4
dmouseYes, this issue is related https://drupal.org/node/1965552 but I dont have response
Comment #5
hass commentedYou need to load the user object and do not access it via GLOBAL.
Comment #6
mas5d2 commentedChanged global $user to $user = \Drupal::currentUser() as per comment #5 and https://drupal.org/node/2032447.
Changed $user->uid to $user->id() in those cases.
Comment #7
mas5d2 commentedChanged global $user to $user = \Drupal::currentUser() as per comment #5 and https://drupal.org/node/2032447.
Changed $user->uid to $user->id() in those cases.
Comment #8
klonosI tried testing this over @ simplytest.me, but I got this error:
Comment #9
klonos...this might be related: #1422876: Exception: theme() may not be called until all modules are loaded. in theme()
Comment #10
mas5d2 commentedYup, that looks like another bug: https://drupal.org/node/2178861.
When enabling the module, it looks like it can't create the cache table or something.
It appears to enable despite the fatal error, and you can test the above patch.
Comment #11
mas5d2 commentedChanged two more instances of $global user to Drupal::currentUser
Comment #12
mas5d2 commentedhttps://drupal.org/node/1965552 looks like it may solve this issue as well.
Comment #13
klonosWell I gave the new patch in #11 above and I did get the same error as in #8. I then tried switching to /admin to see if things work as you say, but all I got was a huge "The website has encountered an error. Please try again later." page with this:
Comment #14
klonos...upon refreshing the same page, the error changed to this (only the last portion of the above error):
Comment #15
klonosI also tried a combination of the patch in #11 together with #1965552-21: Convert service registration to YAML, but that fails to apply over @ simplytest.me.
I'll give it another go if someone provides instructions of the patches required to make it work.
Comment #16
klonosFiled #2181387: 8.x modules not downloaded/installed when selected as an additional project. for the issues I've been having over at simplytest.me with admin_menu 8.x. Until that issue is resolved, I cannot find a way to apply multiple patches to admin_menu 8.x. Perhaps I'll setup a local environment and test but my time is limited currently (more than it already was) so I can't promise anything.
Comment #17
jibranI have created a fork of admin_menu 8.x-3.x on github. Please help me fix it for Drupal 8
PRs are welcome. https://github.com/jibran/admin_menu
Comment #18
thallesThis module has been deprecated for Drupal 8.
For Drupal 8: the Admin Toolbar provides an experience similar to admin_menu with the core toolbar.
Comment #19
thalles