- Posts: 105
- Thank you received: 2
helper, css and jss loaded even when hikashop disabled
4 years 5 months ago #340708
by rfonta
helper, css and jss loaded even when hikashop disabled was created by rfonta
-- 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
-- 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.
4 years 5 months ago #340710
by nicolas
Replied by nicolas on topic helper, css and jss loaded even when hikashop disabled
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:
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.
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:
Code:
echo '<pre>';
var_dump(DEBUG_BACKTRACE_IGNORE_ARGS);
echo '</pre>';
exit;
Please Log in or Create an account to join the conversation.
Time to create page: 0.177 seconds