Skip to content
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

Included files not rendering after upgrade #132

Open
tayvc opened this issue Jan 14, 2021 · 2 comments
Open

Included files not rendering after upgrade #132

tayvc opened this issue Jan 14, 2021 · 2 comments

Comments

@tayvc
Copy link

tayvc commented Jan 14, 2021

I recently upgraded my project from Laravel 5.1 -> 6.x and also upgraded this theme package to 2.x following the migration instructions. My themes are definitely being set correctly with Theme::set($theme) however, any includes within my theme files no longer render. I am wondering if anyone else ran into this issue and if there is something I may have missed?

For example, this file has the following includes:
/resources/views/themes/theme1/templates/homepage-sweepstakes.blade.php

@include('includes.sweepstakes.portrait')
@include('includes.sweepstakes.you-can-win')

These files are located at:
/resources/views/themes/theme1/includes/sweepstakes/portrait.blade.php
/resources/views/themes/theme1/includes/sweepstakes/you-can-win.blade.php

And my themes config accurately sets the view paths to the following:

$paths = [
                realpath(base_path('resources/views/themes/theme1)),
                
                realpath(base_path('resources/views/themes/default')),
                
                realpath(base_path('resources/views')),
            ];

But I am getting the following error on page load:
"View [includes.sweepstakes.portrait] not found."

Any help is greatly appreciated! :)

@tayvc
Copy link
Author

tayvc commented Jan 20, 2021

I was looking through some older issues and found that my app('view.finder') is no longer returning the themeViewFinder class, but the default FileViewFinder one. Any ideas as to why this would have changed after updating the package to 2.x and Laravel to 6.x?

@igaster
Copy link
Owner

igaster commented Jan 20, 2021

This is strange! Is the package auto-discovered when you run "composer dump-autoload"?

If you migrated from old version, then pay attention that package namespace capitalization has been updated... Check your imports if you missed something. Also on Windows systems, paths might not be updated. I would suggest that you remove the package from your vendors directory, and run "composer install" to get a fresh installation...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants