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

Broken content hierarchy in published repository after publishing renamed items #6855

Open jmendeza opened 1 month ago

jmendeza commented 1 month ago

Duplicates

Latest version

Describe the issue

Consider a content tree like the following (everything is published and not edited):

/page1/index.xml
   page1/page1-1/index.xml
   page1/page1-2/index.xml
/page2/index.xml

page1-1 is moved to page2:

/page1/index.xml
   page1/page1-2/index.xml
/page2/index.xml
   page2/page1-1/index.xml

Then page1 is renamed to page1-alt:

/page1-alt/index.xml
   page1-alt/page1-2/index.xml
/page2/index.xml
   page2/page1-1/index.xml

Then page1-alt is published. Causing page1/page1-2 in published repository to be removed and added to page1-alt/page1-2

However, page1/page1-1/index.xml still exists in published repository, but without its parent page1/index.xml

Steps to reproduce

Steps:

  1. Create a site based on editorial

  2. Publish all

  3. Copy Health and Style pages and paste them into Technology

  4. Publish both copied pages Screenshot from 2024-05-22 17-05-43

  5. Cut Technology > Health and paste it into Entertainment

  6. Edit Technology: edit page url and set technology-alt. Update Internal Name to "Technology Alt" Screenshot from 2024-05-22 17-08-24

  7. Publish Technology Alt and its child page

  8. Go to published repository for the site and navigate to site/website/technology

  9. Notice that health page exists, without its parent page (which now exists on a different location).

    
    ├── technology
    │   └── health
    │       └── index.xml
    └── technology-alt
    ├── index.xml
    └── style
        └── index.xml


### Relevant log output

_No response_

### Screenshots and/or videos

_No response_