User preferences page leads to 404

AI-generated summary

A user (1c7) reported that clicking “Preferences” on their local Discourse instance resulted in a 404 error, despite no codebase changes. They shared screenshots showing the issue before and after clicking the link, and noted that even entering safe mode didn’t resolve it. Johani suggested disabling plugins via /safe-mode, but 1c7 found that entering safe mode redirected them to the homepage, and the 404 persisted. 1c7 offered remote access via TeamViewer for debugging, but Johani declined, noting they couldn’t diagnose further. 1c7 thanked them for their time. Eventually, 1c7 resolved the issue by cloning a fresh copy of the Discourse repo, running migrations, and starting the server — which restored the Preferences page. They suspect the original issue may have stemmed from a theme or plugin, and later noted that running Sidekiq locally also fixed the 404, suggesting it was part of the root cause. The problem is now resolved on their local Macbook Pro running localhost:3000.

Thanks!

also, I am not sure why my “Preferences” get 404

Before click

After click “Preferences”

I didn’t change original codebase, so I am not sure why this happen

Terminal Screenshot

Above blue line is refresh http://localhost:3000/u/guokrfans/notifications
Below blue line is click “Preferences”

Try to disable any plugins you have in your-site.com/safe-mode

I would try it now, thanks!

http://localhost:3000/safe-mode

Click “Enter Safe Mode” it jump into homepage localhost:3000

Click top right corner and enter profile

Click “Preferences” got 404

If you want to,
we can do “TeamViewer”(or some other tool)
and let you remotely control my laptop

I’m not exactly sure what’s going on here, So I won’t be able to help much.

I’m sure someone else will pick this up though.

understood, Thanks for spend your time helping me on this issue!
Thank you very much!

I fixed the problem (2018-4-29)

(on my local Macbook Pro with localhost:3000)

I download discourse codebase again with

git clone https://github.com/discourse/discourse.git original_discourse

and then

bundle exec rake db:migrate
rails s

Now User Preferences Page is ok

I am not quite sure what’s the problem with the other discourse folder I have.
It could cause by theme or plugin that I install. maybe.

Anyway, now problem gone

— Update —
I think sidekiq is part of the problem, I didn’t run sidekiq at my local machine, and got 404
after I run sidekiq the 404 problem gone