I hadn’t touched my Magento installation in a couple of weeks and today I decided to try it out again. The frontpage worked OK, but when I tried to access the categories page on the admin it got stuck at the ajax loading. The Chrome console showed a bunch of css and js and loading errors. I deleted the folders /pub/static (except .htaccess) and var/view_preprocessed. Then I ran php bin/magento setup:static-content:deploy and php bin/magento setup:di:compile. After that the admin page for categories showed an error saying that setActive would not work on bool, which didn’t make sense because I hadn’t touched the magento code for categories. I went to the frontpage and it showed a blank page. View Source didn’t reveal any errors, only the Chrome console shows the following error: “GET http://localhost/magento_test/%7B%7BMEDIA_URL%7D%7Dstyles.css net::ERR_ABORTED 404 (Not Found)”
I ran the commands:
php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f en_US el_GR php bin/magento cache:clean php bin/magento cache:flush
Still the same. Can anyone tell me what to do, and more importantly, what I did wrong? 2 weeks ago everything was working fine; last thing I did was try to run some unit tests, but I can’t see how that could have broken the installation. I had also disabled 2 caches, which I re-enabled. Was it the di:compile command? Why?