My site says “Login is disabled while the site is in read only mode?” so I cannot log in:
Visit yoursite.com/u/admin-login
i.e. help.gulshankumar.net/u/admin-login
and then try to log in if that works?
Hi,
Thanks for the response. I tried, it says -
{"errors":["The site is in read only mode. Interactions are disabled."],"error_type":"read_only"}
Depending upon how you enabled the read only mode, here is some help:
or
I had enabled read-only mode from admin area from where we do backup.
Second option I suggested above should work for you. Please do not log out the next time you put your forum into read only mode.
Ps: Try searching before posting a new query, You may find your solution into a similar question asked by someone else.
Sorry, I couldn’t understand above written steps. Do I need to edit any code?
You don’t have to edit anything. Just ssh into your discourse server and do the following:
cd /var/discourse
./launcher enter app
rails c
Discourse.disable_readonly_mode(Discourse::USER_READONLY_MODE_KEY)
Try again, You may have entered the commands incorrectly. It should return like this:
I replicated above steps. Still, site is showing in the read-only mode.
Discourse.disable_readonly_mode
Not working.
Discourse.disable_readonly_mode(Discourse::USER_READONLY_MODE_KEY)
Working.
Thanks a lot. Now I am able to login.