Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

EZP-30004: ezplatform:urls:regenerate-aliases changes parent of broken link #2522

Merged
merged 2 commits into from
Jan 16, 2019

Conversation

alongosz
Copy link
Member

@alongosz alongosz commented Jan 10, 2019

Question Answer
JIRA issue EZP-30004
Bug/Improvement yes
New feature no
Target version 6.7, 6.13, 7.3, 7.4, master
BC breaks no
Tests pass yes
Doc needed no

Setting parent of archived entry based on original entry results in moving that archived entry in subtree, which makes no sense and results in unique constraint violation if archived name is the same as already existing one for that parent.

To keep the feature of repairing broken entries, parent of archived element is updated using original entry, only in case when that parent is broken (meaning it doesn't exist). In other cases current parent is reused for update.

TODO:

  • Fix a bug.
  • Implement tests.
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@alongosz alongosz force-pushed the ezp-30004-fix-broken-parent branch from 8b3f34b to 7563ee5 Compare January 13, 2019 18:06
@alongosz alongosz changed the title [WiP] EZP-30004: ezplatform:urls:regenerate-aliases changes parent of broken link EZP-30004: ezplatform:urls:regenerate-aliases changes parent of broken link Jan 14, 2019
@alongosz alongosz requested a review from damianz5 January 14, 2019 12:47
@mnocon mnocon self-assigned this Jan 15, 2019
Copy link
Member

@mnocon mnocon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now! Tested on 1.7, 1.13, 2.3, 2.4 and master.

@lserwatka lserwatka merged commit a6e5867 into ezsystems:6.7 Jan 16, 2019
@lserwatka
Copy link
Member

@alongosz you can merge it up

@alongosz alongosz deleted the ezp-30004-fix-broken-parent branch January 16, 2019 15:02
@alongosz
Copy link
Member Author

Thank you @lserwatka. Merged up to 6.13, 7.3, 7.4 and master.

# for free to join this conversation on GitHub. Already have an account? # to comment
Development

Successfully merging this pull request may close these issues.

5 participants