wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

Check if post is not its own parent

Open skallet opened this issue 3 years ago • 2 comments

Context

If any post is it's own parent (could be wrongly set in database) running indexing action will loop itself indefinitely.

Summary

changelog: bugfix

This PR can be summarized in the following changelog entry:

  • Bugfix

skallet avatar Sep 01 '22 14:09 skallet

Thanks for your contribution @skallet. Can you share the step-by-step guide to reproduce your PR so that we can deep dive in?

mmikhan avatar Sep 15 '22 11:09 mmikhan

Most likely fixes the https://yoast.atlassian.net/browse/IM-1867

mmikhan avatar Sep 15 '22 11:09 mmikhan

To replicate the issue, set any post in the database post_parent to post ID and run:

wp yoast index --allow-root --reindex

Without this PR, the command will not finish.

skallet avatar Oct 03 '22 13:10 skallet

This is still an issue.

skallet avatar Mar 20 '23 13:03 skallet

This is still an issue.

Hey @skallet, I'm currently working on this issue but I cannot reproduce the endless indexing behavior: could you share some more information about your setup (WP version, plugins activated, PHP version)? Thanks!

pls78 avatar Mar 28 '23 09:03 pls78