November Happy Hour will be moved to Thursday December 5th.

Per Nergård
Nov 21, 2012
  2699
(2 votes)

Weirdest bug of the year?

Today I was deploying some new functionality on a customer site which included adding a couple of new properties.

Added the properties and code and tested the new function and all was ok. So now it was only left to move the properties to the correct position with drag and drop and I would be done.

I moved the properties to the desired position and would just do a last check that everything was ok.

I  tried to create a page of the changed type but when I published the page it exploded with a cryptic null reference exception. Browsing to an already existing page of the affected type gave the same error.

I should immediately have come to the conclusion that the drag and drop positioning of the properties had caused this but I didn’t.

Panic! I rolled back the changes with no change, I started considering some weird corruption of the page type in the database and all other strange things.

Then I remembered that we on this particular page type have a property with a default value that is used to control the rendering of the page.

I checked the property and compared to a staging environment and the default value was gone!!

Sure enough adding the value and saving the property  corrected the error.

I then recreated the error in my development environment. Moving a property on a page type and “crossing” another property with a default value will in fact remove that default value!

We sure missed something in our fallback code but I guess that It can be good to be aware of this if you suddenly get some weird error after doing a little property rearranging.

This was for a CMS6 R2 installation.

Nov 21, 2012

Comments

Eric
Eric Nov 21, 2012 08:46 PM

Nice feature :) reported as a bug to episerver?

Nov 21, 2012 09:17 PM

Eric: Yes I have reported it to EPiServer.

Nov 22, 2012 02:12 PM

Similar issues with default values being lost can be caused when using CMS 6 R2 and PageTypeBuilder and having page type properties with the same sort order.

Please login to comment.
Latest blogs
Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Set Default Culture in Optimizely CMS 12

Take control over culture-specific operations like date and time formatting.

Tomas Hensrud Gulla | Nov 15, 2024 | Syndicated blog

I'm running Optimizely CMS on .NET 9!

It works 🎉

Tomas Hensrud Gulla | Nov 12, 2024 | Syndicated blog

Recraft's image generation with AI-Assistant for Optimizely

Recraft V3 model is outperforming all other models in the image generation space and we are happy to share: Recraft's new model is now available fo...

Luc Gosso (MVP) | Nov 8, 2024 | Syndicated blog