Skip to content

fix(ga4, sap, mux): use sdk.cma instead of manual createClient [AIS-59]#11037

Open
Jared Jolton (jjolton-contentful) wants to merge 2 commits into
masterfrom
fix/createClient-use-sdk-cma
Open

fix(ga4, sap, mux): use sdk.cma instead of manual createClient [AIS-59]#11037
Jared Jolton (jjolton-contentful) wants to merge 2 commits into
masterfrom
fix/createClient-use-sdk-cma

Conversation

@jjolton-contentful

Copy link
Copy Markdown
Contributor

Summary

  • app-sdk >=4.58.0 introduces a nested contentful-management@12 dependency that conflicts with apps' own v11 direct dep when bundled, causing createClient is not a function at runtime (same root cause as marketplace-partner-apps#8449 for vwo-fme)
  • google-analytics-4: fetchAllContentTypes rewritten to use sdk.cma.contentType.getMany instead of getSpace().getEnvironment().getContentTypes()
  • sap-commerce-cloud: config useEffect rewritten to use sdk.cma.contentType.getMany and sdk.cma.editorInterface.getMany
  • mux: class component stores sdk.cma directly instead of constructing a plain client from sdk.cmaAdapter

Test plan

  • google-analytics-4: install the app and verify the content type assignment section loads and saves correctly
  • sap-commerce-cloud: install the app and verify the config screen loads content types and editor interfaces without error
  • mux: verify video upload and existing video rendering works without console errors
  • No createClient is not a function errors in any of the three apps

Generated with Claude Code

app-sdk >=4.58.0 introduces a nested contentful-management@12 dep that
conflicts with apps' own v11 direct dep when bundled by react-scripts,
causing "createClient is not a function" at runtime.

Replace createClient({ apiAdapter: sdk.cmaAdapter }, ...) with sdk.cma
(the pre-configured plain CMA client the SDK already provides):
- google-analytics-4: fetchAllContentTypes uses sdk.cma.contentType.getMany
- sap-commerce-cloud: config useEffect uses sdk.cma.contentType/editorInterface.getMany
- mux: class component stores sdk.cma directly instead of constructing a client

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jjolton-contentful Jared Jolton (jjolton-contentful) changed the title fix(ga4, sap, mux): use sdk.cma instead of manual createClient fix(ga4, sap, mux): use sdk.cma instead of manual createClient [AIS-59] Jun 26, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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