0
Welcome Guest! Login
0 items Join Now

mod_roknavmenu - SSL links not going to https, fixed - view

  • mod_roknavmenu - SSL links not going to https, fixed - view

    Posted 15 years 6 months ago
    • So I found that my footer menu links were respecting the "paramaters - system" > "SSL Enabled" being set to checked or unchecked.

      Well that pointed to mod_roknavmenu as the reason why ssl links weren't being set as such, and sure enough I found it to be the case since the default joomla menu module and mod_roknavmenu varied in the following:

      See /modules/mod_roknavmenu/lib/RokNavMenuTree.php , on or around line 312 - in the following (the last "else" block code is the fixed version)
      if ($tmp->type != 'separator' && $tmp->type != 'url') {     
                      $iSecure = $iParams->get('secure', 0);
       
                      if ($this->_params->get('url_type','relative') == 'full') {
                          $tmp->url = RokNavMenuTree::_getSecureUrl(JRoute::_($tmp->url, true, $iSecure),$iSecure);
                      } else {
                          $tmp->url = JRoute::_($tmp->url, true, $iSecure);//Added 2nd and 3rd argument - copied from the default joomla menu module
                      }
                  }

      The "else" was not passing the 2nd/3rd arguments to JRoute::_, so it just did the default (if your site is set in the global config to force SSL, it would be SSL, and if not, it wouldn't be). This was a problem for an ecommerce site since we only want the checkout to be secure to speed things up.

      In Summary: Go to line 312 and replace $tmp->url = JRoute::_($tmp->url); with $tmp->url = JRoute::_($tmp->url, true, $iSecure);
    • breeze's Avatar
    • breeze
    • Hero Rocketeer
    • Posts: 365
    • Thanks: 0

    Re: mod_roknavmenu - SSL links not going to https, fixed - view

    Posted 15 years 2 months ago
    • Kat05's Avatar
    • Kat05
    • Preeminent Rocketeer
    • Posts: 25898
    • Thanks: 334

    Re: mod_roknavmenu - SSL links not going to https, fixed - view

    Posted 15 years 2 months ago
    • hi there,

      thank you very much for this. i will forward this to the developers to take a look.

      kat :)
    • Kat05 / QA Lead & Support / Germany

Time to create page: 0.070 seconds