Skip Navigation

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

Last updated by Bigul 2 years, 11 months ago.

Assisted by: Bigul.

Author Posts
May 4, 2022 at 10:41 am #11150257

daveM-12

There are 65934 entries in the wp_options table for _transient_wpml-i18n-strings_

A large number of these seem to be repeated data.

e.g. a:1:{i:0;a:1:{i:0;s:8:"category";}}

and

a:2:{i:0;a:1:{i:0;s:8:"category";}i:1;a:1:{i:0;s:8:"category";}}

Is there anything I can do to clear these up?

May 4, 2022 at 2:27 pm #11152287

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

Please tries the following troubleshooting steps after a full site backup{mandatory} and make sure the issue is existing or not.

1) Go to WPML>>Support page, click on the Troubleshooting link (blue link in the middle of the page)

2) On the Troubleshooting page, please click on the following options of the *Clean up* section. Wait for confirmation of processing after each one.

- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix WPML tables collation
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment
- Cleanup and optimize string tables
- Show custom MO Files Pre-generation dialog box>>Generate .Mo files

--
Thanks!

Bigul

May 4, 2022 at 2:45 pm #11152499

daveM-12

I've been through all the steps except the last one: "Show custom MO Files Pre-generation dialog box>>Generate .Mo files"

The dialogue box does not appear and in the console there is an error:

wpmlSettingsUI is not defined

There are now 66476 total entries for _transient_wpml-i18n-strings_ so the number has gone up after following the steps.

May 5, 2022 at 8:15 am #11157269

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the updates. Are these entries added to the Database randomly?

Please try the following steps and let us know your feedback. It will help us a lot in debugging.

a) Create a dev/staging site(A clone copy of the live site)
b) Switch for a moment to a WordPress default theme like 2022
c) Deactivate all the plugins that are not related to WPML
d) Then check the issue is existing or not
e) If the issue is gone, activate the plugins as a group of three or four to find which one has an interaction issue
f) Switch back to the original theme of the site

--
Thanks!

Bigul

May 5, 2022 at 9:50 am #11158297

daveM-12

Regarding your question - "Are these entries added to the Database randomly?"

This would be a question for WPML developers. I don't know the purpose of these transients and why they would be added or what triggers them. All I can see is the large number of entries seemingly with the same data inside.

I have created a staging site with 2022 as them and disabled all plugins other than WPML. The database entries still exist. The console error when trying to trigger "Show custom MO Files Pre-generation dialog box" also still exists on this staging site.

May 5, 2022 at 11:57 am #11159155

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the updates. Please note that I am unable to reproduce the issue exactly in our test installation, also it is not showing similar entries in the wp_options table. So a couple of requests for tracking the issue.

a) Please check a new entry has been created for the staging site in *_transient_wpml-i18n-strings* when the theme is 2022 and non WPML plugins are deactivated

b) Please share with us the WordPress debug.log(not WPML debug information) for collecting more details on this. Refer to this page for instructions https://wpml.org/documentation/support/debugging-wpml/

To enable WordPress Debug log, open your wp-config.php file of site root and look for define('WP_DEBUG', false);. Change it to:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory.


If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).

--
Thanks!

Bigul

May 5, 2022 at 2:29 pm #11160443

daveM-12

I deleted all the _transient_wpml-i18n-strings_ entries from the options table to make sure that any new ones could be detected.

So far no new entries have been added in the database.

There are no errors in debug.log to send through.

Are the transients safe to delete manually from the database on the live site? I don't know what they are for.

May 6, 2022 at 9:45 am #11166083

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the updates. I have consulted about this with our team. WPML is not using any transient with name *transient_wpml-i18n-strings*. So it is coming from a third-party plugin.

In general, transient causes no issues. But if we delete them there are chances for they are created again. So deletion of these records from wp_options will not help much.

Therefore it will be great if you can track the plugin or theme causing this by doing the following steps on the staging site.

a) Switch for a moment to a WordPress default theme like 2022
b) Deactivate all the plugins that are not related to WPML
c) Then check whether the issue is existing or not
d) If the issue is gone, activate the plugins as a group of three or four to find which one has an interaction issue
e) Switch back to the original theme of the site

--
Thanks!

Bigul

May 9, 2022 at 8:27 am #11178493

daveM-12

I have traced this back to Tribe Events - Events Calendar Plugin.

You can see the start of the class below and also the reference to "wpml-i18n-strings" in the caching function.

/**
* Class Tribe__Events__Integrations__WPML__Utils
*
* A utility class offering WPML related convenience methods.
*/
class Tribe__Events__Integrations__WPML__Utils {

/**
* Returns the translation of an array of strings using WPML supported languages to do so.
*
* @param array $strings
*
* @param string $locale Optional; the locale the strings should be translated to;
* should be in the "fr_FR" format.
*
* @return array
*/
public static function get_wpml_i18n_strings( array $strings, $locale = null, array $domains = null ) {
array_multisort( $strings );
$cache = new Tribe__Cache();
$cache_key = 'wpml-i18n-strings_' . md5( serialize( $strings ) . $locale . serialize( $domains ) );

$cached_translations = $cache->get_transient( $cache_key, 'wpml_updates' );

if ( ! empty( $cached_translations ) ) {
return $cached_translations;
}

$tec = Tribe__Events__Main::instance();
$domains = apply_filters( 'tribe_events_rewrite_i18n_domains', [
'default' => true, // Default doesn't need file path
'the-events-calendar' => $tec->pluginDir . 'lang/',
] );

/** @var SitePress $sitepress */
global $sitepress;

if ( null === $locale ) { // Grab all languages
$langs = $sitepress->get_active_languages();

$languages = [];

foreach ( $langs as $lang ) {
$languages[] = $sitepress->get_locale( $lang['code'] );
}
} else {
$languages = [ $locale ];
}

// Prevent Duplicates and Empty langs
$languages = array_filter( array_unique( $languages ) );

// Query the Current Language
$current_locale = $sitepress->get_locale( $sitepress->get_current_language() );

// Get the strings on multiple Domains and Languages
// WPML filter is unhooked to avoid the locale being set to the default one
remove_filter( 'locale', [ $sitepress, 'locale_filter' ] );
$translations = tribe( 'tec.i18n' )->get_i18n_strings( $strings, $languages, $domains, $current_locale );
add_filter( 'locale', [ $sitepress, 'locale_filter' ] );

// once an option is updated this cache is deprecated
$cache->set_transient( $cache_key, $translations, 0, 'wpml_updates' );

return $translations;
}

May 9, 2022 at 3:52 pm #11183207

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the details. A couple more questions to tracking this.

a) Are any new entries have been created in the staging site for *_transient_wpml-i18n-strings* when Tribe Events - Events Calendar Plugin is active?

b) Have you enabled any cron jobs on the server?

--
Thanks!

Bigul

May 9, 2022 at 4:02 pm #11183257

daveM-12

Yes as soon as Tribe Events - Events Calendar is activated the _transient_wpml-i18n-strings_ entries start to appear again.

There are no cron jobs that we have added on the server.

May 9, 2022 at 5:53 pm #11183851

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the updates. Please fill the private details fields after a full site backup. I would like to access the Super admin area of your site(because of Multisite) for further checking.

Please refer to the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

Also, please allow me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server.

--
Thanks!

Bigul

May 10, 2022 at 12:48 pm #11189675

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the login information. I have activated the following plugin to log the actions. Hope it will help us to track the issue. Will review it after a few hours and update you. Please wait.

https://wordpress.org/plugins/aryo-activity-log/

--
Thanks!

Bigul

May 11, 2022 at 4:37 pm #11201619

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

The Activity logs look normal. So please check are any new entries have been created in the staging site for *_transient_wpml-i18n-strings* today or yesterday?

--
Thanks!

Bigul

May 18, 2022 at 7:47 am #11243927

daveM-12

Hi, there are entries (_transient_wpml-i18n-strings_) still being created but I suppose it may depend on traffic to the site, changes made etc..

As this is a staging site that has been created for purposes of testing with yourselves it is low to no traffic.