Error Message

October 08 Joomla Templates
GK User
Tue May 29, 2012 12:43 pm
Hi,

I seem to have the following message on my site.

undefined variable : tpl_name in /home/sites/amumsguide.com/public_html/templates/gk_twn2/lib/gk.framework.php on line 228

My site is http://amumsguide.com/

Any suggestions as to how I might remove it?

Many Thanks,

JMBThompson
User avatar
Fresh Boarder

GK User
Tue May 29, 2012 2:09 pm
Find & Open : /templates/gk_twn2/lib/gk.framework.php
Find Line : 228 which is below
Code: Select all
        $cookie_name = 'gkGavernMobile'.$tpl_name;

Replace it with below
Code: Select all
      $tpl_name = str_replace(' ', '_', JText::_('TPL_GK_LANG_NAME'));
      $cookie_name = 'gkGavernMobile'.$tpl_name;


See you around...
User avatar
Platinum Boarder

GK User
Tue May 29, 2012 3:36 pm
Thanks for getting back to me. I'll give it a go tonight, but not having done this sort of stuff before I might be back for more help.

Thanks.

J
User avatar
Fresh Boarder

GK User
Tue May 29, 2012 3:54 pm
Hi,

Just tried this and I now get an error message on line 229 ...
User avatar
Fresh Boarder

GK User
Tue May 29, 2012 9:24 pm
Please send an admin and ftp access details to my email normanuk [at] live.co.uk and i ll take a look at this. See you around...
User avatar
Platinum Boarder

GK User
Wed May 30, 2012 1:37 pm
normanUK wrote:Please send an admin and ftp access details to my email normanuk [at] live.co.uk and i ll take a look at this. See you around...


Hi, Just wondered if you'd had a chance to look at this yet?

Thanks,

J
User avatar
Fresh Boarder

GK User
Wed May 30, 2012 5:53 pm
Yes i have and it seems you haven't done the editing correctly. I have done the edit myself and it is working without any errors.

See you around...
User avatar
Platinum Boarder

GK User
Wed May 30, 2012 7:26 pm
normanUK wrote:Yes i have and it seems you haven't done the editing correctly. I have done the edit myself and it is working without any errors.

See you around...


Thanks very much, I really appreciate it!

J
User avatar
Fresh Boarder

GK User
Mon Jun 11, 2012 9:51 pm
normanUK wrote:Yes i have and it seems you haven't done the editing correctly. I have done the edit myself and it is working without any errors.

See you around...


Hi Norman

I seem to have a similar error message on my site again:

Notice: Undefined offset: 0 in /home/sites/amumsguide.com/public_html/templates/gk_twn2/html/com_content/article/default.php on line 42

I'd appreciate it if you could shine some light on how to remove it.

Many thanks,

J
User avatar
Fresh Boarder

GK User
Fri Jun 15, 2012 8:08 pm
Hi, normanUK!

thats really solution for undefined variable error, in J25.
Thank you very much...
User avatar
Senior Boarder

GK User
Sat Jun 16, 2012 1:46 am
Are you still having problems with your second error notice?
If you do please make following changes.
Find file: /templates/gk_twn2/html/com_content/article/default.php
Find Line: 42 which is below
Code: Select all
     $pin_image = $uri->root() . substr($matches[0], 5,-1);

Replace with below
Code: Select all
         if(isset($matches[0])) {
            $pin_image = $uri->root() . substr($matches[0], 5,-1);
         }

So your final code around 42 should look as below.
Code: Select all
     $og_image = '';
     preg_match('/src="([^"]*)"/', $this->item->text, $matches);
     if(isset($matches[0])) {
           $pin_image = $uri->root() . substr($matches[0], 5,-1);
     }
}

See you around...
User avatar
Platinum Boarder

GK User
Sat Jun 16, 2012 8:44 pm
normanUK wrote:Are you still having problems with your second error notice?
If you do please make following changes.
Find file: /templates/gk_twn2/html/com_content/article/default.php
Find Line: 42 which is below
Code: Select all
     $pin_image = $uri->root() . substr($matches[0], 5,-1);

Replace with below
Code: Select all
         if(isset($matches[0])) {
            $pin_image = $uri->root() . substr($matches[0], 5,-1);
         }

So your final code around 42 should look as below.
Code: Select all
     $og_image = '';
     preg_match('/src="([^"]*)"/', $this->item->text, $matches);
     if(isset($matches[0])) {
           $pin_image = $uri->root() . substr($matches[0], 5,-1);
     }
}

See you around...


Yes, still having problems. I'll have a go and see if I can sort it.

Thanks,

J
User avatar
Fresh Boarder

GK User
Sat Jun 16, 2012 9:12 pm
normanUK wrote:Are you still having problems with your second error notice?
If you do please make following changes.
Find file: /templates/gk_twn2/html/com_content/article/default.php
Find Line: 42 which is below
Code: Select all
     $pin_image = $uri->root() . substr($matches[0], 5,-1);

Replace with below
Code: Select all
         if(isset($matches[0])) {
            $pin_image = $uri->root() . substr($matches[0], 5,-1);
         }

So your final code around 42 should look as below.
Code: Select all
     $og_image = '';
     preg_match('/src="([^"]*)"/', $this->item->text, $matches);
     if(isset($matches[0])) {
           $pin_image = $uri->root() . substr($matches[0], 5,-1);
     }
}

See you around...


Hi,

I tried that but it ended up causing the site not to function ... I've changed it back to the original format.

Could you possibly have a look at this for me?

Many thanks,

J
User avatar
Fresh Boarder

GK User
Sun Jun 17, 2012 1:00 am
I'll check my email to see if I still have your details , if I do I ll check your site if not I ll contact you for access details.

See you around...
User avatar
Platinum Boarder

GK User
Sun Jun 17, 2012 3:34 pm
Thank you so much for sorting out the error message, you're a star!!

J
User avatar
Fresh Boarder

GK User
Sun Jun 17, 2012 7:51 pm
No problem at all, see you around...
User avatar
Platinum Boarder


cron