Skip to content

Unable to save new content #4698

@nttfiles

Description

@nttfiles

To Reproduce

Unsure if it is consistent, but this is what has been causing it for me:

  1. Create a custom component with a relationship field to a page.
  2. Add an instance of that component to a page (the root home page / in my case).
  3. Select that same page as a value for the field on the custom component.
  4. Publish
  5. Try making and publishing a change to a different component on that page.

Expected behavior

The changes get saved after clicking "Publish".

Describe the bug

When clicking "Publish", the changes get reverted. The /api/v1/@apostrophecms/page/ does not include any modified data.
Mind you, not every widget seemed equally affected by this. Rich text widgets in particular stopped saving entirely. It might also have to do with the position of the affected component (before/after) relative to the component that includes the recursive relationship.

My assumption is that the recursivity is what causes the issue. While I'm writing this, I'm remembering that the project property on the relationship would most likely fix this issue by excluding the page's content. Still I think this is worth looking into.

Details

Version of Node.js: v20.16.0

Server Operating System: Windows 11 using WSL. The MongoDB database runs in a docker container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions