0

My wp site: https://mgraselbar.com/ runs very well as long as I browse it as a user.. but when I login it crashes.. all it's content git mixed. And when I logout it runs well again.

I get this in console when I login:

Uncaught TypeError: Cannot read property 'getElementsByTagName' of null
    at Object.e.inserted (can.custom.min.js?ver=3.7.1:26)
    at n.fn.init.t.fn.<computed> [as append] (can.custom.min.js?ver=3.7.1:28)
    at AdminBar.createMenuItem (admin-bar.min.js?ver=3.0.9:2)
    at admin-bar.min.js?ver=3.0.9:2
    at Array.map (<anonymous>)
    at AdminBar.createMenuItems (admin-bar.min.js?ver=3.0.9:2)
    at AdminBar.createMenu (admin-bar.min.js?ver=3.0.9:2)
    at AdminBar.onInit (admin-bar.min.js?ver=3.0.9:2)
    at AdminBar.Module.trigger (common-modules.min.js?ver=3.0.9:2)
    at AdminBar.e.each.r.<computed> [as trigger] (common-modules.min.js?ver=3.0.9:2)
3
  • I don't think that AdminBar is a standard WordPress thing. Where does that script come from, and the can.custom.min.js script too? The problem is its trying to find child elements of another element that doesn't exist, but what that would be I don't know. What is this supposed do? Can you retry this with unminified scripts to get better a more informative call stack (e.g. define SCRIPT_DEBUG in your wp-config)? – Rup Sep 18 '20 at 16:00
  • Have you turned off the built-in WordPress admin bar for the user that you're logged in as, but you've got a plugin that's assuming that the admin bar will be there and trying to extend it? You could try turning the bar back on for your user: 'show toolbar when viewing site' on your profile page. – Rup Sep 18 '20 at 16:22
  • Did you use some third-party-plugins? If you do, deactivate them all and check this issue again. If you can't login to deactivate your plugins, you can do it via FTP, just add a '-1' at the plugins directory. Try it and tell us if somewhat changes. – Viewer Sep 18 '20 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.