falcon
falcon copied to clipboard
🐛 [BUG] - problem with missin Jquery UI necessary for another advanced search module
Description
Hi I've a problem to use Advanced Search 5 PRO https://addons.prestashop.com/it/ricerche-filtri/2778-advanced-search-5-pro-filtri-e-faccette-seo.html
I report the answer of their support, because their module doesn't work with the theme, and it is required by the customer (I don't have control over every decision)
Hi,
I think you misunderstood my previous message, I purposefully disabled CCC for JS files, as you indicated me to do. The screenshot I sent you is from the page I said, with the CCC disabled, and I could see no error.
I just visited the link you sent, and while I did not see the error with Firefox, I did see it with Chrome. Upon investigation, the error is due to the fact that you have a module, "is_themecore", which is removing jQuery UI entirely from the page (in the file /modules/is_themecore/src/Hook/Assets.php). This is an issue because we ask PrestaShop to add it (it is a native library), but this module removes it, so we are missing some JavaScript code, causing this error.
I invite you to contact the developer of this module to get this fixed. Since their comments mention the fact that they want to remove Faceted Search assets, they should check if the module is enabled before removing these assets from the page.
Regards, Yoan - Presta-Module
I would be happy to be able to exclude is_themecore from the theme, or greatly reduce its management, because several things it does, in some cases, are not necessary, like partytown, or webp or changes in the htaccess file
in this case do I have to remove the code that manages the jquery UI deletion? thanks
Node.js version
v16
php version
8.1
OS and it's version
linux
Browsers
Chrome
Required module/theme
is_themecore
Reproduction steps
1 /modules/is_themecore/src/Hook/Assets.php
Logs
No response
removing those line the module doesn't work, it doesn't show products
I commented the lines that avoid the removal of jquery ui, and the error has been resolved, but it doesn't load the products after the selection, perhaps because some hooks have been changed, given that this module expects the same behavior as the faced module
however this module has no problems with falcon
https://addons.prestashop.com/it/ricerche-filtri/5545-filter-products-pro-advanced-search-of-products.html
I'm checking the scores on google page speed and now I see that they have worsened by almost 25-30 points, so I will make sure to remove that module and convince the shopkeeper, I don't want poor modules on the site :)
Hi @maofree,
yes, actually it's right about check before unregister if factedsearch module is enabled. TBH I don't want to use jQuery UI and the reason is performance. It's legacy UI library that we should avoid using. Version 4 gets rid of jQuery completely, so relying on this kind of library is a bottleneck in terms of performance.
Another problem about advance search is the module way it's loading products is different from core. So every variable assigned by is_themecore is undefined in template.
I would be happy to be able to exclude is_themecore from the theme, or greatly reduce its management, because several things it does, in some cases, are not necessary, like partytown, or webp or changes in the htaccess file
TBH it's not going to happened. This module will always contains core mechanics of the theme and in version 5 it will be even more coupled with the theme. You can disable web - no htaccess changes. You can disable partytown - no partytown script will be loaded. You can almost disable all of it's feature but core stuff have to stay. Without this module, the assets.yml file will not be parsed, etc.
when I was talking about webp, it was related to the fact that I can use webp management in prestashop, since the module doesn't work on litespeed. in any case it was just an outlet, because it's not easy to make shopkeepers understand certain things, they understand graphic things and usability more, because they see them, while the rest not much, because they don't realize
Hi now he answered to me in this mode
The reason the listing is empty is because an error occurs while rendering your theme template with the found product. First, there is " Undefined array key "listingDisplayType" " in your productlist.tpl, and even when this one is fixed, there is another occurring in the product-thumb.tpl, "Undefined array key "webpEnabled""
I've fixed these two problems adding a default value to those variables (also for pack-product.tpl and products-top.tpl) Is there a variable I can call in the theme's tpl file to find out if the webp option is active in the module?
Hi @maofree
webEnabled parameter is optional. You can remove it and function will retrieve this information from configuration