Skip to content

UVE editor fails to load after v26.03.20-01 — dot-uve.js script injection regression #35127

@nicobytes

Description

@nicobytes

Problem Statement

After upgrading to version v26.03.20-01, the Universal Visual Editor (UVE) stops loading on all pages for all users. The edit/add content buttons do not appear, making the authoring environment completely unusable.

Root cause: In v26.03.20-01, the dot-uve.js script injection mechanism was moved from the Angular frontend to the Java backend via two paired commits:

If the backend fails to inject the script — due to cache, proxy/CDN stripping, deploy skew (only one of the two PRs deployed), or an exception in buildUVEStyleEditorScripts() — the SET_CONTENTLET event is never fired and the floating edit/add UI never appears.

Impact: Critical — affects all users, all pages, both authoring and production environments. Customer-reported production outage (Freshdesk #36029).

Browser & OS: All browsers/OS — issue is server-side.

Steps to Reproduce

  1. Upgrade a dotCMS instance from v26.03.17-01 to v26.03.20-01
  2. Log in to the admin UI and navigate to any page in the UVE editor (Edit mode)
  3. Hover over any contentlet on the page
  4. Expected: dot-uve-contentlet-tools (edit/add buttons) appear on hover
  5. Actual: No edit/add controls appear; the page renders but is not editable

Verification:

  • Open browser DevTools → Elements tab → search for dot-uve.js in the iframe document
  • If the <script src="/ext/uve/dot-uve.js"></script> tag is missing from the rendered HTML, the backend injection failed
  • Also check the Network tab for 403 errors on /ext/uve/dot-uve.js (CDN/proxy blocking)

Key files:

  • Backend injection: dotCMS/src/main/java/com/dotmarketing/portlets/htmlpageasset/business/render/page/HTMLPageAssetRenderedBuilder.javainjectUVEScript() method
  • Frontend (script removed): core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts#insertPageContent()
  • API flow: dotCMS/src/main/java/com/dotcms/rest/api/v1/page/PageResource.javagetPageRender()

Acceptance Criteria

Acceptance criteria — To be refined. (Quick draft; details to be added later.)

  • dot-uve.js script tag is present in entity.page.rendered for EDIT_MODE and PREVIEW_MODE
  • dot-uve.js script tag is NOT present in entity.page.rendered for LIVE mode
  • buildUVEStyleEditorScripts() failures fall back gracefully to the plain SDK_EDITOR_SCRIPT_SOURCE tag (defensive Try.of wrapper)
  • Diagnostic logging added to injectUVEScript to trace injection/skip decisions
  • Integration tests cover edge cases: empty containers, null ContentType metadata, exception in schema stream
  • UVE edit/add buttons appear correctly after upgrade from v26.03.17-01 to the fixed version

dotCMS Version

Severity

Critical - System unusable

Links

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions