New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic properties do not support newly added template property until restart #534

Closed
michaellwest opened this Issue Dec 11, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@michaellwest
Member

michaellwest commented Dec 11, 2015

Here is a use case:

Assume the item template has properties Title and Text.
$item = Get-Item -Path "master:\content\home"
$item.Title = "Kitchen"
$item.Text = "Warm and comfy"

Next I add the property Color to the template.
$item = Get-Item -Path "master:\content\home"
This will fail because the item does not contain the property Color.
$item.Color = "Red"

After using Restart-Application the property is found.

@AdamNaj

This comment has been minimized.

Member

AdamNaj commented Dec 12, 2015

Those are cached per template. I can invalidate the templates caches whenever I detect any change in templates branch though.

@AdamNaj AdamNaj added this to the 4.0 milestone Dec 12, 2015

@AdamNaj AdamNaj self-assigned this Dec 12, 2015

@michaellwest

This comment has been minimized.

Member

michaellwest commented Dec 12, 2015

Do it.

AdamNaj added a commit that referenced this issue Dec 13, 2015

@AdamNaj

This comment has been minimized.

Member

AdamNaj commented Dec 13, 2015

Invalidation implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment