0

I have a local Magento 2 site, not much changed recently. But all of a sudden, all custom routing, no matter what module it is from, is broken. In admin and frontend, I get 404s (from Magento, not a default php 404) for all routes that are not Magento core.

I downloaded everything from the working live site, just in case I'm missing anything, rolled back the code several months just to see if it fixes it, synced the database, reinstalled composer, compiled and upgrade and cleared cache a million times.

I disabled all third party modules except one that has custom routes, then swapped it for another one. Same result. All 404s.

I'm at a total loss - how can I debug this?

4
  • Could you add your menu.xml in the question? Sep 8 '20 at 0:36
  • And routes.xml too. Sep 8 '20 at 0:53
  • There's no menu.xml and the routes.xml file hasn't changed since it worked. This also happens throughout multiple modules, so I'm pretty sure that this isn't an issue. Anyway as an example: <?xml version="1.0" ?> <config xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> <router id="standard"> <route frontName="modulename" id="modulename"> <module name="Telescopic_ModuleName"/> </route> </router> </config>
    – rita
    Sep 10 '20 at 7:22
  • A bit more info - I tracked this down in the source code through the Base Router and finally to the framework/Module/Dir/Reader.php class, that loads all modules into the $actionList. Turns out suddenly all custom modules are showing as empty folders via the RecursiveDirectoryIterator! But the files/subfolders are there. Why on earth would that not be readable any longer?
    – rita
    Sep 15 '20 at 12:27
1

Ok after a week of banging my head against a wall and debugging the Magento core code, the answer is infuriatingly simple. Anyone who might have the same issue on a Vagrant box (access problems of files!): Turns out - Oracle virtual box 5.2 breaks this! Upgrade to version 6.0 and you're good.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.