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 thread is resolved. Here is a description of the problem and solution.

Problem: Yoast plugin redirects are not working in other languages and return an error saying: "Error while saving redirect. You're redirecting to a target that returns a 301 HTTP code (permanently moved). Make sure the target you specify is directly reachable".

Solution: I kindly ask you to apply the workaround described in this ticket and let me know if the issue is solved: https://wpml.org/forums/topic/redirecting-target-not-directly-reachable/#post-3261225

Relevant Documentation:

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by Carlos Rojas 5 months, 2 weeks ago.

Assigned support staff: Carlos Rojas.

Author Posts
May 8, 2019 at 3:11 pm #3768299

Richard Canny

I have seen previous tickets on this and we experience the same problem. Yoast plugin redirects are not working in other languages and return an error saying:
"Error while saving redirect. You're redirecting to a target that returns a 301 HTTP code (permanently moved). Make sure the target you specify is directly reachable".

Apparently you have been informed of this issue some time back by Yoast, and you have provided work-around style code changes for some users who have reported the same problem.

We need a permanent solution to this problem ASAP that does not involve code changes as these redirects are essential to site performance and SEO.

Thanks for your assistance.

May 8, 2019 at 3:13 pm #3768331

Richard Canny

Example URL for redirection that was shown in the snip attached to the ticket:

From: hidden link
To: hidden link

May 8, 2019 at 7:15 pm #3770403

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hello,
Thank you for contacting WPML support.

1.- I kindly ask you to apply the workaround described in this ticket and let me know if the issue is solved: https://wpml.org/forums/topic/redirecting-target-not-directly-reachable/#post-3261225

2.- Please increase the PHP Memory Limit. Minimum requirements are 128Mb: https://wpml.org/home/minimum-requirements/
You can add this to wp-config.php to increase WP memory:

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

- Add it above the line /* That's all, stop editing! Happy blogging. */

Kind regards,
Carlos

May 8, 2019 at 9:32 pm #3771265

Richard Canny

Thank you Carlos, I did those two changes. The redirect is now working and the PHP info on the WPML support page now shows 128M Memory limit.

I have one more error message, but this may be unrelated:
"We detected that the product_type field was set incorrectly for some product translations. This happened because the product_type taxonomy was translated. You can fix this in the WooCommerce Multilingual troubleshooting page."

May 9, 2019 at 1:02 pm #3776275

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi there,

I'm glad to hear that the issue is solved 🙂

Regarding the 'product_type' issue, pelase follow this steps:
- Create a full backup of the site.
- Go to WPML -> Settings -> Custom fields translation -> Search 'product_type' -> Set it as non translatable -> Save the changes.
- Go to Woocommerce -> Woocommerce Multilingual -> Settings tab -> Troubelshooting link (bottom right) -> Sync all products (also there must be an option to fix the product_type at the end of the section).

If the issue persists then I kindly ask you to open a new ticket describing the issue and assign it direcly to me.

Please don't hesitate to contact us if you need our help in the future with WPML. We will be more than happy to help.
Best regards,
Carlos

May 10, 2019 at 9:00 pm #3787777

Richard Canny

Thanks for the great help. Work-around solution is not the greatest, but it works.

My issue is resolved now. Thank you!

May 11, 2019 at 1:33 am #3788397

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi there,

I'm glad to hear that the issue is solved 🙂

Please don't hesitate to contact us if you need our help in the future with WPML. We will be more than happy to help.
Best regards,
Carlos