You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#100832 Error: Using $this when not in object context

Posted in ‘Mediabox’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by [email protected] on Monday, 19 August 2019 15:20 BST

[email protected]
I'm trying to upgrade PHP from 5.6 to 7.3 in a jommla website running with Joomla 3.9.11
But I get the following errors:
Using $this when not in object context

I have put on the error reporting in the joomla website.
What I see then on the screen is:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgSystemJCEMediabox has a
deprecated constructor in /home/stadskanaporta/domains/stadskanaalportaal.nl/public_html/3test/plugins/system/jcemediabox/jcemediabox.php on line 32

followed by:
Using $this when not in object context

/home/stadskanaporta/domains/stadskanaalportaal.nl/public_html/3test/libraries/src/Application/CMSApplication.php:370
Call stack
# Function Location
1 () JROOT/libraries/src/Application/CMSApplication.php:370
2 Joomla\CMS\Application\CMSApplication::getMenu() JROOT/libraries/src/Application/SiteApplication.php:275
3 Joomla\CMS\Application\SiteApplication::getMenu() JROOT/modules/mod_flexheader3/mod_flexheader3.php:95
4 include() JROOT/libraries/src/Helper/ModuleHelper.php:200
5 Joomla\CMS\Helper\ModuleHelper::renderModule() JROOT/libraries/src/Document/Renderer/Html/ModuleRenderer.php:98
6 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() JROOT/libraries/src/Document/Renderer/Html/ModulesRenderer.php:47
7 Joomla\CMS\Document\Renderer\Html\ModulesRenderer->render() JROOT/libraries/src/Document/HtmlDocument.php:491
8 Joomla\CMS\Document\HtmlDocument->getBuffer() JROOT/libraries/src/Document/HtmlDocument.php:783
9 Joomla\CMS\Document\HtmlDocument->_renderTemplate() JROOT/libraries/src/Document/HtmlDocument.php:557
10 Joomla\CMS\Document\HtmlDocument->render() JROOT/libraries/src/Application/CMSApplication.php:1044
11 Joomla\CMS\Application\CMSApplication->render() JROOT/libraries/src/Application/SiteApplication.php:778
12 Joomla\CMS\Application\SiteApplication->render() JROOT/libraries/src/Application/CMSApplication.php:202
13 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49

Do you have any idea how to solve this problem?

I've recently bought and installed JCE Pro 2.7.15

Thanks in advance for your support.

Kind regards,
Jac Puts

Ryan
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgSystemJCEMediabox has a
deprecated constructor in /home/stadskanaporta/domains/http://stadskanaalportaal.nl/public_html/3test/plugins/system/jcemediabox/jcemediabox.php on line 32


Please uninstall the version of JCE MediaBox you have, and install the latest version - https://www.joomlacontenteditor.net/downloads/mediabox

followed by:
Using $this when not in object context


I don't think this is a JCE issue at all, but rather related to another extension you have installed which is not PHP 7.3 compatible. From the call stack you posted, the culprit may be mod_flexheader3. If you disable this module, do you still get the error?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

[email protected]
I did unistall JCE Mediabox and installed JCE Mediabox 2.0.11
Same problem.
Then I tested with mod_flexheader3 disabled and the problem was gone.
So it seems that the Joomla extension Flexheader3 causes the problem with PHP 7.3.

I now know how to solve the problem.

Thanks a lot for your support.
Jac