Keyword

Deprecated

  • Marc de Jong
  • Marc de Jong's Avatar Topic Author
  • Offline
  • New Member
More
7 years 9 months ago #156790 by Marc de Jong
Deprecated was created by Marc de Jong
Hi there,

When switching to PHP 7 and Joomla 3.6.0 with K2 v2.7.0 I get the following messages.

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Calendar has a deprecated constructor in /modules/mod_k2_tools/includes/calendarClass.php on line 32

I have searched and found a thread on Github github.com/getk2/k2/issues/293 but somehow it does not solve the problem. I only use the K2 tools module to show categories of K2 not the calendar. I hope someone can help!

Marc

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

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
7 years 9 months ago - 7 years 9 months ago #156795 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Deprecated
Hi Marc,

This is not an error, it is just a warning message to take care about in future releases.

To get rid of this message, go to the Global Configuration, Server tab and set Error Reporting to "None", like this screenshot
imgur.com/a/ZeKVA

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Last edit: 7 years 9 months ago by Mohamed Abdelaziz.

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

  • Marc de Jong
  • Marc de Jong's Avatar Topic Author
  • Offline
  • New Member
More
7 years 9 months ago #156799 by Marc de Jong
Replied by Marc de Jong on topic Deprecated
Hi Mohamed,
Thanks for your reply! I already had error reporting set to none and even on the server checked that deprecated was not showing.
Could it be k2 has set another .ini file somewehere?

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

More
7 years 9 months ago #156801 by Simon C
Replied by Simon C on topic Deprecated
Note that while this is "just a warning", the deprecated features that are being warned about *will* be removed in a future version of PHP, possibly even 7.1, which is due for release fairly soon. At that point, the deprecated warnings will turn into fatal errors.

I hope that the K2 team is working on an update to remove these issues (certainly this specific issue is dead easy to fix, so it shouldn't be too much effort).

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

  • Marc de Jong
  • Marc de Jong's Avatar Topic Author
  • Offline
  • New Member
More
7 years 9 months ago #156811 by Marc de Jong
Replied by Marc de Jong on topic Deprecated
Update on this issue. I have contacted the provider and they assure me all error reporting is set the right way. Strange thing that al error reporting is off on server level and in joomla But still the k2 message is showing.

www.de-plantage.nl/portfolio/huisstijl-en-website-heinz-autoservice

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

  • Marc de Jong
  • Marc de Jong's Avatar Topic Author
  • Offline
  • New Member
More
7 years 9 months ago #156815 by Marc de Jong
Replied by Marc de Jong on topic Deprecated
I have changed:

modules/mod_k2_tools/includes/calendarClass.php

line 37
function Calendar()

to

line 37
function Calendar2()

probably a stupid hack but it works... message is gone and I don't use the calendar anyway.

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

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
7 years 9 months ago #156818 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Deprecated
Hi
It is better to change it to __construct()

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

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

  • Marc de Jong
  • Marc de Jong's Avatar Topic Author
  • Offline
  • New Member
More
7 years 9 months ago #156819 by Marc de Jong
Replied by Marc de Jong on topic Deprecated
Thanks Mohamed, I have changed it!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 8 months ago #156968 by Krikor Boghossian
Replied by Krikor Boghossian on topic Deprecated
Just my 2cents. K2 will not use a custom .ini file to alter your server's settings.

K2 inherits Joomla!'s values, so if errors are still being displayed, there is either an issue on the setup, an .ini file or the template might be using the error reporting function php.net/manual/en/function.error-reporting.php.

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

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


Powered by Kunena Forum