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.

Tagged: 

This topic contains 18 replies, has 2 voices.

Last updated by Nicolas V. 1 year, 3 months ago.

Assisted by: Nicolas V..

Author Posts
August 14, 2023 at 3:40 pm #14198419

jonathanF-3

I am trying to edit product variation metadata and nothing is shown.

Variable product were created a couple years ago and are accessible on front-end, but we can't change meta data (price, etc.) on the variation in the backend.

As soon as I disable WPML, we are back to normal and are able to edit the information.

I can't provide Debug information because WordPress is telling me "You dont have enough acecss privilege to view this information (but I am the owner/admin of the site)"

August 15, 2023 at 2:58 pm #14204019

Nicolas V.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Welcome to the WPML support forum.

Regarding the permission issue. If you go to WPML menu, can you see all the menu items? If not:
- Add the code below into the functions.php file inside your active theme folder
- Visit your homepage (frontend)
- Remove the code from the functions.php file and see if anything changed in the backend

function wpmlsupp_1706_reset_wpml_capabilities() {
    if ( function_exists( 'icl_enable_capabilities' ) ) {
        icl_enable_capabilities();
    }
}
add_action( 'shutdown', 'wpmlsupp_1706_reset_wpml_capabilities' );

If it solves the permission issue, please then share with me your debug info. It seems that you already know how to do it but in case:
- Go to "WPML > Support > Debug Information" (link)
- Copy the Debug Information from there.
- Find the private field I activated and paste that information.

---

While waiting for that file, could you please give me more details about the issue. You should be able to change all metas on the original product but you won't be able to edit some of those metas on your translation (you will see a lock next to the field). That's totally normal as both products (original and translation) must be synchronized at all times (same stock, same SKU...).

---

Last thing, as you mentioned that those variations were created years ago, maybe you need to update WPML and it's addons (You will need at least "String Translation" and "WooCommerce Multilingual" if you have WooCommerce products).
1. Make a full backup of your site and database
2. Then you can download all our plugins directly from your WPML account.
- Go to https://wpml.org/account/downloads/
- Click on "Download WPML manually" to see all plugins and download them
- In your WP dashboard, go to "Plugins > Add new" and use the button at the top of your screen to upload the .zip file

August 15, 2023 at 6:30 pm #14204915

jonathanF-3

Hi,

Permission issue is now OK.

