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
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

This topic contains 3 replies, has 0 voices.

Last updated by Prosenjit Barman 2 days, 12 hours ago.

Assisted by: Prosenjit Barman.

Author Posts
November 8, 2024 at 3:03 am #16380419

Matteo Canever

Background of the issue:
I'm using ACF Pro 6.3.10 trying to visit a page in admin but instead I get a WPML error.
Just to be clear this is not a ACF Pro issue, the problem is inside wpml-posts-listing-page.class.php line 26 when using PHP 8.2 in WPML 4.6.13
See screenshot here hidden link
I fixed the issue by creating a new count() function similar to this https://stackoverflow.com/a/74263588/261365 then use that function instead.

Symptoms:
Fatal error on wpml-posts-listing-page.class.php line 26 on PHP 8.2 in WPML 4.6.13. I expected to see no PHP Fatal error, but instead, I got a Fatal error.

Questions:

November 8, 2024 at 7:47 am #16380814

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thanks for contacting WPML Support.

I understand the issue you're facing. Based on the WPML Debug Info, it seems that the ACF Multilingual plugin is not currently active on your site. For ACF field translations and other related features to function correctly within the WPML environment, it's essential to activate the ACF Multilingual plugin.

For more details on ACF Multilingual, please check this guide: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

Once the ACF Multilingual plugin is activated, please check if the issue persists. If you haven't installed it yet, please do that by going to the "Plugins > Add New > Commercial" tab.

I’d also like to mention that in a similar case, we found that the issue was related to an empty custom post type, and setting the "Hierarchical" value to "False' resolved the problem.

'hierarchical' => false

If you’re encountering this issue with a specific custom post type and the issue persists even with the AACF multilingual plugin, please try setting the "Hierarchical" value to "False" — this should help resolve the problem.

Please try out the suggestions and let me know how it goes. I'll be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

November 12, 2024 at 2:52 am #16390671

Matteo Canever

I understand what you are suggesting here.
But overall your message felt not in the right direction because a fatal error occurred due to PHP 8.2, and by the way it is a fatal error, which meant it is never meant to happen. A fatal error should never happen regardless of activated ACFML or not. Same with hierarchical false or true, still a fatal error occurred.

Even though I did check ACFML, I'm still not sure why I need those features, when ACF Pro works fine with WPML without ACFML.

Also, your message sounded like you do not want to support PHP 8.2
If you can confirm would be great to know. Thank you

November 12, 2024 at 6:52 am #16390959

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thank you for your feedback. I’d like to clarify a few points and address your concerns directly.

Firstly, WPML fully supports PHP 8.2, and with the latest updates, compatibility extends up to PHP 8.3. If you’re experiencing a fatal error, this may not directly relate to WPML itself. We’re committed to ensuring that our plugins operate smoothly on these PHP versions.

The recommendation to use the ACF Multilingual plugin is intended to ensure ACF works seamlessly with WPML across all languages. While ACF Pro may work with WPML on its own, ACFML provides the necessary compatibility layer for ACF fields to work correctly with WPML. For sites using ACF across languages, ACFML is recommended to avoid any unexpected behavior.

Additionally, setting the post-type hierarchical option to “false” was suggested based on a similar issue we encountered in another case. It’s a troubleshooting step that might help address this issue in your case as well.

Could you please try installing ACFML and adjusting the hierarchical setting as recommended? If the error persists, we’ll be more than happy to investigate further and find a resolution for you.

Thank you again for your cooperation, and please don’t hesitate to reach out with any further questions.

Best regards,
Prosenjit