admin form posts to non-existent page
admin form posts to non-existent page
On a local dev machine I upgraded from cmsms-1.11.12 to 1.12.1 and then used the installation wizard thingy to get to 2.2.9. All is well except the login to the administrative backend gives "The requested URL /[my site]/admin/listcontent.php was not found on this server". This has happened on several sites now. I emptied tmp/cache and tmp/templates_c. Any help appreciated.
Re: admin form posts to non-existent page
I don't think listcontent.php is even part of 2.x. Perhaps just a browser cache thing? Clear your browser cache, or try it in incognito mode.
Not getting the answer you need? CMSMS support options
Re: admin form posts to non-existent page
Tried those ideas now and no dice. I tried reconstituting the database from live too.
Re: admin form posts to non-existent page
DIGI3 is right; there is no listcontent.php in the CMSMS 2.x admin folder.
Something definitely is directing your browser to that non-existent file. I would check:
- browser cache like DIGI3 suggested but seems you already did that. Note that previous redirects are difficult to circumvent from the same browser. So do try another browser or another computer.
- check .htaccess file (in the CMSMS root folder) if listcontent.php is mentioned there
- if exists: check .htaccess file (in the CMSMS 'admin' folder) if listcontent.php is mentioned there
- check config.php for the same
Something definitely is directing your browser to that non-existent file. I would check:
- browser cache like DIGI3 suggested but seems you already did that. Note that previous redirects are difficult to circumvent from the same browser. So do try another browser or another computer.
- check .htaccess file (in the CMSMS root folder) if listcontent.php is mentioned there
- if exists: check .htaccess file (in the CMSMS 'admin' folder) if listcontent.php is mentioned there
- check config.php for the same
Re: admin form posts to non-existent page
Oh I just remembered this happening before. It's the user preferences having a home page that no longer exists. You just need to change it to something that does, for each user that has it set.
Not getting the answer you need? CMSMS support options
Re: admin form posts to non-existent page
Aha! Setting the homepage to something else could be a bit tricky since I can't login! To the database!
Re: admin form posts to non-existent page
The database I can see connected to a working version of the site has the cms_content.default_content set to 1 for the homepage. That data is exactly what I have locally where the site does not allow admin login with the error above. After the cmsms-2.2.9-install.php it leaves it in a state where it won't allow admin login when running in php 7.2. My live server is due to be upgraded at which point the live site will not be adminstratable. Is there a way around this without having to do a fresh install and manually rebuild all the pages?
Re: admin form posts to non-existent page
That's the default home page for the site, I'm talking about the user's default admin page when they log in.
Look at the table cms_userprefs, and find the entry with the user_id matching the user in question, and the preference 'homepage'. Set the value to empty or NULL.
If you don't have the ability to edit the database, you can also try logging in, then when you get the 404 page, edit the urlbar to just sitename.com/admin. You may get the login screen again, but this time it should go to the regular admin panel. Go in to your user prefs and reset your admin homepage.
Look at the table cms_userprefs, and find the entry with the user_id matching the user in question, and the preference 'homepage'. Set the value to empty or NULL.
If you don't have the ability to edit the database, you can also try logging in, then when you get the 404 page, edit the urlbar to just sitename.com/admin. You may get the login screen again, but this time it should go to the regular admin panel. Go in to your user prefs and reset your admin homepage.
Not getting the answer you need? CMSMS support options