Home›Support›English Support›[Resolved] Php warning on secondary language when Kadence plugins are activated
[Resolved] Php warning on secondary language when Kadence plugins are activated
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.
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.
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.
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).
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.
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.
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...
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).
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.
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?
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 ?
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.
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,
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.