push_type
push_type copied to clipboard
Matrix field that has a :relation type that is multiple does not save properly
Matrix fields with relation sub fields that allow multiple values do not seem to be working properly.
Create a Relation, for e.g.
class Note < PushType::Node
has_child_nodes :false
field :content, :wysiwyg
end
class Klass < PushType::Node
has_child_nodes :false
field :notes, :matrix do
field :note_ids, :relation, multiple: true
end
end
STR:
- Go to CMS.
- Create multiple different Note objects and give them whatever content you like
- Create a new Klass object
- Add a Note object to the first row in the matrix
- Click "+Add row" to add a new row to the matrix
- Add another Note object to the newly added row (the second row)
- Publish the Node
Expected behavior: Note objects remain in their prescribed rows in the matrix
Actual behavior: The second note object from the second row moves up to the first row, and the second row in the matrix becomes blank