Mobile template always on

More
10 years 6 months ago #46515 by rubenreyes
Hello,

We are having some problems with category template in mobile.

We have created a category template that we use to generate a list of items in JSON format. The regular page can be found here: dev.perfectprinting.com/thought-leadership and we force a component-only Joomla template together with our JSON Flexicontent category template as follows: dev.perfectprinting.com/thought-leadersh...clayout=perfect-json

From a desktop browser you can see the JSON output, but when we do the same in a mobile phone we get the assigned template output.

Here is out setup:

Joomla 3.2
FLEXIcontent 2.1.3 r1857

In the FC main configuration we have the following setting:
Use Mobile Layouts: No, only in fields

Any idea what could be the problem?
Thank you!

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

More
10 years 6 months ago #46522 by ggppdk
Replied by ggppdk on topic Mobile template always on
Hello

A) yes it is a bug,

1. the mobile usage is always ON
2. when mobile is detected then the URL variable that is used is:
clayout_mobile




B) it was not reported so far, because when it is disabled in Component parameters then the mobile layout PARAMETER does not appear, thus it cannot be save, thus the bug does not manifest in frontend

but in case of custom layout via parameter, it does manifest



HOT FIX:
in file
components/com_flexicontent/views/category/view.html.php

Replace:
Code:
// (a) Decide to use mobile or normal category template layout $use_mobile_layouts = $params->get('use_mobile_layouts', 0 ); $force_desktop_layout = $params->get('force_desktop_layout', 0 ); $mobileDetector = flexicontent_html::getMobileDetector(); $isMobile = $mobileDetector->isMobile(); $isTablet = $mobileDetector->isTablet(); $useMobile = $force_desktop_layout ? $isMobile && !$isTablet : $isMobile; $_clayout = $useMobile ? 'clayout_mobile' : 'clayout';
with:
Code:
// (a) Decide to use mobile or normal category template layout $useMobile = $params->get('use_mobile_layouts', 0 ); if ($useMobile) { $force_desktop_layout = $params->get('force_desktop_layout', 0 ); $mobileDetector = flexicontent_html::getMobileDetector(); $isMobile = $mobileDetector->isMobile(); $isTablet = $mobileDetector->isTablet(); $useMobile = $force_desktop_layout ? $isMobile && !$isTablet : $isMobile; } $_clayout = $useMobile ? 'clayout_mobile' : 'clayout';


similar for item view:
components/com_flexicontent/views/item/view.html.php

replace:
Code:
// (a) Decide to use mobile or normal item template layout $use_mobile_layouts = $params->get('use_mobile_layouts', 0 ); $force_desktop_layout = $params->get('force_desktop_layout', 0 ); $mobileDetector = flexicontent_html::getMobileDetector(); $isMobile = $mobileDetector->isMobile(); $isTablet = $mobileDetector->isTablet(); $useMobile = $force_desktop_layout ? $isMobile && !$isTablet : $isMobile; $_ilayout = $useMobile ? 'ilayout_mobile' : 'ilayout';
with:
Code:
// (a) Decide to use mobile or normal item template layout $useMobile = $params->get('use_mobile_layouts', 0 ); if ($useMobile) { $force_desktop_layout = $params->get('force_desktop_layout', 0 ); $mobileDetector = flexicontent_html::getMobileDetector(); $isMobile = $mobileDetector->isMobile(); $isTablet = $mobileDetector->isTablet(); $useMobile = $force_desktop_layout ? $isMobile && !$isTablet : $isMobile; } $_ilayout = $useMobile ? 'ilayout_mobile' : 'ilayout';



Finally:
since this is a development site i suggest that you use v2.2.0 BETA (now stable enough for usage in DEV website) which also fixes CSS in J3.2 among many other important improvements and even greater speed for large web-sites (e.g. 20,000 web-sites many time faster than Joomla itself)

also i think that addressint field frontend view is broken, i did have time to look at it yet, though


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
10 years 5 months ago #47321 by rubenreyes
Thank you very much, we will implement the fix!

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

More
10 years 5 months ago #47339 by ggppdk
Replied by ggppdk on topic Mobile template always on
Hello

the fix is already in our v2.2.0 BETA over a month ago


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
10 years 4 months ago #47643 by rubenreyes
Where can I download 2.2?

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

More
10 years 4 months ago #47655 by ggppdk
Replied by ggppdk on topic Mobile template always on
Hello

here it is:

www.flexicontent.org/forum/index ... =viewtopic

trying to finish things for v2.2.0

1. close a few remaining known issues
2. finish user-group authoring configuration (per user authoring configuration) that we have now is not practical it needs inherit from a user-group to be really practical
3. finish support for image/URL parameters of J3, we know they are very limited, but this offers compatibility with existing sites and some Joomla 3rd party modules

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.309 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline