nathanwoulfe / NestingContently

A property editor for disabling Nested Content items and Block elements in Umbraco
9 stars 8 forks source link

Hotfix:property inconsistency #17

Closed simoneldevig closed 4 years ago

simoneldevig commented 4 years ago

Hotfix: Property inconsistency

I'm experiencing issues with the v2.1.0 in Umbraco 8.4.0 where the setting seems to be a bit inconsistent. I then found out that the was because the umbracoNaviHide was not always being set.

The first issue occurres when reading the property since the value is stored as a number, but in a standard implementation of umbracoNaviHide it's actually stored as a string. See example:

Screenshot_3

Besides that the umbracoNaviHide prop was set when I click the button the first time, but after that I'm not actually not able to reset it since the code only sets the disabled property on the model and not the umbracoNaviHide.

The code in this PR solves my issues, but let me hear what you think 😉

Here's how the model looks when trying to reset the state.

Before the fix image

After the fix image

Thx for the package! It's a appreciated 👍

nathanwoulfe commented 4 years ago

Hi @simoneldevig, that's a good pickup, thank you. Will double check it, but all makes good sense.

simoneldevig commented 4 years ago

Thx @nathanwoulfe - just added some extra screenshots for reference :-)

nathanwoulfe commented 4 years ago

All good, build just finished so will be on Nuget soon, and I'll update the umbraco package repo with the zip.

simoneldevig commented 4 years ago

Perfect!