﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	focuses
66047	Site Editor Identity screen crashes blank (React insertBefore error) after saving Site Icon with stale cached site data	369work		"== Bug Report
=== Description
Site Editor (Appearance > Identity) goes completely blank after uploading and saving a new Site Icon, when the browser has accumulated site data (Cache storage / IndexedDB / Local storage) from prior use of this site. In my case that prior use was repeated media uploads in the block editor.


=== Environment
- WordPress: 7.1
- Subdirectory: No
- PHP: 8.4.24
- Server: PHP/8.4.24 (Development Server)
- Database: WP_MySQL_On_SQLite (Server: 8.0.38 / Client: 3.53.2)
- Browser: Edge 152.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.5
- MU Plugins:
  * 99-studio-loader.php
- Plugins:
  * Query Monitor 4.0.7
  * Test Reports 1.3.1  


=== Steps to Reproduce
1. Use a browser profile that has previously used this site's Site Editor and accumulated site data (Cache storage / IndexedDB / localStorage). A clean profile does not reproduce it.
2. Go to Site Editor > Styles > (or Appearance > Editor) > Identity.
3. Upload a new Site Icon and confirm the crop (removing an existing Site Icon reproduces the same crash as well).
4. Click Save, then confirm in the review/publish dialog.
x.  The entire admin screen goes blank (only the admin toolbar remains visible). 

Please note: these steps may still not be enough to reproduce this. There is an additional precondition in the browser's stored state that I have not been able to identify.
 
Query Monitor's toolbar item shows ""Data collection ceased"". The browser console shows:

Uncaught NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
  at react-dom.min.js?ver=18.3.1.1 (multiple frames)  

[[Image(console.png)]]
[[Image(white.png)]] 


=== Expected Results
1.  On a normal successful save, the screen does not change/reload at all — a success toast/snackbar notification appears in place, and that's it.

=== Actual Results
1.  The Site Editor screen renders fully blank (no error message shown to the user) after the save confirmation. The site icon IS actually saved successfully server-side (visible elsewhere in wp-admin after reload) — this is a client-side rendering crash, not a save failure.
2.  `wp-content/debug.log` stays empty — no PHP error is logged.

=== Additional Notes
- Confirmed this is not caused by browser extensions: reproduced with no extensions installed, and does NOT reproduce in an InPrivate/incognito window with a clean profile.

- Reproduction stops entirely after clearing this site's data via DevTools > Application > Storage > Clear site data (Cache storage, IndexedDB, Local/session storage, Cookies).

[[Image(console-error.png)]]

- This site has always been WordPress 7.1. No version upgrade was involved, and the Gutenberg plugin had never been activated on it — the accumulated data is from ordinary use of 7.1 itself. Before hitting this, the same browser profile had been used for repeated media uploads in the block editor (HEIC upload testing for https://github.com/WordPress/gutenberg/issues/81043).
- I cleared the storage before inspecting its contents, so I cannot say which piece of stored state actually triggers this.

"	defect (bug)	closed	normal		Editor	trunk	normal	worksforme	needs-testing		
