Jump to content

ps_imageslider on home page not always displaying


Recommended Posts

I am having an intermittent issue where the ps_imageslider module I am using is not always displaying. On a mobile device it does not display at all, and there are times when it vanishes on the Desktop browser. I can't tell if it's a hook not firing or an error happening along the way that dies silently. I am using v1.7.5.2 with module that shipped with it. It's only being used on the homepage right now.

Has anyone had this issue with this module before?  Where can I look further to find out what is going wrong?  

    public function hookDisplayHeader($params)
    {
	    //die( __function__ ); --> does not always print!
        $this->context->controller->registerStylesheet('modules-homeslider', 'modules/'.$this->name.'/css/homeslider.css', ['media' => 'all', 'priority' => 150]);
        $this->context->controller->registerJavascript('modules-responsiveslides', 'modules/'.$this->name.'/js/responsiveslides.min.js', ['position' => 'bottom', 'priority' => 150]);
        $this->context->controller->registerJavascript('modules-homeslider', 'modules/'.$this->name.'/js/homeslider.js', ['position' => 'bottom', 'priority' => 150]);
    }
    
    public function renderWidget($hookName = null, array $configuration = [])
    {
	    //die( __function__ ); --> does not always print!
		if (!$this->isCached($this->templateFile, $this->getCacheId())) {
            $this->smarty->assign($this->getWidgetVariables($hookName, $configuration));
        }

        return $this->fetch($this->templateFile, $this->getCacheId());
    }

 

Link to comment
Share on other sites

Well... I took var_dumps all over the place, and finally found myself in an SQL section of the `getHookModuleExecList` function in the Hook class... at which point I went into my database, go the module id for the imageslider module, and from the `module_shop` table, I found that SOMEHOW the `enabled_device` field was set to 3 for that ID and all the other ones were set to 7.  I set it to 7 and well what do you know, it's working all the time now.   

WTF

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...