Keyword

Constant K2_JVERSION already defined in K2.php on line 21

More
5 years 8 months ago #171469 by Marco
Hi!
Anybody know what this error comes from? Constant K2_JVERSION already defined in [web_dir]/plugins/system/k2/k2.php on line 21 and where do I start to investigate?

It appears in both front and back end.

I'm using Joomla! 3.x (last version) k2 (last version) Joomshaper Spectrum Template with PageBuilder PRO everything is up-to-date. Server has PHP 7.

Thanks,
Marco

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

More
5 years 8 months ago #171475 by JoomlaWorks
If you have the site files locally, simply search for this string (K2_JVERSION). It should appear in some file outside of K2's files. If you don't have the files locally, try downloading them (create a zip file without /images/ and /media/k2/items/). Or, if you have terminal/SSH access to your web host, navigate to your site's public_html folder and run this:
$ find . -iname "*.php" | xargs grep "K2_JVERSION"

The above command will show you which files include this string.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
4 years 1 month ago - 4 years 1 month ago #177141 by Gorast
Did someone managed to fix this issue? I got it when I rised PHP version from 7.0 to 7.1, 7.2 or 7.3.
I got the notice on the back end and front end.
Site is also not visible on the front end. Only red message: 0 - Using $this when not in object context.

When I return to 7.0 I get this on the frontend:

Notice: Constant K2_JVERSION already defined in /home/puppetco/public_html/plugins/system/k2/k2.php on line 21

Deprecated: Non-static method Joomla\CMS\Application\SiteApplication::getMenu() should not be called statically in /home/puppetco/public_html/templates/t3_blank/local/tpls/default-tdm.php on line 21

Deprecated: Non-static method Joomla\CMS\Application\CMSApplication::getMenu() should not be called statically in /home/puppetco/public_html/libraries/src/Application/SiteApplication.php on line 275

Notice: Undefined variable: this in /home/puppetco/public_html/libraries/src/Application/CMSApplication.php on line 370

Notice: Only variables should be assigned by reference in /home/puppetco/public_html/templates/t3_blank/local/tpls/default-tdm.php on line 21


Fix for this?

Thanks,
Gorast
Last edit: 4 years 1 month ago by Gorast.

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

More
4 years 1 month ago #177143 by JoomlaWorks
K2 defines that constant in a single place in its system plugin. Perhaps it's loaded from some other extension or template.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
4 years 1 month ago #177144 by Gorast
Ok, now should I sacrifice one plugin?

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

More
4 years 1 month ago #177148 by JoomlaWorks
Which plugin exactly?

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
4 years 1 month ago #177153 by Gorast
Well I dont know. I will have to turn off one by one and then sacrifice that plugin in order to update the PHP version and using K2... right?

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

More
4 years 1 month ago #177157 by JoomlaWorks
Search 3rd party plugins only.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
3 years 5 months ago #179076 by Gorast
Hi,
it is Falant related. Im on the latest version and I still get it.
I wrote to the developer.

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

More
3 years 5 months ago #179080 by Bouey
I'm Stéphane From Falang

You have to filter the plugin by system plugin order by "ordering ascending" and put the Falang - k2 after the System - k2

Best regards,
Stéphane

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


Powered by Kunena Forum