Open knupska opened 4 years ago
As there has been no activity on this issue for several weeks, I will attempt to clarify.
When the MultipleEntryReferenceEditor
is used as an extension, any changes made to the referenced entries are not kept in sync regardless of how those changes are made:
sdk.space
methods like updateEntry
or publishEntry
This is not caused by our extension, code or edits. It can be seen directly in the multiple-references-extension example provided by Contentful.
Under the most basic usage where an entry is edited in the same tab, the changes sync once the edit pane is closed because the EntityStore
has a fallback to listen to the slide in navigation. This isn't useful when the changes could be originating from any number of places as outlined above.
This issue is a roadblock for the following extension created to address client complaints that the default Contentful UI isn't streamlined enough.
Hi @knupska, thanks a lot for the detailed report, I appreciate the time you spent on investigation. And sorry for the delayed answer.
You're right, sdk.space.onEntityChanged
is only accessible within the web app and can not be accessed from the public widget SDK. As you correctly said, exposing this method would allow reference cards to be updated whenever an entry is changed elsewhere.
I will ask the team managing https://github.com/contentful/ui-extensions-sdk if we can expose it.
There's nothing stopping us from adding it to the public SDK, but first we want to wait for https://github.com/contentful/ui-extensions-sdk/pull/345 to be finished. I added a ticket to our backlog and will keep you updated.
Thanks for chasing it up @djagya.
Apologies for reporting it here too, I hadn't noticed those methods were actually being exposed by the ui-extensions-sdk package.
Marking issue as stale since there was no activity for 30 days
It's been some time (almost 3 years), can anyone at Contentful advise if this was ever added to the public widget SDK, or if it has otherwise changed in a way where it is now possible to achieve via an extension?
Marking issue as stale since there was no activity for 30 days
We encounter this behaviour in the latest app framework as well. Using the renderCustomCard-prop will lead to not updated List if you add or edited an entry.
Marking issue as stale since there was no activity for 30 days
Background I'm attempting to create an enhanced multi-reference editor, styled and operating as per the default Contentful (Forma 36) functionality, but from which I can have entry fields be directly editable on the sortable card.
This is to cut down on the multiple steps it currently takes a content author to open a referenced entry, check a field value, change the field value, publish and then return.
By leveraging the
renderCustomCard
property on theMultipleEntryReferenceEditor
to return a reimplementedWrappedEntryCard
and having that import a customEntryCard
based on the source, I have almost gotten this to work.Unfortunately, changes that I make to the referenced entries using
sdk.space.updateEntry
are not syncing back into the MultipleEntryReferenceEditor.Issue It appears that field extensions are not provided access to
sdk.space.onEntityChanged
, so theEntityStore
used by theReferenceEditor
does not observe changes made to the referenced entries.The default
Entry links list
appearance provided by Contentful does not experience this.I have not been able to find a viable workaround to having the referenced entries update after either my own or external changes.
Replication The lack of syncing changes from referenced entries into the multi-reference extension can be seen in the
extensions/multiple-references-extension
example provided in this repository.The
status
and values shown on the card in the first window will quickly become out of sync.