We are long time users of WPML. All plugins are at their latest version (that's the first thing we checked). We also know how the translation work. (Always locked in the second language).

Problem is : We can't edit metadata in any of the languages. As soon as we disable WPML, we are able to manually edit each product (In both language). If we reactivate WPML, then we have the same problem again.

We also have this error in the WooCommerce logs:

2023-08-11T17:26:31+00:00 CRITICAL Uncaught ValueError: Unknown format specifier "a" in /var/www/dusenza.com/htdocs/wp-content/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-data-variations.php:121
Stack trace:
#0 /var/www/dusenza.com/htdocs/wp-content/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-data-variations.php(121): sprintf()
#1 /var/www/dusenza.com/htdocs/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-product-data.php(182): include('...')
#2 /var/www/dusenza.com/htdocs/wp-content/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-data-panel.php(53): WC_Meta_Box_Product_Data::output_variations()
#3 /var/www/dusenza.com/htdocs/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-product-data.php(33): include('...')
#4 /var/www/dusenza.com/htdocs/wp-admin/includes/template.php(1445): WC_Meta_Box_Product_Data::output()
#5 /var/www/dusenza.com/htdocs/wp-admin/edit-form-advanced.php(688): do_meta_boxes()
#6 /var/www/dusenza.com/htdocs/wp-admin/post.php(206): require('...')
#7 {main}
thrown dans /var/www/dusenza.com/htdocs/wp-content/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-data-variations.php à la ligne 121

Since the error disapear if we deactivate WPML, the WooCommerce team suggest that you have a look at this first.

August 16, 2023 at 1:19 pm #14236065

Nicolas V.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Could you please provide me with a temporary admin access (wp-admin and FTP) – preferably to a test site where the issue has been replicated – so I can further investigate.

I will activate a private field for your next answer where you can provide that information safely (this field is only visible by you and the support team). Don't share your own admin account, create a new one that you will delete when we finish troubleshooting.

IMPORTANT: Before we proceed, please backup your site and database.

I would additionally need your permission to de-activate and re-activate Plugins and Themes, and to change configurations on the site. I will also run some troubleshooting options. This is also a reason why the backup is really important.

Nico

August 17, 2023 at 5:39 pm #14248169

Nicolas V.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Thanks for the access. I'm not sure if it's an issue related to the staging copy but I found few things:
1. In "WPML > Support" I found that the memory limit was very low
- I installed "WP File Manager" in order to access your wp-config.php file, but it's not there!
Here are the instructions so you can do it yourself:
- Access your server via FTP and open wp-config.php (in your WordPress root directory).
- Insert those lines just before /* That's all, stop editing! Happy blogging. */

/* Memory Limit */
define( 'WP_MEMORY_LIMIT', '256M' );

More info: https://wpml.org/home/minimum-requirements/
PS: I uninstall WP File Manager" plugin afterwards

2. In "WPML > Settings > Translation Editor > Editor for new translations" I found that neither "Advanced Translation Editor (ATE)" or "Classic Translation Editor (CTE)" were selected.
- I selected ATE
- Then I edited this product: hidden link
- When I opened the translation but ATE was empty so it means that you used CTE before
- I went back to "WPML > Settings > Translation Editor > Editor for new translations" and selected CTE
- This time I when I open the translation, I have all the fields translated

3. Metadata
- I went back to: hidden link
- I was able to change the price
- I updated the translation and the price got updated too

- I took a variable product: hidden link
- I was able to change the price on both variations
- I updated the translation and the prices got updated

PS: for all 3 prices changes, I simply added a "1" at the beginning, meaning if the price was $9.95 it's now $19.95.

August 17, 2023 at 6:01 pm #14248305

jonathanF-3

Hi,

WP Memory: Sorry it was low only on the staging site. Production site is 256mb already.

Are you able to test on a different product? Please search for the product SKU : HAD-100 and try to change the variation. They are not there.

See here: hidden link

August 18, 2023 at 2:24 am #14249317

Nicolas V.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hi,

- I went to hidden link
- I was able to change the SKU (adding a "a" at the end) and the price (adding a "1" at the beginning)
- I saved the product
- Entered the translation using our translation editor (pencil in the right sidebar) to re-validate it. You shouldn't use the default WordPress editor to modify product translations.
- SKU and prices changes are showing on the frontend for both languages

August 18, 2023 at 12:28 pm #14252469

jonathanF-3

How did you change the price?

We can't even see the variations?? See here: hidden link

August 18, 2023 at 1:43 pm #14252809

Nicolas V.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Here is a video of my intervention: hidden link

As you can see I don't have the same issue at all. It might be an issue related to permissions and capacities from your own account.

Here is a code to reset your WPML capacities. If the issue persist after that maybe try from my account or create a new admin account for yourself.

- Add the code below into the functions.php file inside your active theme folder
- Visit your homepage (frontend)
- Remove the code from the functions.php file and see if anything changed in the backend

function wpmlsupp_1706_reset_wpml_capabilities() {
    if ( function_exists( 'icl_enable_capabilities' ) ) {
        icl_enable_capabilities();
    }
}
add_action( 'shutdown', 'wpmlsupp_1706_reset_wpml_capabilities' );
August 18, 2023 at 2:04 pm #14252913

jonathanF-3

Thanks for the quick reply.

I dit the permission reset using your PHP snippet, nothing changed.

I've then completely deleted my user and re-created it : Same problem! My client (shop manager) also has this problem, he can't edit variation.

August 18, 2023 at 4:29 pm #14253977

Nicolas V.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hi Jonathan,

Yes, capacities from WPML would impact only the translations but you also have issues on the original product. But it was worth a try.

1. Try with my account (to see if the issue is "account related")
2. Try from a different browser (to see if it's "cookies related"). If it works from a different browser, then delete all cookies from your site on your main browser

August 18, 2023 at 8:26 pm #14255143

jonathanF-3

Tried earlier today and it's related to the account, so it' "account related".

If I use your user, everything is fine. Please note that we have the problem with my account (original admin) and my client account (shop manager).

August 18, 2023 at 9:52 pm #14255317

Nicolas V.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hi,

Would it be possible to use a third party plugin such as User Switching or WP User Switch to test your different accounts without having to share passwords?
https://wordpress.org/plugins/user-switching/
https://wordpress.org/plugins/wp-user-switch/

PS: please not that those are third party plugins we don't support. I just thought of them for test purposes but please make sure to make a full backup before using them.

Else, try to create another admin account like you did before (don't delete yours) and provide me with the password in the private field.

Because it's hard to debug an issue if I can't reproduce it.

August 22, 2023 at 12:04 am #14267195

Nicolas V.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hi,

I spent quite some time on the DEV site. I ran our troubleshooting tools, updated WooCommerce and reinstall our plugins.
Then I switched to minimal environment to make sure it was not a conflict with a third party plugin (I disabled all plugins except WooCommerce and WPML plugins and switched to 2021 default theme).

What I noticed is that when using your account I have an error 500 in console and if I disable String Translation, this 500 error is gone, but you need String Translation.

I sent your ticket to my colleagues to check if they encountered some case before or if they have some ideas. In order to escalate it to the second tier support, I would need to replicate your site on our servers.

For this, you need to temporarily install a plugin called “Duplicator” on your site. This will allow you to create a copy of your site and your content.
I have activated a private field for you where you can share those files (package + installer).
- You can exclude /wp-uploads from the copy to reduce the size
- Once the package is ready, if the files are too large to upload them to the private field, you can share a link to Google Drive, Dropbox, WeTransfer or any other similar service.

Once the problem is resolved I will delete the local site. Let me know if this is ok with you.
https://wpml.org/faq/provide-supporters-copy-site/

account with issue.png
August 22, 2023 at 11:19 am #14270525

Nicolas V.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Please read my private answer above