New Edit Content: two relationship fields share the same value
Problem Statement
When a content type has two relationship fields and the new Edit Content is enabled, both fields incorrectly share the same value. Filling the first relationship field automatically populates the second one with the same value. This only occurs in the new Edit Content; the legacy (old) edit content works correctly.
Impact: Users cannot store different related content in each relationship field when using the new editor. This affects any content type with multiple relationship fields and blocks adoption of the new Edit Content for those use cases.
Steps to Reproduce
Video screencast:
https://github.com/user-attachments/assets/4c0e4550-0583-4c93-af09-b898266d3fee
Steps to Reproduce
- Go to Content Types in the admin.
- Create a new content type or edit an existing one.
- Add two relationship fields to the content type.
- Enable the new Edit Content for the content type.
- Create a new content item using the new editor.
- Fill the first relationship field with a value.
- Observe that the second relationship field automatically takes the same value.
Acceptance Criteria
- [ ] Each relationship field in the new Edit Content maintains its own value independently.
- [ ] Filling one relationship field does not change the value of other relationship fields.
- [ ] Behavior matches the legacy Edit Content (one value per field).
- [ ] Existing content with multiple relationship fields displays and edits correctly in the new editor.
dotCMS Version
Latest
Severity
Medium - Some functionality impacted
Links
NA
Another scenario to test: When 2 relationships have different types of related Content, it doesn't display any value. Steps: 1- Full Starter dotcms. 2- Check any Blog Content using the old mode, you can see an author and comments related. 3- Enable the new edit mode for Blog Content Type. 4- Check again, it shows empty values regardless the REST API returns data.
PRs linked to this issue
Another scenario to test: When 2 relationships have different types of related Content, it doesn't display any value. Steps: 1- Full Starter dotcms. 2- Check any Blog Content using the old mode, you can see an author and comments related. 3- Enable the new edit mode for Blog Content Type. 4- Check again, it shows empty values regardless the REST API returns data.
We will handle this on https://github.com/dotCMS/core/issues/35022