Skip Navigation

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

Problem:
You are experiencing a critical error on your homepage when WPML is activated. The error originates from the Blog module in the Divi theme, specifically at line 1994 in the file

Blog.php

. The error does not occur when WPML is deactivated.
Solution:
1. Check Line 1994 in Blog.php:
- Navigate to

wp-content/themes/Divi/includes/builder/module/Blog.php

.
- Open the file and locate line 1994.
- This line likely contains a

sprintf()

or similar function. Verify if the string includes placeholders like

%s

or

%d

.
2. Check String in WPML’s String Translation:
- Go to WPML > String Translation in the WordPress dashboard.
- Search for strings related to the Blog module - the one that is possibly found in that line 1994. Focus on strings with formatting placeholders.
- Translate that string (or just copy it), making sure it retains all placeholders (e.g.,

%s

,

%d

) exactly as in the original string.

If this solution does not resolve your issue or seems outdated, we 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 the problem persists, please open a new support ticket 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.

This topic contains 1 reply, has 0 voices.

Last updated by Arnau Català 1 week, 2 days ago.

Assisted by: Bruno Kos.

Author Posts
December 3, 2024 at 11:15 am #16471209

Arnau Català

Background of the issue:
I am trying to display the homepage without errors. The home page gives me a critical error when WPML is activated. The logs show that this error comes from the Blog module, but if I deactivate WPML it does not occur. PHP Fatal error: Uncaught ValueError: Missing format specifier at end of string in /var/www/html/wp-content/themes/Divi/includes/builder/module/Blog.php:1994. Link to a page where the issue can be seen: hidden link

Symptoms:
The homepage displays a fatal error when WPML is activated. The error message is: PHP Fatal error: Uncaught ValueError: Missing format specifier at end of string in /var/www/html/wp-content/themes/Divi/includes/builder/module/Blog.php:1994.

Questions:
Why does the homepage give a critical error when WPML is activated?
How can I resolve the fatal error related to the Blog module?

December 3, 2024 at 12:51 pm #16471837

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

Thank you for contacting WPML support!

Can you try this?

1. **Check Line 1994 in Blog.php**
- Navigate to `wp-content/themes/Divi/includes/builder/module/Blog.php`.
- Open the file and locate **line 1994**.
- This line likely contains a `sprintf()` or similar function. Verify if the string includes placeholders like `%s` or `%d`.

2. **Check String in WPML’s String Translation:**
- Go to **WPML > String Translation** in the WordPress dashboard.
- Search for strings related to the Blog module - the one that is possibly found in that line 1994. Focus on strings with formatting placeholders (you may need to scan Divi theme like this https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#scan-the-theme-or-plugin)
- translate that string (or just copy it), making sure it retains all placeholders (e.g., `%s`, `%d`) exactly as in the original string.

These steps should help identify the root cause of the issue. Let me know if further assistance is needed!

Regards,
Bruno Kos

December 3, 2024 at 12:59 pm #16472000

Arnau Català

Thank you it was missing the s in the string "by %s"