Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

New version of JoomSef 4.6.3 results in error
(1 viewing) (1) Guest
Support forum for users using free edition of JoomSEF 4 (Joomla 1.6/1.7/2.5+ compatible). These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1

TOPIC: New version of JoomSef 4.6.3 results in error

New version of JoomSef 4.6.3 results in error 9 years, 2 months ago #46988

Never seen this error on the backend (after saving a content article) before I recently upgraded to 4.6.3
--------------------
Fatal error: Using $this when not in object context in /home/******/public_html/components/com_sef/joomsef.php on line 633
--------------------
Anyone seen it before/help?

Tks, John

Re: New version of JoomSef 4.6.3 results in error 9 years ago #47220

  • nvar
  • OFFLINE
  • Posts: 2
Same here. Had run into an editing issue in /libraries/cms/application/site.php
Found: forum.joomla.org/viewtopic.php?f=709&t=825504

and changed $lang_code = $this->getLanguage()->getTag();
to $lang_code = JFactory::getLanguage()->getTag();
to get rid of a fatal error.
That worked (I think) until just upgraded the JoomSEF to 4.6.4.

Now getting that fatal error: Fatal error: Using $this when not in object context in /components/com_sef/joomsef.php on line 644

It seems to go away if you disable Auto Update URLs as mentioned in the forum thread. But that isn't necessarily good. Help?

Re: New version of JoomSef 4.6.3 results in error 8 years, 4 months ago #47888

I have found a better solution than changing the site.php file that is a core file, because every time you update joomla you have to edit the file again.
So i have edited the "components/com_sef/sef_ext/com_content.php", and i changed the line 287

$appParams=JApplication::getInstance('site')->getParams('com_content');


to

$appParams=JComponentHelper::getParams('com_content');
Last Edit: 8 years, 4 months ago by byte_predator. Reason: typo

Re: New version of JoomSef 4.6.3 results in error 8 years, 4 months ago #47891

I have also found a solution for the second error: Fatal error: Using $this when not in object context in /components/com_sef/joomsef.php

This happen because the build method is a static one, so you can't use $this, but if i have understood the code the function _checkURLs (non-static) needs metadata, so i have changed the line 633
$this->_data=$data;

to:
self::getInstance()->setData($data);


ps: my version of joomsef is 4.6.9
  • Page:
  • 1
Přihlášení uživatele Prázdný