Problem
Was creating a module. Everything was good, but at some point admin page just stopped working. Can't say on what paticular moment, cause I used bin/magento
to flush caches, compile and deploy. Now it's loading only main page localhost/
. No other links. Error 404
.
What was done
-
Checked, if the right admin url in
/Library/WebServer/Documents/app/etc/env.php
. -
sudo chmod -R 777 ./
-> Flush cache ->sudo chmod -R 777 ./
-> Deploy static content ->sudo chmod -R 777 ./
-> Compile ->sudo chmod -R 777 ./
. -
Copied
.htaccess
to the root from source folder on the site.
Additional information
It happens the second time. First time I thought it was one-time mistake. I can't remember, if the symptoms are exactly the same, but they are similar. That time was Magento 2.0
. Now it is 2.1
.
Best Answer
404 pages on native Magento pages while developing a module are often a consequence of a bug in the said module.
To find out try disabling the module and see if the error goes away:
To find out what the error is I suggest you switch to developer mode if not already done as it provides way more verbosity in logs and errors:
Now try access the page that triggers the 404 and check
var/log
files content.