craftercms / craftercms

Parent project for Crafter CMS. Issue tracking across all repositories and global builds.
GNU General Public License v3.0
288 stars 98 forks source link

Studio does not sync move operations from git repository #6854

Open jmendeza opened 1 month ago

jmendeza commented 1 month ago

Duplicates

Latest version

Describe the issue

Sync-from-repo task does not recognize renames. It reports DELETE+ADD instead. This breaks traceability and affects publishing hard dependency calculations (e.g.: an edited previously published child of a renamed parent becomes a hard dependency)

Studio should interpret the diff correctly as a move and update the database so the final state of the site is the same as if the moved had been performed via API/UI.

Steps to reproduce

Steps:

  1. Create a site based on editorial
  2. Publish all
  3. From a terminal, go to the site sandbox repository
  4. Rename a folder. e.g.: go to /site/website/articles/2020 and rename folder 12 -> 12-test
  5. Commit changes
  6. Wait for Studio to sync
  7. In Studio sidebar, navigate to Pages > Home > articles > 2020
  8. Notice that now there is a 12-test folder. However, the article page inside it displays as new, instead of edited.

Relevant log output

No response

Screenshots and/or videos

No response

jmendeza commented 1 month ago

This needs to consider:

There are scenarios where publishing (particularly dependency calculation) might behave differently. However, enabling rename detection will not affect new publisher design.