Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you clone a message type, the fields are not cloned.
Classifying as a bug report, since it's contrary to user expectations, and frequently surfaces both in the Commerce Message issue queue, and internally.
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1983138-clone-field-instances-1.patch | 1.45 KB | bojanz |
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedHere we go.
The menu_get_object call is a bit ugly, but there's no other way to get the entity that's being cloned.
I could also go with storing just the original message type name in the form state.
Comment #2
amitaibuThe menu_get_object() is indeed a little ugly, but if in the future we will want the full object, better get it in already.
Committed, thanks.