Keyword

Constant K2_JVERSION already defined in K2.php on line 21

More
1 year 7 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.

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
1 year 7 months ago #171475 by Fotis
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.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

More
2 weeks 9 hours ago - 2 weeks 9 hours 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: 2 weeks 9 hours ago by Gorast.

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

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks ago #177143 by Fotis
K2 defines that constant in a single place in its system plugin. Perhaps it's loaded from some other extension or template.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

More
1 week 6 days ago #177144 by Gorast
Ok, now should I sacrifice one plugin?

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

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
1 week 4 days ago #177148 by Fotis
Which plugin exactly?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

More
1 week 4 days 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.

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
1 week 3 days ago #177157 by Fotis
Search 3rd party plugins only.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum