Skip Navigation

[Resolved] Yoast Automatic Redirects redirecting post to child post

This support ticket is created 7 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 7 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#550593

Whenever I update a WP-Types custom post that has another WP-Types custom post as a child, Yoast SEO Premium Creates a redirect from the parent post to the child post.

Not sure where to even begin understanding why this is happening, but it is a serious problem.
Yoast SEO is a very popular plugin, so simply de-activating it is not an option.

I found this: hidden link, but I am not sure if this is a solution or a patch. If this code could somehow be included under an option within the types plugin, so that we can opt to disable automatic redirection for child posts or custom posts, that would be awesome.
I am running multiple sites on one theme, and not all of them are using WP-Types so adding that filter is not an option for me.

Please advise

#550644

Dear Adrian,

I assume we are talking about a compatibility problem between Types plugin and the "Yoast SEO Premium" plugin, there isn't such a built-in feature within Types plugin:
If this code could somehow be included under an option within the types plugin, so that we can opt to disable automatic redirection for child posts or custom posts.

If you agree, we can take it as a feature request, our developers will evaluate it.

Currently, I suggest you use PHP codes to do this:
1) Use WordPress function get_current_blog_id() to get the current sub site ID:
https://codex.wordpress.org/Function_Reference/get_current_blog_id
2) Check the current sub site ID, and Disable Automatic Redirects of "Yoast SEO Premium" plugin

#551894

I'd rather write a plugin that I activate as needed. But this plugin is doing something that does not follow best practices which is confusing the Yoast Plugin. It only seems to be occurring with parent-child relationships between posts (so parent posts that have child posts).

I wanted to let you know, as this may cause issues with other plugins too.

#551967

Thanks for the feedback, we did not receive similar conflict problem with other plugins, and it would be great that if you can share the custom plugin for this issue.

#552681

It is the Yoast SEO Premium Plugin. Version 5.0
Not sure where I could upload the Plugin files but I'd be happy to.

A temporary workaround was to edit the post type and under the Children Post Types section click on "select fields" and from the pop-up window select "Do not show management options for this post type".

However this adds a ton of complexity to the client for adding floor plans to a listing for example, as now they have to go and manage the floor plans individually and it creates a huge mess.

Yoast is a very popular plugin, and I am positive you will run into this issue in the future.
The automatic redirect feature detects when I change the URL of the page and automatically creates a 301 redirect.

I believe the something in the linking of the Child post management box within the Edit screen is confusing Yoast's plugin making it think that the Parent Post is now redirected to the Child Post.

If as a last resort you could find a way to disable yoast's automatic redirect feature just for WP-Types Custom Posts, that would be amazingly helpful.

#552832

You can put your own custom plugin (which is for fix the compatibility problem between "Yoast SEO Premium" Plugin and Types plugin) into github
hidden link
and share the URL here.

Yes, since it isn't a built-in feature of Types plugin, if you agree, we can take it as a feature request, our developers will evaluate it.