.js added multiple times in 2022.04
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
.js added multiple times in 2022.04
Hi,
updated to Aimeos 2022.04
After clicking on the attribute filter tree, the tree opens for a second and then closes again.
I checked the HTML and found that the catalog-filter.js are added multiple times in @yield('aimeos_header').
I could not find any reasons in \vendor\aimeos\ai-client-html\templates\client\html\catalog\lists\header.php
Any clue why?
Thank you!
updated to Aimeos 2022.04
After clicking on the attribute filter tree, the tree opens for a second and then closes again.
I checked the HTML and found that the catalog-filter.js are added multiple times in @yield('aimeos_header').
Code: Select all
...
<link rel="stylesheet" href="/vendor/shop/themes/gw/basket-mini.css?v=1">
<script defer src="/vendor/shop/themes/mytheme/basket-mini.js?v=1"></script>
<link rel="stylesheet" href="/vendor/shop/themes/gw/catalog-filter.css?v=1">
<script defer src="/vendor/shop/themes/mytheme/catalog-filter.js?v=1"></script>
<link rel="stylesheet" href="/vendor/shop/themes/gw/catalog-filter.css?v=1">
<script defer src="/vendor/shop/themes/mytheme/catalog-filter.js?v=1"></script>
<script defer src="/shop/count"></script>
<link rel="stylesheet" href="/vendor/shop/themes/mytheme/catalog-filter.css?v=1">
<script defer src="/vendor/shop/themes/mytheme/catalog-filter.js?v=1"></script>
<script defer src="/shop/count"></script>
<link rel="stylesheet" href="/vendor/shop/themes/gw/catalog-stage.css?v=1">
<script defer src="/vendor/shop/themes/gw/catalog-stage.js?v=1"></script>
<title>Unsere Produkte | Default</title>
<meta name="keywords" content="Unsere Produkte">
<meta name="description" content="Unsere Produkte">
<link rel="canonical" href="http://localhost/shop">
<meta name="application-name" content="Aimeos">
<link rel="stylesheet" href="/vendor/shop/themes/mytheme/catalog-lists.css?v=1">
<script defer src="/vendor/shop/themes/mytheme/catalog-lists.js?v=1"></script>
...
Any clue why?
Thank you!
Re: .js added multiple times in 2022.04
The catalog-filter.{css,js} files are included multiple times because the catalog filter plugin is added three times to the page (as catalog/filter, catalog/search and catalog/tree). Nevertheless, browsers are smart enough to download the files only once.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: .js added multiple times in 2022.04
ah ok, thanks.
Any other clue why the js for the attribute filter is being fired twice? After clicking on eg. "Color" tree is opened and closed again
Any other clue why the js for the attribute filter is being fired twice? After clicking on eg. "Color" tree is opened and closed again
Re: .js added multiple times in 2022.04
This was a side effect of including the JS files more than once because then, the event listeners are also registered multiple times for the same event. By clicking on the attribute type in the filter, the first call opens the filter and the second JS which registered for the same event closes it again.
We've reverted the change and released a new version of the aimeos/ai-client-html package. Please run "composer up" to get the latest version which fixes the issue.
We've reverted the change and released a new version of the aimeos/ai-client-html package. Please run "composer up" to get the latest version which fixes the issue.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: .js added multiple times in 2022.04
thanks, but now there are issues on the catalog detail page
after last "composer up" catalog-filter.css and .js are missing on catalog detail page
after last "composer up" catalog-filter.css and .js are missing on catalog detail page
Re: .js added multiple times in 2022.04
We can't reproduce that problem.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star