Desktop / Mobile switch problem after rename template

GK User
Wed Feb 20, 2013 2:47 pm
Hello,

i renew my membership especially for the following problem. The service employees insured me that you will help me in this case.

My proplem concerns the switch to desktop on mobile devices. It will be work fine, if i dont rename the template/ template folder. There nothing happens with the click on the button "switch to desktop version" after changing the temaplte name.I try all posibilities.

At the first attempt i changed only the template.xml code.
At the second attempt i changed the code in the template.xml and the template language name.
At the last attempt i changed additionally the name in the the gk_scripts.js and head.php concerning the code for cookies.

No success. It works only with the template name gk_game_magazine. i can not understand why. There must be any file which prevented the functionality after changing the template name.

Maybe it is a caching problem. Please note that iam using the gk cache an gkextcache. The Plugins are already in the right order. I didn`t use the quickstart version.

Please help.
User avatar
Junior Boarder

GK User
Thu Feb 21, 2013 9:02 am
To change template name you need to make more changes than only in templateDetails.xml file or directory name, please download template and then use some tools which can search phrase inside file, then look for all occurrences of 'game_magazine' because probably in template scripts the cookie file name is still old and you use different template name.
User avatar
Platinum Boarder

GK User
Thu Feb 21, 2013 6:10 pm
Thank you for your quick answer. I comprehend what you say but i did it aleready. I used notepad for searching in all files in the complete joomla folder and replace all with the new template name.

Had your programming team already test the functionality after changing the template name in the past? I am sure there must be a problem in the code.

I was wondering about this code in the gavickExtCache.php

Code: Select all
      if($this->params->get('template_name', '') == '')
      {
         // get name from template settings
         $templateParams = JFactory::getApplication()->getTemplate(true);
         $name = $templateParams->template;
         // delete gk_ prefix
         $name = str_replace('gk_', '', $name);
      } else {
         // get from plugin settings
         $name = $this->params->get('template_name', '');
      }


Please ask the developer of this plugin where the problem could be. We are dependent on a functioning page. So it is very important to solve this problem. Ich hope gavick will help us.

May thanks in advance.
User avatar
Junior Boarder

GK User
Fri Feb 22, 2013 9:11 am
I'm the developer of this plugin and in fact this part build a proper template name to get template params because this plugin is designed to work only with your templates.

Had your programming team already test the functionality after changing the template name in the past?


We have many users who changed template names without any problems but as every custom change this is beyond our support and we can't predict all custom changes that our customers can make. When the cache is disabled everything is working fine ?
User avatar
Platinum Boarder

GK User
Fri Feb 22, 2013 12:07 pm
Yes, the change to desktop works fine without activating the cache. But then there is the problem that mobile devices change back to the mobil version automatically after swichting the content. Its comprehensible because the browser don`t know that you change to desktop version without caching.

I will do a last try and test another template of gavick on another server. But iam sure it won`t work too.
User avatar
Junior Boarder

GK User
Fri Feb 22, 2013 12:56 pm
Same Problem with apptech template (other joomla installation and server). Changelog:

I renamed following files and lines:

template folder in package = "gk_appsprotech" to "cda"
admin\scripts.js line 343 = "gk_appsprotech_j16" to "cda_j16"
js\gk.scripts.js line 124 = "gk_appsprotech_j25_style" to "cda_j25_style"
template.xml lines 4,13,30,163,168,170,171,172,179,181,185,192,196,198,200,205,275,342,521,561 = "gk_appsprotech" to "cda"
language/en-GB.tpl_cda.ini line 1 = "Appspro Tech" to "cda"

Where is the problem? I am desperate.Here you can test it by yourselve: http://solingen03.de/gk_game_magazine_quickstart_J25
User avatar
Junior Boarder

GK User
Tue Feb 26, 2013 9:18 am
Please look at this >> http://d.pr/i/kh1j

The mobile switcher still save cookie with appsprotech template and now the template name is different.
User avatar
Platinum Boarder

GK User
Tue Feb 26, 2013 4:29 pm
Sorry i forgot to replace one entry. Now its done but it doesn`t work too. :cry:
User avatar
Junior Boarder

GK User
Tue Feb 26, 2013 10:18 pm
I solved the problem. I don`t know how but now it is working. Many thanks to you.

But i have one further question. Is it possible that the mobile and desktop switch always bring me to frontpage (home)?
User avatar
Junior Boarder

GK User
Thu Feb 28, 2013 9:11 am
I don't think this can be easily done because desktop switcher don't redirect site but only create a cookie which say to browser to load desktop or mobile version and this is much better from user UI to load page that he watched that always home page.
User avatar
Platinum Boarder


cron