soberwp/controller

Controller requires sage namespace to be App

briggySmalls opened this issue ยท 0 comments

First: Thanks for a wonderful tool. I appreciate all the work you people are doing ๐Ÿ™‡

Upgrading my Sage theme to 9.0.5 has lead to no controllers being found - breaking my site - because I have changed the Sage namespace from the default App. I am greeted with the error:

Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Class 'App' not found in ...

Along with the path for the compiled page-header.blade.php with its reference to the App controller.

I have traced this to the assumptions in controller.php that the sage() function is to be fully namespaced as App\sage(). These are, as far as I can see:

I have verified that I can fix my site by changing these lines to use my theme's non-default namespace. I also need to make use of the sober/controller/namespace filter to ensure the controllers are found.

Having opened a discussion on the roots forum it was suggested I open an issue here.