soberwp / controller

Composer package to enable a controller when using Blade with Sage 9
MIT License
368 stars 43 forks source link

Partials folder conflicts with theme's partial folder. #137

Closed Xilonz closed 4 years ago

Xilonz commented 4 years ago

The controller tries to load a partial (which has a trait, not a class) that has the same name as an partial in my theme's folder. Unfortunately I don't have time to set up a sage theme with an example.

This is somewhat expected, but not documented behavior. Is it possible to rename the Partials to Traits, for example?

eg: app/Controllers/Partials/example and resources/views/partials/example.blade.php and the debugger will output something like:

App
... all the app data

Notice: Trying to get property 'class' of non-object in /app/web/app/themes/mytheme/vendor/soberwp/controller/src/Blade/Debugger.php on line 51

Notice: Trying to get property 'tree' of non-object in /app/web/app/themes/mytheme/vendor/soberwp/controller/src/Blade/Debugger.php on line 54

Notice: Trying to get property 'data' of non-object in /app/web/app/themes/mytheme/vendor/soberwp/controller/src/Blade/Debugger.php on line 61

Notice: Trying to get property 'methods' of non-object in /app/web/app/themes/mytheme/vendor/soberwp/controller/src/Blade/Debugger.php on line 66
Xilonz commented 4 years ago

Never mind, this is totally not true. This message shows if there's only the main App contoller and nothing else.