Page 1 of 4

Several theme loading views problem

Posted: 11 May 2022, 18:53
by krzysiekp
I have two laravel themes:
- packages/new-theme/*
- packages/new-theme-sk/*

and I have two shops:
- pl => assign "new-theme"
- sk => assign "new-theme-sk"

When I go to the product card in the "pl" shop, the aimeos template loads from "new-theme-sk" =>

Code: Select all

packages\new-theme-sk\client\html\templates\catalog\detail\body-standard.blade.php
.

Several other templates from "client\html\templates" also show from "new-theme-sk".

But base.blade.php is loaded with the correct theme => "new-theme"

Why ?

Re: Several theme loading views problem

Posted: 12 May 2022, 12:25
by krzysiekp
@Aimeos it is important to me to solve this problem

Re: Several theme loading views problem

Posted: 12 May 2022, 13:48
by aimeos
Sounds like a caching problem. Can you disable the Aimeos content cache in your ./config/shop.php and see if it solves the problem?

https://github.com/aimeos/aimeos-laravel#hints

Re: Several theme loading views problem

Posted: 12 May 2022, 14:09
by krzysiekp
I have this entry in shop.php and i still have a problem
Structure "new-theme" is:
https://prnt.sc/CKdj7qT4ikKL

And "new-theme-sk" has the same structure.

Re: Several theme loading views problem

Posted: 12 May 2022, 14:27
by aimeos
You are using Laravel Blade templates and Laravel has its own cache for them. Clear that cache and see if it changes something on the page where the problem occurred (there will be still a problem when you switch themes but only to know if that's the problem):

Code: Select all

php artisan view:clear

Re: Several theme loading views problem

Posted: 12 May 2022, 14:36
by krzysiekp
I clear all laravel caches and there is still a problem.
I changed the theme and went back to the previous one and is still a problem.

Re: Several theme loading views problem

Posted: 12 May 2022, 14:44
by aimeos
That's what I've said: As soon as you switch the theme, the problem will reoccur.

Will it be correct if you:
1.) php artisan view:clear
2.) reload page (layout should be OK first time)
3.) php artisan view:clear
4.) switch theme
5.) reload page (layout should be OK too if the Laravel view cache is the problem)

Re: Several theme loading views problem

Posted: 12 May 2022, 14:54
by krzysiekp
After php artisan clear:cache is still a problem. Clearing the cache doesn't matter.
The general template loads fine (new-theme) and the middle part of the page loads from a different theme (new-theme-sk).

Re: Several theme loading views problem

Posted: 12 May 2022, 14:57
by krzysiekp
When I install themes by composer:

https://prnt.sc/QLOvZvsHLcfh

Re: Several theme loading views problem

Posted: 12 May 2022, 15:04
by krzysiekp
In packages\new-theme\views\catalog\detail.blade.php I use @extends('new-theme::base')