Try our conversational search powered by Generative AI!

Per Nergård
Mar 26, 2013
  9410
(4 votes)

Plugin for deleting missing properties

When developing your site and refactoring property names on page- and block types you can end up with some “missing” properties when you view them in admin mode.

Per Bjurstrom has a nice blog post about how typed models are synchronized .

If you change a property name on your page types base class you have to go to each page type in admin mode, select that property and decide if you want to delete it or save it disconnected from code.

Doing repetitive tasks is boring and things tend to get missed Ler

I think that the admin mode lacks an easy way to see all missing  properties and have the possibility to delete them.

So I decided to create a small plugin for the task.

The result looks like this:

 

Missingproperties

 

Just tick the delete checkbox for the properties you want to delete and hit the delete button.

You can download the code over at the code section.

Mar 26, 2013

Comments

Mar 26, 2013 10:11 PM

Nice work. I've been doing a bit of property deletion the past week and this will be a nice way to streamline both the finding and the deleting of them in the future.

Mike Cockrell
Mike Cockrell Apr 20, 2013 02:33 AM

Hey Per,

Noticed a small issue in your code, you are continuing to bind the properties grid view when the page posts back, I am using this awesome admin plugin, but modified the code as follows:

Moved:
this._contentTypeModelRepository = ServiceLocator.Current.GetInstance();
into the Setup() routine

Added:
if (!Page.IsPostBack)
{
Setup();
}

in the OnLoad

Apr 22, 2013 07:46 AM

@Mike: Oops! Thanks for the update I will update the code.

Ayo
Ayo Feb 21, 2018 11:36 AM

This is exactly what I'm looking for but this post is from 2013, I am using episerver 10 will this plugin work with more recent versions of EpiServer? 

Is there not a built in way to do this? This is my first Episerver project, I come from an Umbraco Background, it seems very silly that this is not an option. 

If you have 100s of block types, mulitple enviroments, lots of refactoring to do means its error prone.... any ideas?

Feb 21, 2018 01:31 PM

No built in way to do this. I think it should work pretty out of the box. There might be some changes to which repository is used to get and delete properties. But I know we have it in projects based on Episerver 10.

Peter Bennington
Peter Bennington Oct 4, 2019 03:16 PM

Hi Per. I was just wondering if the code for the original admin menu is still available? The one where you can view the properties that are missing and choose to delete them, rather than automatically deleting them on startup as you do in your other post https://world.episerver.com/blogs/Per-Nergard/Dates/2016/4/missing-properties-initializationmodule/

Scott Reed
Scott Reed Sep 17, 2020 11:48 AM

Hey Per, was looking for this plugin but the link doesn't work. Is it still about?

Per Nergård
Per Nergård Nov 17, 2020 10:55 PM

Scott: I havent got a message about your comment.  https://github.com/PNergard/Nergard.EPi.Plugins.MissingProperties

If thats to old just send me a message in the EMVP forums and I will mail you the code.

Please login to comment.
Latest blogs
Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog