[React SDK]: `<DotCMSLayoutBody />` Incorrectly Loads TinyMCE at Runtime (SSR Crash)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
When using <DotCMSLayoutBody /> in a server-side context (e.g., during SSR in a Next.js app), the build/runtime fails due to TinyMCE being loaded into the bundle, even though TinyMCE should only run on the client.
This is not just a misleading error; it's a real bug:
TinyMCE (a browser-only dependency) is being included and evaluated during SSR, which causes the crash.
Steps to Reproduce
- Open the Next.js SDK example
- Use
<DotCMSLayoutBody />in a server-rendered page. - Observe a runtime crash related to TinyMCE.
Expected Behavior
- TinyMCE should never be included or evaluated in the server-side runtime.
- Any client-only code depending on TinyMCE should be lazily loaded or wrapped in dynamic imports with
ssr: false. - If
<DotCMSLayoutBody />is not SSR-safe, the crash should relate to that; not a dependency like TinyMCE leaking into the server context.
Acceptance Criteria
- [ ] TinyMCE is not loaded at runtime unless the component is rendering in the browser.
- [ ] All TinyMCE-related components are tree-shaken or conditionally loaded.
- [ ]
<DotCMSLayoutBody />does not crash during SSR due to TinyMCE inclusion. - [ ] Confirm the SDK works in Next.js server + client environments as expected.
Affected Version
Proposed Objective
User Experience
Proposed Priority
Priority 3 – Average
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Next.js SDK example and the entry point, then trace where TinyMCE enters the server bundle. Done means TinyMCE is not loaded or evaluated during SSR, the component no longer crashes in the stated server-rendered scenario, and the SDK works in Next.js server and client environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100