Nov 12, 2015
Jun 27, 2018
CMS UI
Closed, Fixed and tested
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.