Skip to content

fix: respect excludeContentTypes during entry sync in shared-stack se…#277

Open
ccarrascal wants to merge 1 commit into
contentstack:masterfrom
PHM-EMEA-Commercial-Digital-JMC:AHAY-6627-fix-excluded-content-types
Open

fix: respect excludeContentTypes during entry sync in shared-stack se…#277
ccarrascal wants to merge 1 commit into
contentstack:masterfrom
PHM-EMEA-Commercial-Digital-JMC:AHAY-6627-fix-excluded-content-types

Conversation

@ccarrascal

Copy link
Copy Markdown

When two plugin instances share the same type_prefix and plugin cache
(e.g. a main stack plus a shared/publisher stack), the instance without
an exclusion list overwrites the cached content-type list, causing the
excluded content types to be synced anyway. This produced duplicate
entries from the shared stack.

Re-apply excludeContentTypes filtering at the points where the cached
content-type list is consumed, so exclusions hold regardless of cache
ordering between instances:

  • contenttype-data.js: filter referred content types in
    FetchUnspecifiedContentTypes so references don't re-introduce
    excluded types.
  • entry-data.js: filter the cached content types in
    FetchSpecifiedContentTypesEntries and
    FetchSpecifiedLocalesAndContentTypesEntries before entry sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant