Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are experiencing a critical error when accessing backend pages in French after upgrading to PHP 8.4. The error results in headers appearing but the content remains empty, and a critical error message is displayed.
Solution:
First, we recommend enabling the WordPress debug log to capture more specific error details. You can do this by editing the

wp-config.php

file and inserting the following lines:

define('WP_DEBUG', true);<br />define('WP_DEBUG_LOG', true);<br />define('WP_DEBUG_DISPLAY', false);

After setting these, try to reproduce the issue and check the debug log in

/wp-content/debug.log

for any specific error messages. Share these details via a secure method like pastebin.com for further analysis.

If the issue persists, consider downgrading your PHP version to 8.2 as PHP 8.4 may not be fully compatible with WPML or even WordPress itself. This step should help resolve the compatibility issues you are facing.

Relevant Documentation:
https://codex.wordpress.org/Debugging_in_WordPress

If these steps do not resolve your issue or if the solution becomes irrelevant due to updates or specific circumstances, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If needed, please open a new support ticket for personalized assistance at WPML support forum.

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.

Tagged: 

This topic contains 5 replies, has 3 voices.

Last updated by myleneG 3 months, 3 weeks ago.

Assisted by: Mihai Apetrei.

Author Posts
October 7, 2024 at 3:08 pm #16262305

myleneG

Background of the issue:
Since my upgrade to PHP 8.4, access to any of the backend's pages is not possible. I have found a workaround by using a user with English as the main language. I cannot downgrade to PHP 7.2 because plugins were upgraded too, and doing so results in all my transactions being declined. In the meantime, I'll try to recreate the issue on a staging site to give you access. Link to a page where the issue can be seen: hidden link

Symptoms:
Header appears but content is empty, with a critical error message when accessing backend pages in the default language (French).

Questions:
How can I resolve the critical error when accessing backend pages in French after upgrading to PHP 8.4?
Is there a way to fix this issue without downgrading PHP or affecting transactions?

October 7, 2024 at 3:15 pm #16262444

myleneG

Easily able to reproduce bug on staging site by changing user language to French. I can give you access whenever needed

October 7, 2024 at 3:25 pm #16262582

Mihai Apetrei
Supporter

Languages: English (English )

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

Hi there.

Before this ticket gets assigned to one of my colleagues, I will try to help.

That is a general error message and we can't know what is causing the error until we don't dig a bit deeper.

Let us share the steps that you can use to find out more about what is the actual error when you see a general error message like that one.

We can enable the WordPress debug log and recreate the issue to see if we are getting a longer error message that is more specific.

This will allow us to see if any PHP errors are being produced.

In order to do that, we can edit the wp-config.php file inside our WordPress directory and insert the following lines:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Now, we can try to reproduce the issue once again.

We should now be able to locate the debug log in: /wp-content/debug.log

Paste the content (if any) on a site like pastebin.com and then share the link with us (only you and us will see the URL you are sharing, it is automatically hidden for anyone else).

Relevant Documentation:
https://codex.wordpress.org/Debugging_in_WordPress

Please let us know how things go.

Mihai Apetrei

October 7, 2024 at 7:23 pm #16263369

myleneG

[07-Oct-2024 19:20:37 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/customer/www/staging9.funique.ca/public_html/wp-includes/formatting.php on line 2819
[07-Oct-2024 19:20:49 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/customer/www/staging9.funique.ca/public_html/wp-includes/formatting.php on line 2819
[07-Oct-2024 19:21:10 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/customer/www/staging9.funique.ca/public_html/wp-includes/formatting.php on line 2819
[07-Oct-2024 19:21:18 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/customer/www/staging9.funique.ca/public_html/wp-includes/formatting.php on line 2819
[07-Oct-2024 19:21:18 UTC] PHP Fatal error: Uncaught ValueError: Unknown format specifier "a" in /home/customer/www/staging9.funique.ca/public_html/wp-admin/includes/class-wp-list-table.php:1039
Stack trace:
#0 /home/customer/www/staging9.funique.ca/public_html/wp-admin/includes/class-wp-list-table.php(1039): sprintf('% articles', '40')
#1 /home/customer/www/staging9.funique.ca/public_html/wp-admin/includes/class-wp-list-table.php(1688): WP_List_Table->pagination('top')
#2 /home/customer/www/staging9.funique.ca/public_html/wp-admin/includes/class-wp-list-table.php(1620): WP_List_Table->display_tablenav('top')
#3 /home/customer/www/staging9.funique.ca/public_html/wp-admin/edit.php(503): WP_List_Table->display()
#4 {main}
thrown in /home/customer/www/staging9.funique.ca/public_html/wp-admin/includes/class-wp-list-table.php on line 1039

Does that help?

October 8, 2024 at 7:25 am #16264113

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hello,

PHP 8.4 is way too new and it's not even fully compatible with WPML or even WordPress.
Please downgrade your PHP version to 8.2 and the problems should go away.

PHP is not like plugin updates or even WordPress updates. updating before it turns 1-2 years old is not a good idea since it removes a lot of backwards compatibility that WordPress requires so plugins or themes and even WP can't update their php comaptibility that fast.

Regards,

October 8, 2024 at 1:35 pm #16265665

myleneG

I understand but sadly (as mentioned in my initial messge) my payment gateway has upgraded, so I have to choose the lesser evil, which will have to be turning my profile into English until wpml becomes compatible

October 8, 2024 at 1:36 pm #16265666

myleneG

Not really resolved