Closed torleif closed 1 month ago
It looks like you've just directly copied the original text from https://github.com/silverstripe/silverstripe-elemental/issues/1197 which doesn't have anything specific to this module at all. Please update the issue description so it's actually talking about the problem you've encountered, which according to https://github.com/silverstripe/silverstripe-elemental/issues/1197#issuecomment-2146532219 is somehow unique to this module.
I assume since you're talking about elemental blocks this specifically impacts https://github.com/dnadesign/silverstripe-elemental-userforms? Should the issue be in that module instead?
I’ve updated the description.
The issue does not just affect elementalarea, it affects all references to any other data objects. Though elemental area would be the main target to fix given it’s a supported silverstipe module.
We updated the cascade duplicates in yml, which seems to address the issue. Though there likely was a reason why it was set to false in the php code
Ahh, okay thanks for that extra context.
It looks like cascade_duplicates
was set to false in this PR which was fixing https://github.com/silverstripe/silverstripe-userforms/issues/727 - so any fix will need to ensure there's no regression of that issue.
Linked PR has been merged, this will be released with CMS 5.3
Module version(s) affected
5.13.1
Description
When you clone a userform page (duplicate) it results in the userform page having references to the elemental items you copied, and any other references to other DataObjects
How to reproduce
Steps to reproduce:
DNADesign\Elemental\Extensions\ElementalPageExtension
extension to the userform page typeDeleting the elemental item and recreating does not help, because it's the ElementalArea reference that got copied.
You have to delete the entire page and start again. Very frustrating.
Possible Solution
setting $cascade_duplicates correctly, or disabling it from being duplicated
Additional Context
This job was originally logged against https://github.com/silverstripe/silverstripe-elemental/issues/1197, but given any
Validations
silverstripe/installer
(with any code examples you've provided)Acceptance Criteria
cascade_duplicates
defined on parent classes of the userform page are keptPRs