Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: [SOLVED] getTag fatal error

[SOLVED] getTag fatal error 8 years 10 months ago #25537

  • gdrsolutions
  • gdrsolutions's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Hi,

I'm getting the error: Fatal error: Call to a member function getTag() on null in /libraries/cms/router/site.php on line 302

Has anyone experienced this and/or can advise?

I've updated to the latest version.

Thanks in advance.

Gareth

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

Last Edit: by nathan.dth.

getTag fatal error 8 years 9 months ago #25695

  • gdrsolutions
  • gdrsolutions's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Hi,

I received no response to the below disappointingly. Just updated to 3.1.6h and still experiencing the same issue.

Can anyone advise? I'm going to have to change components if I can't get this sorted - payments are going through fine, but we have no idea of what event they have booked, and have to e-mail them :(

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

Last Edit: by nathan.dth.

getTag fatal error 8 years 9 months ago #25697

  • nathan.dth
  • nathan.dth's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1857
  • Karma: 19
  • Thank you received: 218
Looks like your actual error is not a DT Register issue at all. There is a bug in Joomla 3 for multi-language sites. Lots of posts online about it, such as this one:

forum.joomla.org/viewtopic.php?f=710&t=825504&start=0

Looks like the fix is to replace:
$tag = $this->getLanguage()->getTag();

...with:
$tag = JFactory::getLanguage()->getTag();

The site.php file referenced in your fatal error uses this getLanguage()->getTag() function a few times. Try changing:
$this->app->getLanguage()->getTag()

to...
JFactory::getLanguage()->getTag()

We are looking to see if there's anything we can do to modify DT Register and get around this Joomla bug. In the meantime, follow the above suggestion.

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

Nathan is no longer affiliated with DTH since the recent acquisition. You can connect with him and get any type of Joomla website help at www.JoomlaEmployee.com .

getTag fatal error 8 years 9 months ago #25698

  • gdrsolutions
  • gdrsolutions's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
That's fantastic, it is solved now. Thanks for the help.

For anyone else struggling with this, the line you are looking to replace is actually:

$lang_tag = $this->app->getLanguage()->getTag();

I changed that and it's working fine.

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

  • Page:
  • 1
Time to create page: 0.264 seconds