Skip Navigation

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

Problem:
If you're experiencing a PHP warning message in the WordPress Admin when viewing any admin screen in a secondary language, and it only occurs with certain Kadence plugins activated (Kadence Pro, Kadence Blocks, Kadence Blocks Pro), we can help you address this issue.

Solution:
First, we recommend creating a staging site to safely investigate the issue without affecting your live site. You can use your hosting service or a plugin like WP Staging for this purpose. Once the staging site is ready, replicate the problem there by activating WPML + String Translation with all other plugins disabled and a default theme like Twenty Twenty-Four.

If the problem disappears, gradually activate your theme and plugins one by one to isolate the cause. If the issue persists with just WPML + String Translation and Kadence plugins, it indicates a specific conflict between Kadence Pro and String Translation.

To resolve the issue:
1. Navigate to WPML > String Translation.
2. Filter by domain: "Text Domain".
3. Select and delete all the strings in that domain using the "Delete all selected strings" option.

This should remove the PHP warning. The issue arises from incorrect registration of dynamic strings by the Kadence plugin, and we are reaching out to them for a fix.

Please note that this solution might be outdated or not applicable to your case. If the problem persists, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.

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

Last updated by Alejandro 1 year, 3 months ago.

Assisted by: Alejandro.

Author Posts
February 5, 2024 at 11:52 am #15265852

malikaB-2

The site's primary language is French and the secondary language is English.

In the WordPress Admin, when I am viewing any admin screen in the secondary language, I am getting a PHP warning message :

PHP Warning:  sprintf(): Too few arguments in /home/customer/www/bonapace.equimagine.com/public_html/wp-content/plugins/wpml-string-translation/classes/translations-file-scan/wpml-st-translations-file-registration.php on line 100

This error message show only in the back-end and is not showing when viewing the admin in the Primary language.

I have tried all the normal debugging steps, desactivating all plugins, switching to a basic theme, checking memory limits etc.

The php error seems to be a bug as it only appears when the following Kadence plugins are active :
- Kadence Pro
- Kadence Blocks
- Kadence Blocks Pro

The site is currently at the end of development. Apart from this error, everything else seems to be working as it should on the site in both languages.

Would you be able to help ?

February 5, 2024 at 2:53 pm #15266791

Alejandro
WPML Supporter since 02/2018

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

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

Hello!

Could you install the plugins you mentioned above, in this sandbox? --> hidden link

I have installed WPML but it' not setup yet. can you just install the plugins and let me know? i'll setup WPML and try to see if i can recreate the problem from scratch.

thanks in advance.

February 5, 2024 at 8:02 pm #15268308

malikaB-2

Hi Alejandro,

I have installed and activated the following plugins in the sandbox :
- Kadence Pro
- Kadence Blocks
- Kadence Blocks Pro

I have also installed the Kadence Theme as it is required for Kadence Pro to work.

Thanks for your help!

February 6, 2024 at 5:56 pm #15273388

Alejandro
WPML Supporter since 02/2018

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

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

Can you please tell me where exactly do you see the problem?

I have here 2 posts (one for each language) with kadence and translated with the translation editor:

- hidden link
- hidden link

And i don't see any error in the back-end or in the front-end

Can you check the sandbox and see if you can see it anywhere? then let me know so i can better understand what to do next (the debug log is enabled and so DEBUG display).

February 7, 2024 at 8:11 am #15274904

malikaB-2

Hi,

The error message only shows on the backend, when viewing any admin page in the secondary language. The frontend for both languages works as it should.

The primary language is French Canadian, and secondary language English.

I don't know if it makes a difference but on my site, the pages are not translated using the translation editor, but are duplicated in the wordpress editor as the page content / layout is not the same in english and french.

So to edit the page / article / product in the secondary language (english) I have to access the admin in the english version and this is when the php error occurs.

Capture d’écran 2024-02-07 à 09.06.35.png
February 7, 2024 at 11:10 am #15276181

Alejandro
WPML Supporter since 02/2018

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

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

