Pro 6.1.9: After updating from Pro 5, native WPML language defaulted to English

Hi!

I was waiting to update one of the WPML websites until now. I updated it, and the default Croatian language is now in English on the Shop layouts.

Here is a Product page on the native (Croatian) language on the live website (Pro 5.1.5): https://www.mojemalozlato.com/bezglutenski-proizvodi/sjeme/

And here is the same page on a staging copy with Pro 6.1.9:

As you can see, various elements are in English, on the Croatian page.

The default WPML language is Croatian:

I have tried to fiddle around WPML, but I cannot get the default Croatian to show up. It seems to be a Pro 6 issue. I won’t be able to update until this gets resolved.

EDIT: Due to the WPML issue, on the live site, I had to restore the server backup back to Pro 5.1.5. The front-end is OK, but Cornerstone is completely broken. I cleared all caches. I cannot clear the Cornerstone Style cache because the Cornerstone settings page is empty.

Can you take a look?
Thanks!

Interestingly it seems it’s just your buttons that have this issue. I couldn’t see any changes from the actual button element from 5 to 6. I have access to the WPML integrations repo and that looks fine too for buttons and unchanged. Probably has something to do with the post type layout change. The production access was not working for me, but I’m guessing that’s from the rollback. I really just need a WP All in one migration file without the media, so i can see the icl_translations table. If you see post_cs_layout in that table, most likely the button translation didn’t get carried over and will need to be moved to post_cs_layout_archive or whatever layout type it is now. See secure note too.

HI @charlie, sorry about that. You are right, after the rollback I forgot to update the password. It is working now, as per the secure note.

I built this website three years ago and had one of my employee to maintain it. She reported that something changed with WPML a while ago and since then, there are various problems. I am trying to get back into the logic how this was built. I see that It says that the product layouts are not translated. Probably pages and products on separate languages are made manually and connected with WPML.

There vere big problems with translating layouts at the time, so I opted for a different method instead. For example, updating one language would wipe out the other one.

It all became quite a mess and honestly, the best approach would be to rebuild the whole thing. I’m trying to figure out why is there no “Add to cart” string translation and how the thing worked previously. Probably pages and products in other languages were made separately and connected manually. I should switch to translating the layout now, if that works well now.

The first step would be to get Cornerstone working again after the rollback to Pro 5. Should I try manually reinstalling it? I can’t clear the style cache because the Settings page is empty.

Thanks a lot!

Okay for clearing the cache in Pro5. Try adding the following into your child theme. You can remove after you’ve launched the WordPress dashboard once. I have a feeling some of the cache is in the DB so I’m not sure a manual reinstall will work in this scenario, but changing the x_version in wp_options might also.

So I’d guess that if you can’t find the translations in the string translation they are probably in the “Packages”. I would also check the WPML site if the translation is somewhere there in their editor. If you have a problem translating a layout in 6 let me know, was working good minus the post type migration.

<?php

add_action('admin_init', function() {
  CS()->component('Cleanup')->clean_generated_styles();
});

Hi @charlie!

Thanks for the code!

I tried it and unfortunately Cornerstone is still messy.

I will see about the changing the x_version. I can go to PhpMyAdmin and make a DB backup, and then do it. Do you have any additional recommendations, what should I change it into?

Thank you!

Yeah I think I’d just reupload to a pro-5 directory in your themes folder. If that code didn’t help I’m not sure it’s caching based, but still could be. I’ve checked and I think you might be running Pro6 CSS on this page so I’m not sure cache clearing will do anything. Let me know if a reupload helps!

1 Like

Well I was able to recreate the post type issue with your data. So I’ll try to make sure your migration runs smoothly. This might fix the issue with buttons. However, the translation data is a little confusing, as “Add to Cart” is a translation for HR and there is also a correct translation in this same table (icl_strings). The actual Cornerstone Meta is in english for the buttons too on HR (_cornerstone_data). So I’m still hoping the post type issue is the main thing, but I feel like it could either way for the buttons.

I’m going to centralize your other issues here if that’s alright. Could be a couple of things with that missing section, I’m guessing one of the content areas in that section, or the Global block. I am able to recreate so I’ll handle with these other ones. Making sure the post type migration works will be the first priority here.

Possibly, but because I think this site started off on X, your version is way off and I’m guessing you haven’t had the migrations of years past. The post type one for 6 happens from that, but it also runs when you open the app so that wouldn’t prevent you from migrating.

1 Like

Hi @charlie!

I reuploaded Pro 5 and now the backend is back as it was.

I will work on this site next week, upgrading some WooCommerce functionalities and possibly fixing the logic of how products are translated. I need to add a German version to the shop as well.
This week I tried working on it, but was hitting the wall all the way. :slight_smile:

Yes, I built this website with X back in 2016. and redesigned it with Pro in 2020.

Thanks for devoting time to this. Making it migrating to Pro 6 without issues will be a massive help!

Hi @Misho,

You are most welcome.

1 Like

Hi @charlie,

I noticed now that I cannot crate the German product layout. You are probably aware of the extent of the issue, but here it is just in case:

image

Thanks!

Hey Misho. I actually made some progress on the migration yesterday prior to the WP 6.2 meltdown. I’ll make sure you can create a German WC Single. The current issue puts you into such a limbo that this is probably already fixed on my environment that had a successful migration. All of your buttons and translations were fine so no worries there. I’ll check this and that your Global blocks are fine and I think I’m good to send this your way to run on another staging site.

1 Like

Hi @charlie!

Just to let you know that I tested translating layouts in 6.2.0-beta2. I’m not sure if some of those fixes are in there already. When on the Shop Archive page, Clicking a WPML Flag for a new language creates a new page in a new tab, but the one created is not an Archive page, but rather a Single layout.

image
(“Njemački” means “German”).

Thanks!

Hey Misho.

Well finally had a successful migration with your stuff several attempts later. Ended up needing everything to be a raw SQL update, otherwise WPML would intervene and reset your translations.

That sounds like another issue, but I’ll check tomorrow when I run through the migration one more time. None of this was ready yet for beta2 unfortunately, but I’m really trying to get you something for Monday. I’ll update you tomorrow most likely too.

1 Like

Okay 6.2.0 will have the new migration for the WPML custom layout types issue. Run it in a staging with Pro5 data and let me how it goes on your end. I’ll be checking out the translation issue with WC layout types as well next week. Have a good weekend!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.