helper, css and jss loaded even when hikashop disabled

  • Posts: 105
  • Thank you received: 2
2 years 7 months ago #340708

-- HikaShop version -- : 4.5.0
-- Joomla version -- : 4.1.2
-- PHP version -- : 7.4

HI,

on my home page, there is no hikashop module...But i saw that several hikashop files are loaded (hikashop.js, frontend_default.css,..). So i tried to understand why. I found that the administrator\components\com_hikashop\helpers\helper.php is running, and it then goes to lines 3264++ and then loads the scripts "

$js = $configClass->get('load_js', 1) || hikashop_isClient('administrator');
$css = $configClass->get('load_css',1) || hikashop_isClient('administrator');

if($js)
$doc->addScript(HIKASHOP_JS.'hikashop.js?v='.HIKASHOP_RESSOURCE_VERSION);
if($css)
$doc->addStyleSheet(HIKASHOP_CSS.'hikashop.css?v='.HIKASHOP_RESSOURCE_VERSION);

it seems weird that this happens EVEN WHEN I DISABLE ALL HIKASHOP plugins, modules....

Please help. I don't want to load any hikashop file in the front end unless it is needed (for load page speed)
Kind regards

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 7 months ago #340710

Hi,

If you have the hikashop CSS/js files loaded on a page, it means that you have at least one plugin or module or extension using HikaShop loaded on the page.

In the main helper.php file, add that code at the beginning:

echo '<pre>';
var_dump(DEBUG_BACKTRACE_IGNORE_ARGS);
echo '</pre>';
exit;
That way, when the helper.php is called, it will give you the callstack so that you can easily know which file from which extension is loading HikaShop.

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

Time to create page: 0.032 seconds
Powered by Kunena Forum