I checked teh back-end as well, the front-end links were just to let you know which posts i had translated.

and i see no problem there either: hidden link

you mention that you duplicated the content but there is nothing either duplicated or translated on that page you used a screenshot on.

---------------

Would it be possible to have a quick video on how you actually get to the error and maybe allow me access to the site? or better yet check if there's something missing in the sandbox site and create it and see if the problem appears there?

It seems the problem you're having is because there's content missing in some of the files that String Translation is trying to read, probably from kadence, but it's not happening on the sandbox site which tells me the problem could be specific to your site, in case the steps taken in the sandbox are correct.

February 7, 2024 at 12:22 pm #15276563

malikaB-2

Hi, I think it will be easier if I allow you access to the site as it is still on a test URL. How can I do this ?

February 7, 2024 at 2:03 pm #15277005

malikaB-2

I've had a look in the sandbox and I can't reproduce the issue. I wonder if it's not to do with my WPML translation settings...

February 7, 2024 at 2:08 pm #15277009

malikaB-2

What I find very strange as well is that on the sandbox when I switched the main language to french then all the WPML setting show in french and on my site they are all in english...

February 7, 2024 at 2:13 pm #15277039

Alejandro
WPML Supporter since 02/2018

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

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

Ok, so now we have to investigate what the problem is in your site that could be creating the problem.

Would it be possible for you to create a staging site and see if the problem happens there as well? if it does, can you see if the problem happens with just WPML + String Translation (all the other plugins disabled) and with a default theme active like twentytwenty four, so we can try to isolate the problem?

If that make the problem disappear, start by enabling the theme and check the problem. if that still doesn't show the problem, then start by activating the plugins. i'm saying this because maybe it has to do with Kadence, but it could be with the theme or some of its plugins.

And i'm asking you to do it on a staging site just so we can make sure the same issue happens there as well and we can investigate there without risk on your production site.

afterward, you can allow me access to the staging site (your osting can probably help you create a staging site, in case you don't know how to create one. or you can use a plugin like wp staging to do it easily).

February 7, 2024 at 5:22 pm #15278135

Alejandro
WPML Supporter since 02/2018

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

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

It seems the password provided is not correct. can you please verify it and allow me access?

if the problem is only happening with the child theme, then it's likely the problem has to do with the functions.php file, maybe a custom function somewhere if you have any.

February 8, 2024 at 1:29 pm #15281423

Alejandro
WPML Supporter since 02/2018

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

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

These are the exact plugins that create the problem: hidden link

in particular is between something in the kadence pro plugin alone and String Translation and it's happenign because something in the plugin's code is not reaching us as expected.

Would you leave the staging site available and as it is right now while one of our devs can try to figure out where exactly the problem is?

February 8, 2024 at 1:44 pm #15281518

malikaB-2

Yes, of course I can leave the staging site in place as it is.
The site itself is currently on a dev url as I just finished building it. It's supposed to go Live today or tomorrow.
Do you think this error could negatively impact the e-commerce functionality of the site or could I launch as is as it doesn't seem to be affecting the front-end ?

February 8, 2024 at 3:08 pm #15281954

Alejandro
WPML Supporter since 02/2018

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

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

In theory what's happening is that there's a string that doesn't contain everything that is needed to be printed correctly. it shouldn't affect your site when it comes to SEO, performance, etc but it may end up with one part of a phrase that would not be translated in the translated languages.

February 9, 2024 at 6:38 am #15284108

Alejandro
WPML Supporter since 02/2018

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

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

We found the issue and you can fix it this way:
- Go to WPML > String Translation
- Filter by domain: "Text Domain"
- select and delete all the strings in that domain by clicking the option "Delete all selected strings" option.

The problem should be gone now.

It seems that some strings are registered incorrectly by Kadence and as soon as they are registered, they end up getting that error from us.

We are contacting them so they can have it fixed since the problem is not really on our end, it's specifically happening because of wrong registration of dynamic strings in their code.

Regards,