Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 -
- 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 -

Supporter timezone: Europe/Vienna (GMT+02:00)

Tagged: 

This topic contains 2 replies, has 1 voice.

Last updated by ikkiL 10 months, 2 weeks ago.

Assisted by: Bigul.

Author Posts
August 1, 2024 at 12:57 am #16027237

madH

Background of the issue:
I am experiencing an issue with the WPML CMS Nav plugin on my website. Since updating to PHP 8.2, I have encountered deprecated property creation warnings in the plugin's code.

Symptoms:
The specific warnings are as follows:
[01-Aug-2024 00:34:34 UTC] PHP Deprecated: Creation of dynamic property wpml_cms_nav_cache::$name is deprecated in /home/www/madhouse.rs/wp-content/plugins/wpml-cms-nav/inc/cache.class.php on line 36
[01-Aug-2024 00:34:34 UTC] PHP Deprecated: Creation of dynamic property wpml_cms_nav_cache::$cache_to_option is deprecated in /home/www/madhouse.rs/wp-content/plugins/wpml-cms-nav/inc/cache.class.php on line 37

These warnings indicate that the creation of dynamic properties in the wpml_cms_nav_cache class is deprecated and should be addressed to ensure compatibility with PHP 8.2 and future versions.

Questions:
Could you please provide an update or patch to resolve this issue? I would greatly appreciate any assistance you can offer to help fix this problem without having to modify the plugin's code directly.

Thank you for your prompt attention to this matter.

Best regards,

Sanja

August 1, 2024 at 3:49 pm #16030595

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hi Sanja,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

We can reproduce this error here and it has been forwarded to our team. This will be fixed in the future version of WPML CMS Nav.

This alert won't affect the normal functioning of your site. As a temporary workaround, we recommend setting debug mode to false by adding or changing the following code in your wp-config.php file, located at the root of your WordPress installation:

define('WP_DEBUG', false);

This should help to resolve the issue until a permanent solution is implemented in future releases. Please try it after a site backup and let us know your feedback.

--
Thanks!

Bigul

April 2, 2025 at 1:35 pm #16887371

ikkiL

Hello,
To hide this error add :
#[\AllowDynamicProperties]

just before :
class wpml_cms_nav_cache{

in : wp-content\plugins\wpml-cms-nav\inc\cache.class.php