Skip Navigation

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.

Our next available supporter will start replying to tickets in about 5.79 hours from now. Thank you for your understanding.

This topic contains 12 replies, has 3 voices.

Last updated by arndH 2 years, 5 months ago.

Assigned support staff: Bruno.

Author Posts
February 23, 2019 at 11:22 am


I am trying to: set up the Yoast SEO redirects

Link to a page where the issue can be seen:

I expected to see:
Hi there, I have plenty of redirects that do not work when redirecting to a WPML page. The error message I am getting is:
You're redirecting to a target that returns a 301 HTTP code (permanently moved). Make sure the target you specify is directly reachable.
I have set the memory limit as suggest in one of the threads and also deactivated and reactivated WPML with no success.
Any idea what to do please?

Instead, I got:

February 25, 2019 at 6:16 pm #3241566


Hello there,

Thank you for contacting us. Please, my sincere apologies for the delay in answering.

Please, could you tell me the step by step that I have to follow to see the problem you are reporting? Also, what pages are you seeing with redirect issue?

Can you please elaborate a little more so I can better understand? Sometimes screenshots illustrating what you mean may go a long way to clarify what words fail to transmit so if you like make use of "upload an image" below the comment area.

Thank you.

February 26, 2019 at 5:52 pm #3246600


Hi Bruno,

Thank you for your response. I have attached a screenshot with the issue.

I added a redirect previously, but still get a crawl error and the redirect does not work. There is of course no redirect for the target url. If I want to amend the redirect, I am getting the message shown on the screenshot. This does happen only for the translated languages.

Normally, when I confirm the redirect by pressing save, it does the redirect though.

Kind regards,


Bildschirmfoto 2019-02-26 um 18.42.16.png
February 26, 2019 at 5:58 pm #3246619


I just would like to add the following

/en/linda-macneil-2/ is redirected to /en/product/linda-macneil/

I am getting the same error message as on the previous screenshot but, even though I reserved the redirect, it does not work

February 26, 2019 at 7:13 pm #3246944


Hi Arnd,

I was able to replicate the problem you're talking about. To ensure that this plugin is made compatible with WPML we need to contact the plugin author and work with him on resolving the issue.

I have forwarded the details to our Themes & Plugins Compatibility Team and they will contact the author. Our Compatibility Team will work with the author of the plugin for this to work properly.

Please note that this process may take a while as it depends on how soon the author will reply to our efforts to contact him.

Thank you.

February 27, 2019 at 10:13 pm #3252630


Thanks Bruno and I look forward to hearing from you again.

February 27, 2019 at 11:10 pm #3252702



Sure. Sorry for the delay. As soon as I have a response from our compatibility team I will keep you informed.

Thank you.

March 1, 2019 at 1:52 pm #3261225



Our compatibility team suggested this workaround to fix the problem:

Add this code to wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/class-wpml-home-url-filter-context.php after line 50:

    private function seo_target() {
        return $this->debug_backtrace->is_class_function_in_call_stack( 'WPSEO_Redirect_Accessible_Validation', 'parse_target' );

and at line 36 change this:

			|| $this->pagination_link();


			|| $this->pagination_link() || $this->seo_target();

This compatibility issue has already been forwarded to our developers. I do not have a deadline, however, when this is going to be released.

Thank you.

March 3, 2019 at 8:25 am #3265778



Thank you for the response. I added the code, but unfortunately, it is still not working.

I realised that it is now the trailing slash causing the problem.

If I have a redirect in the main language for e.g. "Sammlerliteratur" it is redirecting both
and /sammlerliteratur

In an translated language, the redirects work without the trailing slash but not with it (like the urls are on Google.

In the previous example

/en/linda-macneil-2 reedirects correctly
/en/linda-macneil-2/ is causing a 404 error

Same is with

/en/Collectibles/ is causing a 404n error
/en/Collectible is redirecting to /en/product-category/collectibles-en/

Could you help with this please?

Many thanks,


March 4, 2019 at 9:11 pm #3270661


My issue is resolved now. Thank you!

March 13, 2019 at 3:31 pm #3335759


Can you please let us know what you did to fix the issue???

March 13, 2019 at 9:59 pm #3338511


The recommended steps as a workaround:

If the problem persists, please open a new topic and one of our supporters will check this.

Thank you.

March 26, 2019 at 9:05 pm #3466435


Hi Suska,

Just to update the solution that worked. Combined the above solution with


if ( $redirection['origin'] === $url || '/' . $redirection['origin'] === $url ){

if ( $redirection['origin'] === $url || '/' . $redirection['origin'] === $url || $redirection['origin'] . '/' === $url || '/' . $redirection['origin'] . '/' === $url ){
within the file and on line 15:


what was suggested in another thread.

After that, everything worked very well.