I created a new module def called Staff. I changed Users doctype from Core to Staff. Now my app is stuck at login screen at verifying. Any fixes?
I assume you will have to redo the changes from the database now.
Ahh right. Thanks well.
Seems like you already solved it.
Can I please know which table you were looking into and how you changed it back?
Figured it out. Follow the steps below to change it back if you have made the same mistake.
- Enter mariadb container:
docker exec -it -u root {Mariadb Container Id} bash
- View root’s password:
echo $MYSQL_ROOT_PASSWORD
- Enter interactive shell:
mysql -uroot -p{Password}
- Switch to the site DB:
use {Database};
(You can find the database name fromsite_config.json
) - Update the module back:
update `tabDocType` set module='Core', _last_update=NOW() where name='user';
- Clear the site cache or restart the python container
Or,
- Log into bench console by running
bench console
- Run
frappe.db.set_value("DocType", "User", "module", "Core")
- Commit by
frappe.db.commit()
- Exit the console via
exit
- Clear cache and restart by
bench clear-cache && bench restart
Easier and safer
Good to know this.
Is bench available on production though? My live site is running on docker and the bench is not available due to the image size being too big.
I don’t have any experience with Docker. Maybe @revant_one can help you.
On normal installations, you can easily access the bench console.
the framework component of bench is available in docker image.
check output of command bench --help
@revant_one Hi Revant, didn’t you say many times that Bench is not available for production?
https://github.com/frappe/frappe_docker/issues/315
Definitely tried that Bench is not available from production images.
frappe framework has commands available
- frappe/frappe/commands at develop · frappe/frappe · GitHub
- frappe/frappe/utils/bench_helper.py at develop · frappe/frappe · GitHub
the links i shared above are part of frappe framework source code.