Try our conversational search powered by Generative AI!

Delete property from local block causes issue with All Properties button

Found in

EPiServer.CMS.UI 9.3.0

Fixed in

EPiServer.CMS.UI 9.3.6

(Or a related package)

Created

Nov 12, 2015

Updated

Jun 27, 2018

Area

CMS UI

State

Closed, Fixed and tested


Description

When deleting a property by code from a local block which is nested inside a pagetype, you cannot open the All properties view. When you try, the following JS error is thrown: "TypeError: Cannot read property 'replace' of null".

Steps to reproduce
1. Create a new Episerver project from Visual Studio 2013.
2. Upgrade the project to the latest version, EPiServer.CMS.UI 9.3.0.
3. From Visual studio, create a new block type with a single field. For example, one with the title Name.
4. Add this new block to a page type from Visual Studio.
5. Go to the page editor in Episerver backend on that page and click the All properties button. This should work properly.
6. Remove the Name field and rebuild the solution in Visual Studio.
7. Go back to the page editor and do the same. It is impossible to see the properties because of a JS error:
"TypeError: Cannot read property 'replace' of null". The script tries to register a widget for the Name field, which is deleted.