Skip to content

[Bug] SPFx WebPart fails to load on Classic Page after May 2025 update #10233

@riadhlakdhar

Description

@riadhlakdhar

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version
  • SPFx version 1.20.0
  • Node.js version v18.20.5

Describe the bug / error

Since early May 2025, adding a new SPFx WebPart to a classic publishing page in the Pages library of a SharePoint Online site results in a runtime error. Existing classic pages with SPFx WebParts still work, and even the same SPFx WebPart continues to function if it was already present before the issue appeared. However, adding the same WebPart as a new instance on the same page now fails systematically.

Steps to reproduce

Navigate to a classic publishing page (/Pages/yourpage.aspx) in SharePoint Online

Click Edit Page

Try to add a SPFx WebPart (custom or native)

You get the following error on the page:

"Désolé... Nous avons rencontré un problème
Si le problème persiste, contactez l’administrateur du site et communiquez-lui les informations figurant dans la section Détails techniques.
Détails techniques
ERREUR :
Nous ne pouvons pas charger de composant WebPart sur cette page. Utilisez le bouton Précédent du navigateur pour retenter l’action. Si le problème persiste, contactez l’administrateur du site et communiquez-lui les informations figurant dans la section Détails techniques.

PILE DES APPELS :
Error: Nous ne pouvons pas charger de composant WebPart sur cette page. Utilisez le bouton Précédent du navigateur pour retenter l’action. Si le problème persiste, contactez l’administrateur du site et communiquez-lui les informations figurant dans la section Détails techniques.
at d.logClientSideWebPartLoadError (https://res-1.public.onecdn.static.microsoft/files/sp-client/sp-classic-page-assembly_fr-fr_8c1eccd2337952e3111cc7d528705372.js:169:116643)
at https://accor.sharepoint.com/sites/accorlive-rec/talent-culture/Pages/demo.aspx?SPLanguage=en-US:1588:39"

Expected behavior

SPFx WebParts should load and render correctly on classic publishing pages when scripting is enabled.

Actual Behavior

UI displays this error:

"Nous ne pouvons pas charger de composant WebPart sur cette page."

JS console output:
https://res-1.public.onecdn.static.microsoft/files/sp-client/sp-classic-page-assembly_fr-fr_8c1eccd2337952e3111cc7d528705372.js
js
TypeError: Cannot read properties of null (reading 'innerHTML')
at e.convertHtmlToWebPartData (sp-classic-page-assembly_fr-fr_8c1eccd2337952e3111cc7d528705372.js:168:94749)
at d._normalizeWebPartData (sp-classic-page-assembly_fr-fr_8c1eccd2337952e3111cc7d528705372.js:169:117351)
at d.loadWebPart (sp-classic-page-assembly_fr-fr_8c1eccd2337952e3111cc7d528705372.js:169:115167)
at demo.aspx?SPLanguage=en-US:1647:37
js

e.convertHtmlToWebPartData = function(t, n) {
                        var a, i = e._parsingDocument.createElement("div");
                        i.innerHTML = t.trim();
                        var r = i.children[0];
                        if (r && r.hasAttribute(e._webPartAttribute)) {
                            var o = r.getAttribute(e._webPartDataAttribute);
                            if (o && (a = JSON.parse(o)),
                            a) {
                                var s = r.querySelector("[".concat(e._htmlPropertiesAttribute, "]"));
                                **a.serverProcessedContent = e.convertServerProcessedHtmlToData(s.innerHTML, n)**
                            }
                        }
                        return a || void 0
                    }

Tenant: SharePoint Online

Page type: Classic publishing pages in the Pages library

SPFx version: Issue observed across multiple versions (1.20.0)

Custom scripts: Allowed (CustomScriptEnabled = true)

Browsers tested: Chrome, Edge

Additional Context

Bug appeared suddenly around May 3–5, 2025

Suspected cause: recent change in Microsoft’s SharePoint Online frontend, particularly sp-classic-page-assembly_*.js

Likely DOM structure or timing issue (container missing when s.innerHTML is accessed)

Impact
Critical for tenants still using classic publishing pages: cannot insert or test new SPFx WebParts in these pages. Migration to modern pages is not always feasible due to dependencies on legacy publishing features.

Metadata

Metadata

Assignees

Labels

type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions