Discourse Admin function not accessible, suddenly

AI-generated summary

The Discourse admin function has suddenly become inaccessible. meatnordrink reported that the sandwich menu in the top-right corner is not responding, and attempting to access the admin area via /admin results in an error page.

Despite having admin privileges, meatnordrink suspects that the issue may be related to a recent update. itsbhanusharma suggested that admin privileges might have been removed, but this was ruled out.

supermathie recommended checking plugins and safe mode, as well as verifying admin rights via SSH. However, these suggestions did not resolve the issue. RGJ suggested checking the /about page, which confirmed that admin privileges were still active.

Ultimately, supermathie provided a solution by taking a backup, copying it, and rebuilding the app via the command line. This fixed the issue, and the sandwich menu is now functional again, as confirmed by meatnordrink.

Just today, I am unable to click on the sandwich menu in the top-right corner of our discourse forum page, where you typically access the admin functions. I click it and nothing happens.

When I try to enter the admin area via /admin, I get this:

I’ve always been able to access this area fine, up until today. I’ve tried it in two different browsers.

My first response would be to see if I need an update…but I can’t get there!

Any help is appreciated.

If You had some other admin, they have probably removed you as admin.

Thanks for the reply, @itsbhanusharma. That doesn’t appear to be the case. I’m the only one who does anything in the admin panel, and all the other people with admin privileges are locked out as well. (I just checked.)

We ran that update last week; I wonder if something failed. Typically I’d check that in the admin panel; is there a way to manually update things by SSH’ing into the server?

You might start with safe mode: https://discuss.uplift.us.us/safe-mode

But you should probably start with looking at your plugins.

Do you have other admin rights, e.g. on topics/posts?

If you ssh into your server you should be able to check your user for admin rights, for example on mine:

root@discourse-docker:~# /var/discourse/launcher enter app
root@discourse-docker-app:/var/www/discourse# rails c
[1] pry(main)> User.find_by(username: 'supermathie').admin?
=> true

If you want the list of admins, you can do:

[2] pry(main)> User.real.where(admin: true).pluck :username
=> ["supermathie"]

Do you see yourself listed as an admin in /about ?

Thanks all for the suggestions!

  • Safe mode doesn’t help; and we haven’t added a plug in in a long time, if ever.
  • I went in per @supermathie 's recommendation; we’re all still admins. We’re also shown in /about, as suggested by @RGJ.

I doubt this is an admin privileges issue, because none of us are even able to click on the sandwich menu; no menu appears when we do. Admin is not the only thing on that menu.

I personally suspect something went wrong with the last update, but I’m not sure how to safely re-do the update from the command line.

Take a backup:

root@discourse-docker-app:/# discourse backup
Starting backup...
…
[SUCCESS]
Backup done.
Output file is in: /var/www/discourse/public/backups/default/discourse-2020-01-20-163535-v20190603134013.tar.gz

back out to the host

copy the backup somewhere:

root@discourse-docker:~# cp /var/discourse/shared/standalone/backups/default/discourse-2020-01-20-163535-v20190603134013.tar.gz ~

start a rebuild:

root@discourse-docker:~# /var/discourse/launcher rebuild app

Thanks, @supermathie! That fixed the issue, whatever it was. The sandwich menu is now functional again.