-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential issues with Hyn Tenancy (View [auth.login] not found.) #112
Comments
Hello @robertdrakedennis, this package is bootstrapped within ThemeServiceProvided which is being auto-discovered by Laravel. Thus there is no guarantee that you can interact with themes from any other Service Provider. A middleware is a safe place to use the themes. However the in error stack that you shared I can't see the ThemeViewFinder being loaded (stack steps 79+80). Is it possible that the package is not loaded correctly? Try to resolve the Views Finder from the IoC inside your controller action: |
First of all, thank you immensely for the quick response. When I dump the IoC inside my controller right before the view is being called this is the entire output: https://hastebin.com/jutijukoxi.php That being said as you can see it is the theme view finder. I'll also go ahead and dump anything else you might find useful, please let me know if you need anything else. Config (igaster/laravel-theme): Composer.json: Config (hyn/tenancy): |
The main issue is I have no idea why themeViewFinder isn't in the error stack, but it's clearly being called through the pipeline, I've only experienced this issue the moment I started using |
a) So you haven't set some theme and it will pick the "default" theme. Is this the intented behaviour? (check switching themes for instructions about setting current theme) These are the paths where your views will be looked up:
b) In order to render a view from your theme you must define it a relative inside the theme folder... Can you verify that the view that you are trying to render exists in your current theme path? |
Yes currently in my env I have the theme set as "default" as I don't have any other themes done right now. https://i.imgur.com/wJBch3z.jpg my env: https://hastebin.com/zaxusuqeka.ini You can view here that there in indeed the view exists in the current theme path. If you need any other info from me please let me know. |
It seems fine... the login view should be picked from the theme path... Did you check the actual view path (ie with debug bar) and it is the default laravel view? Also can you verify that the view search paths have not manipulated by some other part of the application (ie multitenant middleware?). Try to dump the viewfinder ( |
Hi there, I believe I found the issue. In
When messing around trying to figure out the pipeline issue I added:
And the theme actually loads, I was thinking I should maybe bind hyn/tenancy's provider and just load your provider after. but I wasn't sure and wanted your opinion on it. As always I have greatly appreciated your patience. |
Hello @robertdrakedennis, if you wish to edit a package code then you must fork it and use your own version as a dependency. Not the best dev experience IMO! I was checking this package and it allows the view paths to be moved into tenant directories... Maybe this is the reason that themes are not working. You can a) try to load themeServiceProvider after the TendantcyServiceProvider b) Disable this feature from Let me know if this helps! |
The config didn't seem to effect it, but we somewhat have a solution for it that just isn't pretty. If I find anything else out I'll let you know. Thank you so much for the help! |
I'm currently trying to make a multi-tenant app that uses igaster themes to give tenants a bit of individuality. My main issue is in a tenants website the views arent being found and the themeViewFinder isn't actually being fired, or atleast I don't think it is.
https://hastebin.com/cifafamido.shell
^ error stack
What
Illuminate\View\FileViewFinder:findInPaths
returns:I tried adding theme view finder in my app service provider to see if the paths were actually returning. My output was: https://hastebin.com/oqahuxiriv.php
When adding it to a middleware to test it down the pipeline:
https://hastebin.com/ofeyixigim.php
Further down the pipeline it actually adds the path, regardless of overriding
view.finder
down the pipeline it still returns the default view finder error in the stack. So I'm not sure if this is the main issue exactly is. Any advice?The text was updated successfully, but these errors were encountered: