Several theme loading views problem

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Several theme loading views problem

Post by krzysiekp » 11 May 2022, 18:53

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 ?

krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Re: Several theme loading views problem

Post by krzysiekp » 12 May 2022, 12:25

@Aimeos it is important to me to solve this problem

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: Several theme loading views problem

Post by aimeos » 12 May 2022, 13:48

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Re: Several theme loading views problem

Post by krzysiekp » 12 May 2022, 14:09

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.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: Several theme loading views problem

Post by aimeos » 12 May 2022, 14:27

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Re: Several theme loading views problem

Post by krzysiekp » 12 May 2022, 14:36

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.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: Several theme loading views problem

Post by aimeos » 12 May 2022, 14:44

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)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Re: Several theme loading views problem

Post by krzysiekp » 12 May 2022, 14:54

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).

krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Re: Several theme loading views problem

Post by krzysiekp » 12 May 2022, 14:57

When I install themes by composer:

https://prnt.sc/QLOvZvsHLcfh

krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Re: Several theme loading views problem

Post by krzysiekp » 12 May 2022, 15:04

In packages\new-theme\views\catalog\detail.blade.php I use @extends('new-theme::base')

Post Reply