Skip Navigation

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

Problem:
If you're experiencing issues where adding a WooCommerce shortcode breaks the page editing functionality, and you're unable to edit the page until you disable either WPML or WooCommerce plugins, the problem might be related to string translations.
Solution:
We recommend checking the WPML -> String Translation section for the specific string 'Select options for'. It's likely that the translation format is incorrect. You should change it from "%": Déan rogha to "%s": Déan rogha. This adjustment has been tested and should resolve the issue.

Regarding the removal of all current strings and using only .mo files, we advise against deleting strings from the String Translation as this will result in strings appearing untranslated. It's essential to have them registered within the String Translation screen for proper functionality.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, 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.

This topic contains 8 replies, has 3 voices.

Last updated by Mateus Getulio 4 months, 3 weeks ago.

Assisted by: Mateus Getulio.

Author Posts
June 19, 2024 at 1:04 pm #15755889

David Henry

Background of the issue:
If I add a WC short code it seems to break everything, I can no longer edit the page until I turn of either WPML WC plugins.

For example:
[featured_products limit="30" columns="4" orderby="date" order="desc"]

When I add this to a html widget, the wc content takes over and the page builder is broken like this: hidden link and I'm stuck.

I've brought this up with the theme developer and they've pointed out that this issue is due to JavaScript errors with both your plugins, they explain it better than I here: hidden link

I have also tried in twenty twentyfour with all non relevant plugins disabled, same issue.

Symptoms:

Questions:

June 19, 2024 at 1:12 pm #15755956

David Henry

I've disabled both plugins so I could add the code, below is the affected page:

hidden link

AS you can see it's killed the theme which you can see working here: hidden link

June 19, 2024 at 3:56 pm #15757284

Marsel Nikolli

Thank you for contacting WPML support,



before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

To allow us to see if any PHP errors are being produced, please provide me with the WordPress debug.log. More Info: https://wordpress.org/support/article/debugging-in-wordpress/

To enable debug.log, open your wp-config.php file and look for:

define('WP_DEBUG', false);

And change it to:

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 which is recommended on a live site.
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

Then open the page you're having problems with and check if any errors were saved to the debug.log log file inside the “.../wp-content/” directory.

If there is any error showing on the file, please copy/paste the content of the debug.log file to https://pastebin.com/ and share with us that link.

Kind regards,
Marsel

June 19, 2024 at 5:15 pm #15757771

David Henry

Done, lots of errors, here's the fatal error:
https://pastebin.com/1pNcHXcC

Here's the log files:
https://pastebin.com/qT2Gp1u4

June 20, 2024 at 11:35 am #15763317

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

I would like to request temporary access (wp-admin and FTP) to your staging site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

Please, let me know if you need any additional details. Have a nice day.

June 21, 2024 at 12:33 pm #15775121

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Upon further review it looks like the issue is caused due to an issue with a string translation.

Please go to WPML -> String Translation (or Aistrigh giotaí téacs) and search for the string 'Select options for'. You'll notice that the translation of that string has an incorrect format.

Please change it from "%": Déan rogha to "%s": Déan rogha

That should fix the issue. I just tested it in the sandbox and it worked for me.

Thank you, please let us know.
Mateus

June 21, 2024 at 1:22 pm #15775567

David Henry

It looks like you've already done this for me, thanks.

Is there a way to remove all current Strings and just use .mo files?

June 21, 2024 at 2:02 pm #15775855

David Henry

Just to note, I have found this in the file woocommerce-ga_IE.mo and replaced it, I've also removed the string.

The issue has come back 🙁

June 21, 2024 at 6:23 pm #15778036

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello David,

I'm afraid that deleting the strings in the String Translation will cause the strings to show up untranslated. Using only MO files won't work for all strings, it is better to have them registered within the String Translation screen for it to work properly.

I checked the staging site and I cannot reproduce the issue any longer, is it happening in a specific page now?

Thank you, please let me know.