Skip to content Skip to sidebar

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

Problem:
If you're trying to translate your website using WPML and encounter a fatal error when previewing or accessing the translated version, it might be due to incorrect string loading in the Doctery theme's add-ons file.
Solution:
We recommend the following steps:
1. Open the file

plugins/doctery-addons/doctery-addons.php

.
2. Navigate to line 291.
3. Identify any text that might be translated.
4. Use WPML's String Translation to search for that text and delete the problematic string.
5. Additionally, search for the string 'Search %1$s' and ensure there is no space causing the '$' to not parse correctly.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, please visit our known issues page and check if there's a permanent fix available. Ensure you have the latest versions of your themes and plugins installed. If the problem persists, we highly recommend opening a new support ticket with us for further assistance.

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 7 replies, has 0 voices.

Last updated by Laura 8 months, 2 weeks ago.

Assisted by: Laura.

Author Posts
August 26, 2025 at 10:02 am #17347470

omarH-13

Background of the issue:
I am trying to translate my website from French to Arabic using WPML. I have Elementor, Rankmath Pro, and the Doctery theme, which is supposed to be compatible with WPML. I can translate the pages and review them, but when I try to preview the translation, I encounter a fatal error. The same error occurs when accessing the new language version of the site, which is Arabic (/ar/). Here is the link to a page where the issue can be seen: hidden link.

Symptoms:
I expected to see the translated page, but instead, I got a fatal error. The error message in Arabic is: 'كان هناك خطأ فادح في هذا الموقع. معرفة المزيد حول استكشاف الأخطاء في ووردبريس.' The error log shows: '2025/08/26 9:23:23 AM AMS Server Communication Api error missing resource: No sitekey found for this website'. I have increased the memory to 128Mb and de-registered and registered my WPML Key to my website, but the same result occurs.

Questions:
Why am I encountering a fatal error when trying to preview the translation?
What does the error 'No sitekey found for this website' mean and how can I resolve it?

August 26, 2025 at 10:57 am #17347933

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

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

Hi,

Thanks for contacting us.

Please enable the WordPress debug.log so we can see what's exactly the error, otherwise it's difficult to tell you anything.

August 26, 2025 at 3:51 pm #17349053

omarH-13

Hello,
I activated the Debug log
Thank you

August 26, 2025 at 3:53 pm #17349057

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

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

Ok, but you need to send me the log. I don't have any mean to see it.

August 26, 2025 at 4:15 pm #17349105

omarH-13

[26-Aug-2025 16:11:22 UTC] PHP Fatal error: Uncaught ValueError: Unknown format specifier "$" in /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-content/plugins/doctery-addons/doctery-addons.php:291
Stack trace:
#0 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-content/plugins/doctery-addons/doctery-addons.php(291): sprintf()
#1 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-includes/class-wp-hook.php(324): doctery_addons_register_post_types()
#2 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#3 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-settings.php(727): do_action()
#5 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-config.php(134): require_once('/home/u71995376...')
#6 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-load.php(50): require_once('/home/u71995376...')
#7 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-blog-header.php(13): require_once('/home/u71995376...')
#8 /home/u719953760/domains/cardiologue-tanger.com/public_html/index.php(17): require('/home/u71995376...')
#9 {main}
thrown in /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-content/plugins/doctery-addons/doctery-addons.php on line 291
[26-Aug-2025 16:12:58 UTC] PHP Fatal error: Uncaught ValueError: Unknown format specifier "$" in /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-content/plugins/doctery-addons/doctery-addons.php:291
Stack trace:
#0 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-content/plugins/doctery-addons/doctery-addons.php(291): sprintf()
#1 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-includes/class-wp-hook.php(324): doctery_addons_register_post_types()
#2 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#3 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-settings.php(727): do_action()
#5 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-config.php(134): require_once('/home/u71995376...')
#6 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-load.php(50): require_once('/home/u71995376...')
#7 /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-blog-header.php(13): require_once('/home/u71995376...')
#8 /home/u719953760/domains/cardiologue-tanger.com/public_html/index.php(17): require('/home/u71995376...')
#9 {main}
thrown in /home/u719953760/domains/cardiologue-tanger.com/public_html/wp-content/plugins/doctery-addons/doctery-addons.php on line 291

August 27, 2025 at 6:29 am #17350013

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

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

The issue is that some string was loaded incorrectly, so it causes the error.

You can do this
- open the file plugins/doctery-addons/doctery-addons.php
- go to line 291
- check for any text that might be translated
- go to String Translation and search for that text
- delete the string

Let me know if this fixes the issue.

August 27, 2025 at 10:29 pm #17353019

omarH-13

Hello
I am sorry, I am not a tech guy.. I might sound like a newbie for you, I just managed to make the site.. I want to translate the pages content (+ SEO of rankmath Plugin so they get ranked on google in arabic) and the menus so visitors can view the site in arabic .. that's all

On the line 291 of the file plugins/doctery-addons/doctery-addons.php there is this line:

'search_items' => sprintf( esc_attr__( 'Search %1$s', 'doctery-addons' ) , $portfolio_cpt_title ),

Line 297 to 295:
/**** CPT - Portfolio ****/
$portfolio_labels = array(
'name' => _x( $portfolio_cpt_title, 'post type general name', 'doctery-addons' ),
'singular_name' => _x( $portfolio_cpt_singular_title, 'post type singular name', 'doctery-addons' ),
'add_new_item' => sprintf( esc_attr__( 'Add New %1$s', 'doctery-addons' ) , $portfolio_cpt_singular_title ),
'edit_item' => sprintf( esc_attr__( 'Edit %1$s', 'doctery-addons' ) , $portfolio_cpt_singular_title ),
'menu_name' => _x( $portfolio_cpt_title, 'admin menu ', 'doctery-addons' ),
'name_admin_bar' => _x( $portfolio_cpt_singular_title, 'add new on admin bar', 'doctery-addons' ),
'add_new' => esc_attr__( 'Add New', 'doctery-addons' ),
'new_item' => sprintf( esc_attr__( 'New %1$s', 'doctery-addons' ) , $portfolio_cpt_singular_title ),
'view_item' => sprintf( esc_attr__( 'View %1$s', 'doctery-addons' ) , $portfolio_cpt_singular_title ),
'all_items' => sprintf( esc_attr__( 'All %1$s', 'doctery-addons' ) , $portfolio_cpt_title ),
'search_items' => sprintf( esc_attr__( 'Search %1$s', 'doctery-addons' ) , $portfolio_cpt_title ),
'parent_item_colon' => sprintf( esc_attr__( 'Parent %1$s:', 'doctery-addons' ) , $portfolio_cpt_title ),
'not_found' => sprintf( esc_attr__( 'No %1$s found', 'doctery-addons' ) , $portfolio_cpt_title ),
'not_found_in_trash' => sprintf( esc_attr__( 'No %1$s found in Trash.', 'doctery-addons' ) , $portfolio_cpt_title )
);

I went and deleted ALL the string translations in WPML settings, cleared cache, did it again in reverse order, they always reappear. I went to the main settings page of WPML and selected that only pages, articles, and the category where I put the cardio examinations + the menu as translateable, did non translateable for all the rest. Still no change. Same error when I go to /ar/, exact same error

If there is any way you could help, thank you

August 29, 2025 at 6:20 am #17356683

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

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

You need to search for Search %1$s and fix the translation. The problem is that the $ is not parsed correctly, so there's likely a space somewhere.