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.
|May 13, 2019 at 10:32 pm #3801911|
TRYING TO: fix the one product which URL gets read wrong in the French (
Link to a page where the issue can be seen: hidden link
EXPLECT TO SEE: Reproduce the problem:
Start from the French site, from any page where you can access products:
click on the product Nutshell Console Lite and add it to cart
INSTEAD I GET: From the cart page; if you hover over the product nutshell console lite that you put in the basket watch the link in the status bar:
BEHAVIOUR: Now, there are 2 path of wrong behaviours
A) if you click on the message above the cart saying «Nutshell Console Lite» a été ajouté à votre panier. Poursuivre les achats (continue shopping) (Remember you are still on the French cart). You end up on the ENGLISH Nutshell Console Lite product page. From the sidebar or below the product area, click on another products, let's use AuditPro and add it to the cart as well. If you hover over auditpro in the cart, you will see its link is correct en/products/auditpro and Nutshell is en/products/Nutshell.
B) Repeating from the start with an empty cart. Add Nutshell (from French page) then, instead of clicking continue shopping, click on AuditPro from the side bar; note that you land on the French AuditPro page, which is correct, and then add it to the cart. Once back at the cart page (correctly in French) hover over the products. The Nutshell slugs is corrupt but AuditPro is correct, in French as it should be. Now, switch language to English. Both products slugs are correct (meaning they will lead somewhere but not the right place) but in FRENCH instead of English. Switch again the language to French and now you are in the French cart page and both links are resolving links but Nutshell's is in English /en/products/Nut.... while AuditPro is correctly in French. Note that after you added Audit Pro to the cart, if you had clicked on the message Poursuivre les achats, you would have remained on the French site, unlike when you do this after adding one of the Nutshell products.
I don't know how the Nutshell products got corrupted. I have tried to duplicate the French Nutshell product and trash the original. It seemed to work but then it was the English one that was having the same crazy behaviour. So I recreated the English product as well. And then the entire French site products would not resolve anymore.
The current structure is super fragile, simply adding a redirect to try to address the nonsense actually broke the whole store and only either the English or French would resolve. I don't know how many time I went through the sequences of setting the strings, the permalinks, the store page, in one language and then reapplying the strings, in the other language. Changing my WP Admin Language in between certain operations being necessary for certain changes to be applied. I tried setting all the strings from English and then translating them to French. I tried the same for the slug strings with French. In every situation, one of the product store language would go down.
Background: We upgraded from a very old version of wpml (I don't remember what it was but it wasn't registered) My boss bought and upgraded on Wednesday. Since the upgrade, I've been under intense pressure to get this resolve because we are in the middle of a product launch (nutshell).
Note that I have used the cart as an example for you to see the problem in action but in fact the problem occurs whenever the link for the french Nutshell Console is used. The only difference is that on the side bar or the products page (shop based) products, the link resolve to the page of the product.
However, whenever used with a woo commerce plugin in the main body e.g. the cart, or the shortcode Products or Best Products, the link does get corrupt right away. That is why you can see that I have not included nushell console lite in the "licences et produits" page whereas I did let it be on the licenses and products page. It is curious that the same short code, in the sidebar (best selling products) and in the center body do not promote the same behaviour for the the Nutshell family urls
If you go to the parent page of the Nutshell products called simply Nutshell Console, in the middle you have a comparison of the 3 products and below Nutshell Console Lite you have a button add to cart. This shortcode button does add NCL to the cart but with the faulty behaviours described in A and B above.
Since right after the upgrade of WPML my shop/product base slug would not translate, I was having problems similar to StephanK-2 (I had tried everything he had done throughout his thread when I found that post so I applied the solution brought up by the developer and it seemed to solve the translations) and ClaireH-2, I carefully followed the instructions and it did enable the translation of everything else but the issue I am brigning to your attention.
If you need access, please let me know and I will ask permissions from my boss.
|May 14, 2019 at 8:47 am #3804867|
Languages: English (English ) Hebrew (עברית )
Timezone: Asia/Jerusalem (GMT+03:00)
I can see some of the problems that you are describing. Your description is very long, and I'm not sure that I follow it exactly. However, I get the main point which is that the Nutshell Console Lite product links are wrong when you add this product to the cart.
You have mentioned the following: "We upgraded from a very old version of wpml (I don't remember what it was but it wasn't registered)"
You also mentioned: "I have tried to duplicate the French Nutshell product and trash the original."
The topic ‘[Closed] One product url gets overwritten with inexistant one when located in certain are’ is closed to new replies.