Youjoomla Support Forums (http://www.youjoomla.com/joomla_support/index.php)
-   YouGrids (http://www.youjoomla.com/joomla_support/forumdisplay.php?f=171)
-   -   [SOLVED] Menu fails on small resolution when Joomla Caching is on (http://www.youjoomla.com/joomla_support/showthread.php?t=11438)

adiehm 07-24-2013 08:55 AM

[SOLVED] Menu fails on small resolution when Joomla Caching is on
 
When the screen width is made narrow enough to make the menu switch to the mobile version or the site is viewed on a mobile device the the menu no longer functions if the Joomla Caching is enabled

With Joomla Caching turned on no mater what menu option is selected the website remains on the home page - Switch Joomla Caching off and it comes good again - Switch Joomla Caching on and the menu will work 2 or 3 times than stops.

I see this on both "Developer Box" and "Yougrids 1.04"

Ipswich - Yamanto Metal Traders "Developer Box" Caching is off - Menu works on narrow screen width

Car and Truck Licences - Ipswich Prodrive "Yougrids 1.04" Caching is on - Menu does not work on narrow screen width.

I have changed the Custom.CSS file on both sites
I have changed yjresponsive.js on ipswichprodrive.com.au function size_menu() and function resize() widths changed from 980 to 768

Are you sure your are posting in product assigned forum?: Yes

What is your CMS version?: Joomla 2.5

MySQL Version: 5.x

PHP version: 5.x

Link to installation: Ipswich - Yamanto Metal Traders

Have you edited any files? If yes tell us which ones.: Yes

Is this personal or client website?: Client

neo 07-29-2013 07:57 AM

did you test the menus on our demos ? what particular caching setting are you talking about. module caching or ?

adiehm 07-29-2013 08:08 AM

did you test the menus on our demos ? : no
what particular caching setting are you talking about? :
Joomla - admin - Site - Global Config - System - Cache Settings.
Cache: On Conservative or on Progressive
Cache Handler :File
Cache Time: 15

neo 07-30-2013 08:53 AM

il perform few tests on yjsg and reply back

neo 07-30-2013 09:09 AM

u right , the mobile menu list is not being populated properly , will work on this today and advise , keep it off for now please

neo 07-30-2013 09:21 AM

see my last post for fix

neo 07-30-2013 09:37 AM

working on better option since menuitem->link does not match the actual link and JRoute is not working properly , disregard solution above for few min untill I reply back

neo 07-30-2013 09:57 AM

1 Attachment(s)
OK here is better one wich check all possible route options



template/YJSG_BASED_TEMPLATE/layouts/yjsg_mobilemenu.php

change lines 61-65

PHP Code:

        if($menuitem->id == $SetActiveId){
            
$selected ' selected="selected"';
        }else{
            
$selected ='';
        } 



to


PHP Code:

        
        
        
if($menuitem->id == $SetActiveId){
            
$selected ' selected="selected"';
        }else{
            
$selected ='';
        }
        
$menuitem->flink $menuitem->link;
        switch (
$menuitem->type)
        {
            case 
'separator' :
                continue;

            case 
'url' :
                if ((
strpos($menuitem->link'index.php?') === 0) && (strpos($menuitem->link'Itemid=') === false))
                {
                    
$menuitem->flink $menuitem->link.'&Itemid='.$menuitem->id;
                }
                break;

            case 
'alias' :
                
$menuitem->flink 'index.php?Itemid='.$menuitem->params->get('aliasoptions');
                break;

            default :
                
$router JSite::getRouter();
                if (
$router->getMode() == JROUTER_MODE_SEF)
                {
                    
$menuitem->flink 'index.php?Itemid='.$menuitem->id;
                }
                else
                {
                    
$menuitem->flink .= '&Itemid='.$menuitem->id;
                }
                break;
        }

        if (
strcasecmp(substr($menuitem->flink04), 'http') && (strpos($menuitem->flink'index.php?') !== false))
        {
            
$menuitem->flink JRoute::_($menuitem->flinktrue$menuitem->params->get('secure'));
        }
        else
        {
            
$menuitem->flink JRoute::_($menuitem->flink);
        } 


or download the attached file , unzip it and replace existing

template/YJSG_BASED_TEMPLATE/layouts/yjsg_mobilemenu.php

with the new one

adiehm 08-01-2013 07:12 PM

Thanks for the quick response, but there is still a minor problem - The fix allows you to navigate using the menu to all pages except back to the Home page.

I installed the zip file on this site Car and Truck Licences - Ipswich Prodrive

Second point: Not sure if this is by design or not, The mobile menu always shows "Home" regardless of the page you are on.

neo 08-01-2013 07:50 PM

I see , sef is not converting those links correctly ,
your link is index.php truck and mobile link is
index.php/component/content/category/9-truck-lessons?layout=blog

SIlviu is out till Tuesday , I am defending our server with arms and legs since about 6 days from an awful attack and getting ready to release new template, il have him look deeper in to this one he is back.


All times are GMT -4. The time now is 06:45 PM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.