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

Last updated by Bigul 6 months ago.

Assigned support staff: Bigul.

Author Posts
April 10, 2019 at 3:40 pm #3578079

cristianD-13

Hello,
I'm having a problem with what I'm assuming is the permalinks.
The issue that I'm having is that some products return a 404 in secondary languages, and some don't. Here's two products for example:
- product A, with sku 1694201180. The Italian translation works fine
- product B, with sku 1695102666. The Italian translation exists and is published, but its page returns error 404. Original language works fine

Some extra info:
- Product permalink is set to custom base, "/product"
- Product base has been translated in all the available languages from the WooCommerce Multilingual > Store URLs page
- Under WPML > Settings, "Translate custom post and taxonomy base slugs (via WPML String Translation)" is enabled
- Under WPML > Settings > Post Types Translation, product slugs are translated correctly
- I also searched for "product" inside the String Translation page, and every result was translated correctly
- For some reason, not all products are affected (you can search the two skus I mentioned to test that)

April 10, 2019 at 4:47 pm #3578873

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

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

Please visit Settings>>Permalinks, save the settings without any changes(just resave) and make sure the issue is existing or not.

If the issue exists, please share with me the WordPress debug.log (not WPML debug information) for tracking the issue. Please check this page for instructions https://wpml.org/documentation/support/debugging-wpml/

To enable it, open your wp-config.php file 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 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please do the steps to reproduce the bug and check you are getting any errors or warning related to WPML in the log file.

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

April 11, 2019 at 6:38 am #3584087

cristianD-13

Saving the permalinks didn't work, I tried multiple times.
Here's the log: https://pastebin.com/vwyjvAw7 I opened a product that works and changed language, then opened one that doesn't and changed language

April 11, 2019 at 4:38 pm #3590709

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

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

Please check 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

--
Thanks!

Bigul

April 12, 2019 at 5:30 pm #3600935

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the login information. It is showing the Italian translation after I update the Products in both languages(just resave). This may be happening because of the sync issue.

Please check the attached image and let me know your feedback.

--
Thanks!

Bigul

April 15, 2019 at 6:34 am #3610037

cristianD-13

Yes, now that specific product works in both languages. Is there a way to fix them all at once without saving all of them in all languages?

April 15, 2019 at 3:54 pm #3614867

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates. How many of the products having this issue now?

If possible, please try the following steps after a full site backup and let me know your feedback.

1) Please visit WPML>>Languages

2) Choose *Different languages in directories* option for *Language URL format*

3) Save the changes

4) Visit Settings>>Permalinks

5) Resave the settings

--
Thanks!

Bigul

April 15, 2019 at 4:03 pm #3614947

cristianD-13

It is not possible for me to know how many products are broken. There's over 1600 products in the original language and they've been translated in Italian as well, checking them all would take a lot of time

I tried to change the language URL format and save the permalinks. The problem was still there. I also changed it back and saved the permalinks again, that didn't help either

April 16, 2019 at 6:09 am #3618337

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the feedback. I am enabling the private option for the next reply. Please share me few of the Product's having the similar issue. Would like to cross check it further with the help of our team.

--
Thanks!

Bigul

April 16, 2019 at 6:37 am #3618485

cristianD-13

I'm assuming I don't have to add login info again.
Here's some SKUs for products that have the issue: 1695103057, 1695103235, 1695101372, 1695103210, 1695102725, 1695103216, 1695106152, 1695105191

April 16, 2019 at 4:30 pm #3624049

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates. It requires further checking. So 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

April 17, 2019 at 6:31 am #3627495

cristianD-13

Hello,

Yes, no problem. Duplicator is installed and there is already a package from last month that I made for another support thread, you can use that one or make a new one if you'd prefer that

April 17, 2019 at 4:42 pm #3633063

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for your permission. I made a Duplicator copy of your site now. Will debug it further and get back to you soon. Please wait.

--
Thanks!

Bigul

April 18, 2019 at 6:57 pm #3641541

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

For your kind updates, the issue is not happening in minimal setup(when other plugins are inactive). Please check the attached images. Will do more testing on it and get back to you. Please wait.

Please note, I had the following error several times while testing issue and it slows down debugging.


PHP Fatal error: Out of memory (allocated 136314880) (tried to allocate 4096 bytes) in C:\xampp7\htdocs\thefinder\wp-includes\wp-db.php on line 1972

--
Thanks!

Bigul

April 19, 2019 at 9:05 am #3644313

cristianD-13

Hello,
Following your message I went through my plugins again. I did it before submitting a ticket too but I must've missed something. The culprit was "WooCommerce Show/Hide Products or Categories by User Roles". It wasn't the plugin's fault though. There is one category that is set to be hidden from everyone using that plugin, and that category was wrongfully added to a lot of translations because it was also set as WooCommerce's default category. The original category is small (19 products) so to fix it I removed the category from the website, re-added it and updated those 19 products. This way I managed to remove the category from all the translations at once, and now everything works fine.

What could the memory error be though? These are my settings:

The topic ‘[Closed] Some product permalinks are broken in secondary languages’ is closed to new replies.