Open jakxnz opened 5 years ago
A workaround is to disable the UserForm module's UpgradePolymorphicExtension
"Upgrade on build" behaviour, by assigning the following config:
SilverStripe\UserForms\Model\UserDefinedForm:
upgrade_on_build: false
Yep, that task was designed specifically for userforms when used with pages, during a SS3->SS4 upgrade. Disabling here is the right approach. Would you like to make a PR to the readme or documentation for this module to mention that?
Thanks for the fix, @jakxnz . I also just ran into this.
thanks @jakxnz, I also ran into this same issue
When a set of existing
EditableFormField
s are related to anElementForm
, runningdev/build
will "correct" the polymorphic relation toSilverStripe\UserForms\Model\UserDefinedForm
and break the relationship.Versions
Steps to recreate
ElementForm
via the CMSdev/build
Expected result
Relationship between fields and
ElementForm
is preservedActual result
Relationship between fields and
ElementForm
is decoupled - fields are no longer visible in the CMS under the correspondingElementForm
.dev/build
's records output says:EditableFormField
polymorphic relation class (fieldParentClass
) value is switched fromDNADesign\ElementalUserForms\Model\ElementForm
toSilverStripe\UserForms\Model\UserDefinedForm