Currency module - Fatal error: Using $this when not in object context
-
- Phoca Member
- Posts: 14
- Joined: 15 Sep 2019, 22:54
Currency module - Fatal error: Using $this when not in object context
Hi,
it's the first time i try phoca.
i have a test site on localhost with 3.9.11 joomla version and 3.3.2 phoca cart version
when currency module is activated, whatever the position, i got this message from the local website :
Fatal error: Using $this when not in object context in C:\wamp64\www\Test\modules\mod_phocacart_currency\tmpl\default.php on line 72
I found on line a joomla problem if you are in 3.8 Joomla version. To change the line 16 into this file : modules/mod_random_image/tmpl
First i undisplayed the Random image module, still the problem
Then i fixed the line 16, and it changed absolutly nothing. So i did put again the original line
i have tried with other older joomla versions, i still have the same error.
i checked your forum, it happened with the EmmaD64's post. i followed the Christine's advice, to click the Database correction button.
Still the same error, then, somebody could help me ? ( if somebody helps me, im not a developper, i understand very few to the informatic problems, so thank you in advance for your patiency )
Thank you, Nicouth2000
it's the first time i try phoca.
i have a test site on localhost with 3.9.11 joomla version and 3.3.2 phoca cart version
when currency module is activated, whatever the position, i got this message from the local website :
Fatal error: Using $this when not in object context in C:\wamp64\www\Test\modules\mod_phocacart_currency\tmpl\default.php on line 72
I found on line a joomla problem if you are in 3.8 Joomla version. To change the line 16 into this file : modules/mod_random_image/tmpl
First i undisplayed the Random image module, still the problem
Then i fixed the line 16, and it changed absolutly nothing. So i did put again the original line
i have tried with other older joomla versions, i still have the same error.
i checked your forum, it happened with the EmmaD64's post. i followed the Christine's advice, to click the Database correction button.
Still the same error, then, somebody could help me ? ( if somebody helps me, im not a developper, i understand very few to the informatic problems, so thank you in advance for your patiency )
Thank you, Nicouth2000
Tags:
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Currency module - Fatal error: Using $this when not in object context
Hi,
So, check point 1) please.
Kind regards
Christine
1) which PHP version are you using? Do you have the latest module? https://www.phoca.cz/download/category/ ... ncy-modulenicouth2000 wrote: ↑15 Sep 2019, 23:24
i have a test site on localhost with 3.9.11 joomla version and 3.3.2 phoca cart version.
when currency module is activated, whatever the position, i got this message from the local website :
Fatal error: Using $this when not in object context in C:\wamp64\www\Test\modules\mod_phocacart_currency\tmpl\default.php on line 72
2) This happened only in Joomla 3.8.8 and has been solved in Joomla 3.8.9: https://github.com/joomla/joomla-cms/pull/20533I found on line a joomla problem if you are in 3.8 Joomla version. To change the line 16 into this file : modules/mod_random_image/tmpl ...
So, check point 1) please.
Kind regards
Christine
-
- Phoca Member
- Posts: 14
- Joined: 15 Sep 2019, 22:54
Re: Currency module - Fatal error: Using $this when not in object context
Hi Christine,
this is a 5.6.25 PHP version with WampServer. Yes this is the latest Currency module 3.3.0
What should i do ?
Thank you, Nicouth2000
this is a 5.6.25 PHP version with WampServer. Yes this is the latest Currency module 3.3.0
What should i do ?
Thank you, Nicouth2000
-
- Phoca Member
- Posts: 14
- Joined: 15 Sep 2019, 22:54
Re: Currency module - Fatal error: Using $this when not in object context
Christine,
i have just tried with a 7.0.1 PHP Version, and it's still the same problem.
What should i do ?
Thank you, Nicouth2000
i have just tried with a 7.0.1 PHP Version, and it's still the same problem.
What should i do ?
Thank you, Nicouth2000
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Currency module - Fatal error: Using $this when not in object context
Hi,
we need the exact messages. Try following please, either in backend:
System > Global configuration > System > Debug Settings > Debug System > Yes
System > Global configuration > Server > Error reporting > Maximum
or via FTP, to change following lines of configuration.php:
Then you will get so called: "Call Stack" and these informations we need.
Sometimes also useful: To rename temporary the error.php.
Kind regards
Christine
we need the exact messages. Try following please, either in backend:
System > Global configuration > System > Debug Settings > Debug System > Yes
System > Global configuration > Server > Error reporting > Maximum
or via FTP, to change following lines of configuration.php:
Then you will get so called: "Call Stack" and these informations we need.
Sometimes also useful: To rename temporary the error.php.
Kind regards
Christine
-
- Phoca Member
- Posts: 14
- Joined: 15 Sep 2019, 22:54
Re: Currency module - Fatal error: Using $this when not in object context
Hi Christine,
this is the Call Stack message that you need :
Call stack
# Function Location
1 () JROOT\modules\mod_phocacart_currency\tmpl\default.php:72
2 require() JROOT\modules\mod_phocacart_currency\mod_phocacart_currency.php:63
3 include() JROOT\libraries\src\Helper\ModuleHelper.php:200
4 Joomla\CMS\Helper\ModuleHelper::renderModule() JROOT\libraries\src\Document\Renderer\Html\ModuleRenderer.php:98
5 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() JROOT\libraries\src\Document\Renderer\Html\ModulesRenderer.php:47
6 Joomla\CMS\Document\Renderer\Html\ModulesRenderer->render() JROOT\libraries\src\Document\HtmlDocument.php:491
7 Joomla\CMS\Document\HtmlDocument->getBuffer() JROOT\libraries\src\Document\HtmlDocument.php:783
8 Joomla\CMS\Document\HtmlDocument->_renderTemplate() JROOT\libraries\src\Document\HtmlDocument.php:557
9 Joomla\CMS\Document\HtmlDocument->render() JROOT\libraries\src\Application\CMSApplication.php:1044
10 Joomla\CMS\Application\CMSApplication->render() JROOT\libraries\src\Application\SiteApplication.php:778
11 Joomla\CMS\Application\SiteApplication->render() JROOT\libraries\src\Application\CMSApplication.php:202
12 Joomla\CMS\Application\CMSApplication->execute() JROOT\index.php:49
this is the Call Stack message that you need :
Call stack
# Function Location
1 () JROOT\modules\mod_phocacart_currency\tmpl\default.php:72
2 require() JROOT\modules\mod_phocacart_currency\mod_phocacart_currency.php:63
3 include() JROOT\libraries\src\Helper\ModuleHelper.php:200
4 Joomla\CMS\Helper\ModuleHelper::renderModule() JROOT\libraries\src\Document\Renderer\Html\ModuleRenderer.php:98
5 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() JROOT\libraries\src\Document\Renderer\Html\ModulesRenderer.php:47
6 Joomla\CMS\Document\Renderer\Html\ModulesRenderer->render() JROOT\libraries\src\Document\HtmlDocument.php:491
7 Joomla\CMS\Document\HtmlDocument->getBuffer() JROOT\libraries\src\Document\HtmlDocument.php:783
8 Joomla\CMS\Document\HtmlDocument->_renderTemplate() JROOT\libraries\src\Document\HtmlDocument.php:557
9 Joomla\CMS\Document\HtmlDocument->render() JROOT\libraries\src\Application\CMSApplication.php:1044
10 Joomla\CMS\Application\CMSApplication->render() JROOT\libraries\src\Application\SiteApplication.php:778
11 Joomla\CMS\Application\SiteApplication->render() JROOT\libraries\src\Application\CMSApplication.php:202
12 Joomla\CMS\Application\CMSApplication->execute() JROOT\index.php:49
-
- Phoca Member
- Posts: 14
- Joined: 15 Sep 2019, 22:54
Re: Currency module - Fatal error: Using $this when not in object context
i don't know what all this means,
Tell me what could help.
i don't know in which folder i can find the error.php file to temporary rename it.
Thank you
Best Regards, Nicouth2000
Tell me what could help.
i don't know in which folder i can find the error.php file to temporary rename it.
Thank you
Best Regards, Nicouth2000
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Currency module - Fatal error: Using $this when not in object context
Hi,
Thanks for the Call Stack. It's not needed now to re-name error.php. I think, it's a PHP Version Problem or another Plugin (other extension).
Is everything up to date? Framework? Which template are you using?
Kind regards
Christine
Thanks for the Call Stack. It's not needed now to re-name error.php. I think, it's a PHP Version Problem or another Plugin (other extension).
Is everything up to date? Framework? Which template are you using?
Kind regards
Christine
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Currency module - Fatal error: Using $this when not in object context
Hi, try to open this file:
modules/mod_phocacart_currency/tmpl/default.php on line cca. 72
and try to change
FROM:
TO:
And let me know if this is OK now?
Thank you, Jan
modules/mod_phocacart_currency/tmpl/default.php on line cca. 72
and try to change
FROM:
Code: Select all
echo '<div class="'.$this->s['c']['pull-right'].' ph-input-select-currencies-button">';
Code: Select all
echo '<div class="'.$s['c']['pull-right'].' ph-input-select-currencies-button">';
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 14
- Joined: 15 Sep 2019, 22:54
Re: Currency module - Fatal error: Using $this when not in object context
Hi Jan,
All is OK now. The problem is solved.
i'm gonna open another topic about 2 site view problems
Thank you for your patiency
Best Regards, Nicouth2000
All is OK now. The problem is solved.
i'm gonna open another topic about 2 site view problems
Thank you for your patiency
Best Regards, Nicouth2000