When you did the upgrade did you then clear the browser cache too? If so could you also try bumping the version number in the /config/ClientDependency.config file and afterwards recycle the app pool.
I have this issue as well with Umbraco 7.4.1 and LeBlender v. 1.0.8
The site has been upgraded from 7.2.4 to 7.4.1
The json i umbraco.config is the same for the two sites, in 7.2.4 and with LeBlender v. 1.0.7 it does display the preview for the editor, but in Umbraco 7.4.1 with LeBlender v. 1.0.8 it display the error "Object reference not set to an instance of an object."
If I in the grid editor use the following I get the values:
but when I then add "link", I get the the aforementioned error.
@Model.Items.First().GetValue("link")
If I go to content section where the error happens and open the dialog, click update and save & publish, then I don't get the error message.
It has then updated the value i /App_Data/umbrao.config ... there are just a lot of content nodes to update manually.
The red part of the code is added:
So it seems that LeBlender before maybe only added "link" if one was selected in the Link Picker (https://our.umbraco.org/projects/backoffice-extensions/link-picker/) and now add it with a null value - and that .GetValue("link") fails.
It also seems that the new version of LeBlender save less data for "editor".
Left side is after updating the grid editor content and re-publish the page.
I've just made a test in a new Umbraco 7.4.1 and LeBlender 1.0.8 installation trying to follow the steps you provided but I don't seem to be able to reproduce the bug.
I even have a similar code in the umbraco.config file:
@Cristhian if you check the json model for "umb-set-dirty-on-change" attribute in the DOM of the property? doesn't it contains a "link" property (because it comes from the json in db)?
If you request a random property that doesn't exists, e.g. "test", doesn't it fail too?
@Model.Items.First().GetValue("test")
It seems that from 1.0.7 -> 1.0.8 there has been major changes in the saved model and/or.GetValue() method, so it can't fetch the data because the property doesn't exists in the model (or isn't updated to the new json model)
I have tested this line in the "old" site on Umbraco 7.2.4 and LeBlender 1.0.7 where this doesn't fail even there isn't any "test" property. But with in Umbraco 7.4.1 and LeBlender 1.0.8 it breaks because a property "test" doesn't exists. The same happens when "link" property doesn't exists.
The ImageBox is for a slideshow preview, where "link" is a plain textstring.
I think the issue it that it has a property "link" inside "editor" but no "link" value inside "value" array.
So because of the changes in LeBlender where "editor" now only store "alias" instead of entire config of properties, it works when I click on update button (where the model is updated) - but there is a lot of pages to do this if we need to do this manually.
If have tried to update umbraco.config and restarted application, but doesn't seem to have any effect.
The json model for "umb-set-dirty-on-change" attribute in the DOM still contains this even I add a value for "link" after "alt":
I created a new solution again to try to reproduce this behaviour, but I'm not able to do that.
What I did was install Umbraco 7.4.1 witht he Fanoe Starter Kit and LeBlender 1.0.8.4 throught Nuget.
After that I created a new Grid Data type called SlideShow with the following properties:
Image - Media Picker
Width - Numeric
Height - Numeric
After that, I add a new slideshow with all the properties, then I instaled link picker and added a new property to my grid editor called Link.
Everything continued working as expected. I did some more tests but it never failed.
This is the view of my slideshow grid editor
@inherits UmbracoViewPage
@if (Model.Items.Any())
{
var imageId = Model.Items.First().GetValue("image");
var width = Model.Items.First().GetValue("width");
var height = Model.Items.First().GetValue("height");
var link = Model.Items.First().GetValue("link");
var link2 = Model.Items.First().GetValue("link2");
var image = Umbraco.TypedMedia(imageId);
<img src="@image.Url" />
<p>**@Model.Items.First().GetValue("test")**</p>
}
Could you try to reproduce this in a clean installation?
Are there any differences between latest NuGet package and the Umbraco package? LeBlender v. 1.0.8 is just installed via backoffice package installer.
It doesn't seem to be related Link Picker as the link for Slideshow grid editor is just a textstring. It seems only to happens because the value for the property it missing. I am not sure it will work using the API to update the nodes as the callback function needs to update the model before "save and publish".
And in LeBlender v. 1.0.8 it seems the model has changed a bit and always add the "link", just with null or empty value if no link has been chosen or specified.
If you use the setup with LeBlender v. 1.0.7 and then install LeBlender v. 1.0.8, do you get any errors them?
I think when upgrading to v. 1.0.8 it just doesn't update the previously model.
But you didn't get any errors when requesting a property "test" which doesn't exists?
Hey Bjarne, I think we've found the problem.
I just remove the LeBlender package from Nuget and I reinstalled it through the backoffice and now my grid editor fails, so I'd say the problem is that the package in the Umbraco repository is not updated.
Could you try to install LeBlender through Nuget and see if that solves the problem?
Nonetheless, We're going to update the package in Umbraco repository.
Okay, will check it out tomorrow by using the NuGet package.. Or can you create an updated Umbraco package for LeBlender?
Is it safe to install the NuGet package or do I need to uninstall the current version of LeBlender? (not sure if I will loose some of the data or configuration then?)
I just installed lastest version (1.0.8.4) of LeBlender NuGet package. I have increases in clientDependency version number, cleared browser cache and restarted application, but it didn't seem to have any effect.
I still get the "Object reference not set to an instance of an object." error messages.
In "2 kolonner" there are two "Overskrift (H-tag)" grid editors. The first one, where you can see the text has the model been updated and is of type "h1". The second one is of type "h3", but the model has not been updated since upgrade of Umbraco 7.2.4 -> 7.4.1 and LeBlender 1.0.7 -> 1.0.8
By update model I mean, click to open the dialog, click on update button and finally save & publish (but just after clicking update button the model is updated in DOM).
The difference between the json model in the two in "umb-set-dirty-on-change" (using same grid editor "Overskrift (H-tag)"):
1.(updated model):
[{"headline":{"value":"Skiferie Maria Alm | Maria Alm udgår","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","editorAlias":"headline","editorName":"Overskrift"},"type":{"value":"111","dataTypeGuid":"71aba036-e5d7-4540-b018-8f238b026a84","editorAlias":"type","editorName":"Type"},"placement":{"value":"","dataTypeGuid":"ca8e6f06-b351-475d-86c9-2338ad6f82da","editorAlias":"placement","editorName":"Placering"},"link":{"value":null,"dataTypeGuid":"0c273124-1c64-41ea-a709-7ef41c2517fd","editorAlias":"link","editorName":"Link"}}]
2.(old model - not updated):
[{"headline":{"value":"Nyhed i skibranchen – ændring i vores udbud af skirejsemål","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","editorAlias":"headline","editorName":"Overskrift"},"type":{"value":"113","dataTypeGuid":"71aba036-e5d7-4540-b018-8f238b026a84","editorAlias":"type","editorName":"Type"},"placement":{"value":"","dataTypeGuid":"ca8e6f06-b351-475d-86c9-2338ad6f82da","editorAlias":"placement","editorName":"Placering"}}]
Is it possible to extend LeBlender with a method to check if a property exists? or maybe an overload of GetValue with a fallback value in case the property doesn't exists?
Render in backend not working after upgrading to 7.4
After upgrading to Umbraco 7.4.0, all editors that has the setting "Render in the grid" checked, displays this message
When clicking on them, the fields created on them works fine, has all the data in them and also look fine in the frontend.
It is only the backend rendering.
Anyone else seeing this, or have a solution for it?
Umbraco v. 7.4.0 LeBlender Editor v. 1.0.8
Hi Michael
When you did the upgrade did you then clear the browser cache too? If so could you also try bumping the version number in the /config/ClientDependency.config file and afterwards recycle the app pool.
Does that help any?
/Jan
Cleared cache, cleared cookies, bumped the version number in /config/ClientDependency.config file and recycling app pool, sadly did not help. :-(
Just tested this on a different solution. The issue is reproducable.
The tracelog does not contain any errors or information.
You're likely running into this issue: http://issues.umbraco.org/issue/U4-7950
A quick dll update is available on that issue to fix the problem until 7.4.1 comes out.
Hi Sebastiaan
Can confirm your dll fixed the issue...
+1. Thanks for the quick update Sebastiian!
7.4.1 is out now with this fixed and a few other bug fixes: https://our.umbraco.org/contribute/releases/741/
I have this issue as well with Umbraco 7.4.1 and LeBlender v. 1.0.8
The site has been upgraded from 7.2.4 to 7.4.1 The json i umbraco.config is the same for the two sites, in 7.2.4 and with LeBlender v. 1.0.7 it does display the preview for the editor, but in Umbraco 7.4.1 with LeBlender v. 1.0.8 it display the error "Object reference not set to an instance of an object."
If I in the grid editor use the following I get the values:
but when I then add "link", I get the the aforementioned error.
If I go to content section where the error happens and open the dialog, click update and save & publish, then I don't get the error message. It has then updated the value i /App_Data/umbrao.config ... there are just a lot of content nodes to update manually.
The red part of the code is added:
So it seems that LeBlender before maybe only added "link" if one was selected in the Link Picker (https://our.umbraco.org/projects/backoffice-extensions/link-picker/) and now add it with a null value - and that .GetValue("link") fails.
It also seems that the new version of LeBlender save less data for "editor". Left side is after updating the grid editor content and re-publish the page.
/Bjarne
Hey Bjarne,
I've just made a test in a new Umbraco 7.4.1 and LeBlender 1.0.8 installation trying to follow the steps you provided but I don't seem to be able to reproduce the bug.
I even have a similar code in the umbraco.config file:
And my razor view is just:
Nonetheless, if the null thing is really your issue, you can try to check if the link property is not null before render it.
Hi Cristhian
The issue seems to be because "link" property doesn't exists in umbraco.config - first when I update the editor in content section.
I guess that in Umbraco 7.2.4 / LeBlender 1.0.7 the link property first was added, when a link was selected.
If you remove this part, doesn't it break when using .GetValue("link")
/Bjarne
I've just tried to remove what you say but it doen't fail either :/.
@Cristhian if you check the json model for "umb-set-dirty-on-change" attribute in the DOM of the property? doesn't it contains a "link" property (because it comes from the json in db)?
If you request a random property that doesn't exists, e.g. "test", doesn't it fail too?
It seems that from 1.0.7 -> 1.0.8 there has been major changes in the saved model and/or.GetValue() method, so it can't fetch the data because the property doesn't exists in the model (or isn't updated to the new json model)
I have tested this line in the "old" site on Umbraco 7.2.4 and LeBlender 1.0.7 where this doesn't fail even there isn't any "test" property. But with in Umbraco 7.4.1 and LeBlender 1.0.8 it breaks because a property "test" doesn't exists. The same happens when "link" property doesn't exists.
/Bjarne
I have inspected the code further..
and I can see it breaks here, when refreshing the backoffice page with issues.
ImageBox is called inside:
/Bjarne
It seems to be an issue where we use Link Picker (https://our.umbraco.org/projects/backoffice-extensions/link-picker/) on a Image or on a headline.
/Bjarne
The ImageBox is for a slideshow preview, where "link" is a plain textstring.
I think the issue it that it has a property "link" inside "editor" but no "link" value inside "value" array.
So because of the changes in LeBlender where "editor" now only store "alias" instead of entire config of properties, it works when I click on update button (where the model is updated) - but there is a lot of pages to do this if we need to do this manually.
If have tried to update umbraco.config and restarted application, but doesn't seem to have any effect.
The json model for "umb-set-dirty-on-change" attribute in the DOM still contains this even I add a value for "link" after "alt":
when I open the dialog "click" on update button, the model is updated and it works just fine:
Hi Bjarne
I created a new solution again to try to reproduce this behaviour, but I'm not able to do that.
What I did was install Umbraco 7.4.1 witht he Fanoe Starter Kit and LeBlender 1.0.8.4 throught Nuget. After that I created a new Grid Data type called SlideShow with the following properties:
Image - Media Picker Width - Numeric Height - Numeric
After that, I add a new slideshow with all the properties, then I instaled link picker and added a new property to my grid editor called Link.
Everything continued working as expected. I did some more tests but it never failed.
This is the view of my slideshow grid editor
@inherits UmbracoViewPage
Could you try to reproduce this in a clean installation?
Also, as you said that if you save & publish the problem is solved but you have a lot of nodes to do that manually, you could do that programmatically using the Content Service API to save and publish everything, more info: https://our.umbraco.org/documentation/Reference/Management/Services/ContentService
Hi Cristhian
Are there any differences between latest NuGet package and the Umbraco package? LeBlender v. 1.0.8 is just installed via backoffice package installer.
It doesn't seem to be related Link Picker as the link for Slideshow grid editor is just a textstring. It seems only to happens because the value for the property it missing. I am not sure it will work using the API to update the nodes as the callback function needs to update the model before "save and publish".
And in LeBlender v. 1.0.8 it seems the model has changed a bit and always add the "link", just with null or empty value if no link has been chosen or specified.
If you use the setup with LeBlender v. 1.0.7 and then install LeBlender v. 1.0.8, do you get any errors them?
I think when upgrading to v. 1.0.8 it just doesn't update the previously model.
But you didn't get any errors when requesting a property "test" which doesn't exists?
/Bjarne
Hey Bjarne, I think we've found the problem. I just remove the LeBlender package from Nuget and I reinstalled it through the backoffice and now my grid editor fails, so I'd say the problem is that the package in the Umbraco repository is not updated.
Could you try to install LeBlender through Nuget and see if that solves the problem?
Nonetheless, We're going to update the package in Umbraco repository.
Cheers!
Okay, will check it out tomorrow by using the NuGet package.. Or can you create an updated Umbraco package for LeBlender?
Is it safe to install the NuGet package or do I need to uninstall the current version of LeBlender? (not sure if I will loose some of the data or configuration then?)
/Bjarne
Hi Cristhian
I just installed lastest version (1.0.8.4) of LeBlender NuGet package. I have increases in clientDependency version number, cleared browser cache and restarted application, but it didn't seem to have any effect.
I still get the "Object reference not set to an instance of an object." error messages.
In "2 kolonner" there are two "Overskrift (H-tag)" grid editors. The first one, where you can see the text has the model been updated and is of type "h1". The second one is of type "h3", but the model has not been updated since upgrade of Umbraco 7.2.4 -> 7.4.1 and LeBlender 1.0.7 -> 1.0.8
By update model I mean, click to open the dialog, click on update button and finally save & publish (but just after clicking update button the model is updated in DOM).
The difference between the json model in the two in "umb-set-dirty-on-change" (using same grid editor "Overskrift (H-tag)"):
1.(updated model):
2.(old model - not updated):
Is it possible to extend LeBlender with a method to check if a property exists? or maybe an overload of GetValue with a fallback value in case the property doesn't exists?
/Bjarne
Hi Bjarne,
I've just updated the package in the Umbraco repository, so now it should work correctly.
I'm pretty sure your problem is with some kind of cache because there is already something that checks if the property exists as you can see here: https://github.com/Lecoati/LeBlender/commit/e41f9459f4da63642f9cddfd7174fcceeb8ecfd4
Also, after I upgrade the package in my test solution, the problem was solved.
Cheers!
Hi Cristhian
Thanks for the updated version of the package. I have just tested it on our test site with the Umbraco 7.4.1 upgrade and it seems to work now! :D
I really appreciate your time and effort to fix this issue :)
Thanks, Bjarne
is working on a reply...