HikaShop code called on all my site pages - Bug

  • Posts: 461
  • Thank you received: 36
2 years 1 month ago #345718

-- HikaShop version -- : 4.6.2
-- Joomla version -- : 3.10.11
-- PHP version -- : 7.4.32
-- Browser(s) name and version -- : Chrome

Hi guys,
I attach an image. As you can see that HikaShop code is called into Head on all my pages ( in the example into a Solidres menu item or here into a DPCalendar menu item).

As far as I know, it shouldn't.

Please, How can I avoid it ?

Attachments:
Last edit: 2 years 1 month ago by joomleb.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 month ago #345723

Hi,

These files will be added to the headers of the pages as long as HikaShop is loaded on the page. So even if the page is not a HikaShop page, and even if you don't have any cart module or products listing module displayed on the page, if you have at least one system plugin loading HikaShop on the page, these files will be added.
What is doing it is hard to say from where I am. However, I would recommend disabling the hikashop related plugins of the group "system" one by one while checking the headers of that page (and clearing your website cache each time) to check which plugin is doing it.
Note that it's not necessarily a plugin from us. For example, if AWOCoupon has a system plugin which loads HikaShop even though it doesn't do anything much with it on that page ( I don't know if you have it or if the extension does that, it's just an example ), you'll still get the files in the headers.

Please Log in or Create an account to join the conversation.

  • Posts: 461
  • Thank you received: 36
2 years 1 month ago #345768

Hi Nicolas,
the image I added above is referred to a live J 3.10.11 site:
--- /media/com_hikashop/css/hikashop.css?v=462
--- /media/com_hikashop/css/frontend_default.css?t=1665455375
--- /media/com_hikashop/css/font-awesome.css?v=5.2.0
--- /media/com_hikashop/js/hikashop.js?v=462

Many thanks to your instructions I tested it directly on Joomla 4.2.3. You can reproduce the issue by:
- Server: PHP 7.4.32 + MariaDB 10.5.15
- Joomla 4.2.3 clean installation
- Install HikaShop (business) 4.6.2 through the Joomla Upload Package File feature
- Inspecting Cassiopeia frontpage:
--- /media/com_hikashop/css/hikashop.css?v=462
--- /media/com_hikashop/css/frontend_default.css?t=1665793333
--- /media/com_hikashop/js/hikashop.js?v=462
- they disappear by disabling the HikaShop geolocation plugin

- on a Joomla 4.2.3 test site, previous installation with HikaMarket Multi Vendor 4.1.0
- Inspecting Cassiopeia frontpage:
--- /media/com_hikashop/css/hikashop.css?v=462
--- /media/com_hikashop/css/frontend_default.css?t=1666032210
--- /media/com_hikashop/js/hikashop.js?v=462
--- /media/com_hikamarket/css/frontend_default.css?v=410
--- /media/com_hikamarket/js/hikamarket.js?v=410
- I disabled step by step all the plugins, modules component beginning from HikaMarket without success
- I uninstalled HikaMarket, I uninstalled HikaShop and they disappered
- I Installed HikaShop (business) 4.6.2 through the Joomla Upload Package File feature
- Inspecting Cassiopeia frontpage:
--- /media/com_hikashop/css/hikashop.css?v=462
--- /media/com_hikashop/css/frontend_default.css?t=1666032210
--- /media/com_hikashop/js/hikashop.js?v=462
- again, they disappear by disabling the HikaShop geolocation plugin

So, I went back to the live J 3.10.11 site:
- again, they disappear by disabling the HikaShop geolocation plugin

As far as I know, being not a HikaShop page these files should not be added. Please, Can you confirm the issue ?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 month ago #345770

Hi,

Well, yes and no. If you use the "blocked zones" or "authorized zones" setting of the geolocation plugin, the plugin will load HikaShop to be able to check if the user should have access to the page as long as the current component displaying the page is listed in the "components" setting or if you left "all" in that setting. So it will have to load HikaShop even on pages where you don't have HikaShop displaying stuff. And if HikaShop is loaded, it will add these CSS / JS files in the headers of the page as it doesn't know if a module will need them or not down the road.
Also, regardless of how you configure the plugin, as long as it is activated, it will have to load HikaShop on the first page the user arrives on your website to calculate the zone of the user from his IP address (that's the goal of the plugin), even if the page doesn't need HikaShop. That's because the plugin doesn't know in advance if that first page will need the zone of the user or not later down the processing of the page (in a module for example).

So first, I would recommend checking the settings of the geolocation plugin. For example, if you're using the blocked/autorized zones settings of the plugin and you only want to block HikaShop pages in some areas, then you should enter com_hikashop in the component setting so that it doesn't need to load HikaShop on other pages than HikaShop pages.

Please Log in or Create an account to join the conversation.

  • Posts: 461
  • Thank you received: 36
2 years 1 month ago #345809

Hi Nicolas,
many thanks for your explications,

"...I would recommend checking the settings of the geolocation plugin..." = I add an image for you

Practically, till today, I was "not using" the plugin, what's happening is the result of the HikaShop installation (the geolocation plugin is enabled by default).
So, maybe, not all is running as expected...

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 month ago #345812

Hi,

The plugin is enabled by default. But indeed, it would be better to have it deactivated by default since it's useless if it's not configured first. We'll change that. Thanks for the feedback.

Please Log in or Create an account to join the conversation.

  • Posts: 461
  • Thank you received: 36
2 years 4 weeks ago #345973

Hi Nicolas,
thanks, will stay tuned.

Please, about the "Component checked" setting explained here
we should enter com_hikashop,com_hikamarket,com_hikaseriel separated with comma and without spaces, Right ?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 4 weeks ago #345984

That's correct, yes.

The following user(s) said Thank You: joomleb

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum