distributor icon indicating copy to clipboard operation
distributor copied to clipboard

Trashing source post changes slug on distributed external posts to use `__trashed` suffix.

Open peterwilsoncc opened this issue 3 years ago • 2 comments

Describe the bug

When trashing the source post, posts distributed to external sites are updated to use the __trashed suffix.

Steps to Reproduce

  1. Create two single site WP installs with Distributor installed on each.
  2. Cross-link the sites (ie, so they each have the other listed as an external connection)
  3. Publish a post on site one
  4. Push distribute and publish the post to site two
  5. Visit the distributed post on site two, it will have the same slug as on site one.
  6. Trash the post on site one.
  7. Visit the distributed post on site two, observe the slug has changed to include the __trashed suffix.

Screenshots, screen recording, code snippet

__trashed

Environment information

OS: Ubuntu 22.04 LTS (VM) PHP 7.4.30

WordPress information

WordPress 6.0.3

Site one (source of post): MS primary site Site two (distributed post): Single site install

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

peterwilsoncc avatar Oct 18 '22 03:10 peterwilsoncc

Hi @peterwilsoncc what is the expected outcome here, should the post be trashed on the other site too or keep it published but without the suffix?

thrijith avatar Oct 24 '24 10:10 thrijith

@thrijith I think the intent is to:

  • unlink distributed posts once the original is trashed
  • retain distributed copies in their current state (published, draft, etc)
  • retain the original, unsuffixed, slug on the distributed copies

When an original post is untrashed, the original should be re-linked to the distributed copies.

peterwilsoncc avatar Dec 02 '24 22:12 peterwilsoncc