Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael Nielsen 99 posts 619 karma points
    Feb 12, 2016 @ 13:01
    Michael Nielsen
    0

    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

    Something went wrong with this editor, below is the exception detail:
    
    Object reference not set to an instance of an object.
    

    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

  • Jan Skovgaard 11237 posts 23330 karma points MVP 6x admin c-trib
    Feb 12, 2016 @ 14:55
    Jan Skovgaard
    0

    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

  • Michael Nielsen 99 posts 619 karma points
    Feb 12, 2016 @ 16:30
    Michael Nielsen
    0

    Cleared cache, cleared cookies, bumped the version number in /config/ClientDependency.config file and recycling app pool, sadly did not help. :-(

  • Michael Nielsen 99 posts 619 karma points
    Feb 15, 2016 @ 07:31
    Michael Nielsen
    0

    Just tested this on a different solution. The issue is reproducable.

    The tracelog does not contain any errors or information.

  • Sebastiaan Janssen 4834 posts 14219 karma points MVP admin hq
    Feb 15, 2016 @ 08:05
    Sebastiaan Janssen
    101

    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.

  • Michael Nielsen 99 posts 619 karma points
    Feb 15, 2016 @ 09:20
    Michael Nielsen
    0

    Hi Sebastiaan

    Can confirm your dll fixed the issue...

  • Sean Håkansson 58 posts 174 karma points
    Feb 17, 2016 @ 15:04
    Sean Håkansson
    0

    +1. Thanks for the quick update Sebastiian!

  • Sebastiaan Janssen 4834 posts 14219 karma points MVP admin hq
    Feb 17, 2016 @ 15:44
    Sebastiaan Janssen
    2

    7.4.1 is out now with this fixed and a few other bug fixes: https://our.umbraco.org/contribute/releases/741/

  • Bjarne Fyrstenborg 1135 posts 3217 karma points MVP 3x c-trib
    Mar 04, 2016 @ 10:39
    Bjarne Fyrstenborg
    0

    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:

    @Model.Items.First().GetValue("type")
    @Model.Items.First().GetValue("placement")
    @Model.Items.First().GetValue("headline")
    

    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:

    enter image description here

    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.

    enter image description here

    /Bjarne

  • Cristhian Amaya 52 posts 413 karma points
    Mar 04, 2016 @ 13:36
    Cristhian Amaya
    0

    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:

                  "value": [
                    {
                      "headline": {
                        "value": "Lalallaa",
                        "dataTypeGuid": "0cc0eba1-9960-42c9-bf9b-60e150b429ae",
                        "editorAlias": "headline",
                        "editorName": "Headline"
                      },
                      "link": {
                        "value": null,
                        "dataTypeGuid": "4ba59071-eb1d-434b-92c8-dbaf81442983",
                        "editorAlias": "link",
                        "editorName": "Link"
                      }
                    }
                  ],
                  "editor": {
                    "alias": "linkTest"
                  },
                  "active": true,
                  "guid": "d2541a7c-abf3-a481-4a53-2bb5889dad7c"
                }
              ]
    

    And my razor view is just:

    <h1>@Model.Items.First().GetValue("headline")</h1>
    @Model.Items.First().GetValue("link")
    

    Nonetheless, if the null thing is really your issue, you can try to check if the link property is not null before render it.

  • Bjarne Fyrstenborg 1135 posts 3217 karma points MVP 3x c-trib
    Mar 04, 2016 @ 13:54
    Bjarne Fyrstenborg
    0

    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")

    "link": {
        "value": null,
        "dataTypeGuid": "4ba59071-eb1d-434b-92c8-dbaf81442983",
        "editorAlias": "link",
        "editorName": "Link"
    }
    

    /Bjarne

  • Cristhian Amaya 52 posts 413 karma points
    Mar 04, 2016 @ 14:02
    Cristhian Amaya
    0

    I've just tried to remove what you say but it doen't fail either :/.

  • Bjarne Fyrstenborg 1135 posts 3217 karma points MVP 3x c-trib
    Mar 07, 2016 @ 10:15
    Bjarne Fyrstenborg
    0

    @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.

    /Bjarne

  • Bjarne Fyrstenborg 1135 posts 3217 karma points MVP 3x c-trib
    Mar 07, 2016 @ 07:42
    Bjarne Fyrstenborg
    0

    I have inspected the code further..

    and I can see it breaks here, when refreshing the backoffice page with issues.

    enter image description here

    ImageBox is called inside:

    if (Model.Items.Any()){
    
    }
    

    /Bjarne

  • Bjarne Fyrstenborg 1135 posts 3217 karma points MVP 3x c-trib
    Mar 07, 2016 @ 07:48
    Bjarne Fyrstenborg
    0

    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.

    enter image description here

    enter image description here

    /Bjarne

  • Bjarne Fyrstenborg 1135 posts 3217 karma points MVP 3x c-trib
    Mar 07, 2016 @ 08:44
    Bjarne Fyrstenborg
    0

    The ImageBox is for a slideshow preview, where "link" is a plain textstring.

    enter image description here

    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":

    [  
       {  
          "image":{  
             "value":"44890",
             "dataTypeGuid":"93929b9a-93a2-4e2a-b239-d99334440a59",
             "editorAlias":"image",
             "editorName":"Billede"
          },
          "width":{  
             "value":"1140",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"width",
             "editorName":"Bredde"
          },
          "height":{  
             "value":"400",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"height",
             "editorName":"Højde"
          },
          "alt":{  
             "value":"Maria Alm udgår",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"alt",
             "editorName":"Alt tekst"
          }
       },
       {  
          "image":{  
             "value":"44891",
             "dataTypeGuid":"93929b9a-93a2-4e2a-b239-d99334440a59",
             "editorAlias":"image",
             "editorName":"Billede"
          },
          "width":{  
             "value":"1140",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"width",
             "editorName":"Bredde"
          },
          "height":{  
             "value":"400",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"height",
             "editorName":"Højde"
          },
          "alt":{  
             "value":"Maria Alm Højmark",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"alt",
             "editorName":"Alt tekst"
          }
       },
       {  
          "image":{  
             "value":"44889",
             "dataTypeGuid":"93929b9a-93a2-4e2a-b239-d99334440a59",
             "editorAlias":"image",
             "editorName":"Billede"
          },
          "width":{  
             "value":"1140",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"width",
             "editorName":"Bredde"
          },
          "height":{  
             "value":"400",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"height",
             "editorName":"Højde"
          },
          "alt":{  
             "value":"Skihop - Maria Alm",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"alt",
             "editorName":"Alt tekst"
          }
       }
    ]
    

    when I open the dialog "click" on update button, the model is updated and it works just fine:

    [
       {
          "image":{
             "value":"44890",
             "dataTypeGuid":"93929b9a-93a2-4e2a-b239-d99334440a59",
             "editorAlias":"image",
             "editorName":"Billede"
          },
          "width":{
             "value":"1140",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"width",
             "editorName":"Bredde"
          },
          "height":{
             "value":"400",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"height",
             "editorName":"Højde"
          },
          "alt":{
             "value":"Maria Alm udgår",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"alt",
             "editorName":"Alt tekst"
          },
          "link":{
             "value":null,
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"link",
             "editorName":"Link"
          }
       },
       {
          "image":{
             "value":"44891",
             "dataTypeGuid":"93929b9a-93a2-4e2a-b239-d99334440a59",
             "editorAlias":"image",
             "editorName":"Billede"
          },
          "width":{
             "value":"1140",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"width",
             "editorName":"Bredde"
          },
          "height":{
             "value":"400",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"height",
             "editorName":"Højde"
          },
          "alt":{
             "value":"Maria Alm Højmark",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"alt",
             "editorName":"Alt tekst"
          },
          "link":{
             "value":null,
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"link",
             "editorName":"Link"
          }
       },
       {
          "image":{
             "value":"44889",
             "dataTypeGuid":"93929b9a-93a2-4e2a-b239-d99334440a59",
             "editorAlias":"image",
             "editorName":"Billede"
          },
          "width":{
             "value":"1140",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"width",
             "editorName":"Bredde"
          },
          "height":{
             "value":"400",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"height",
             "editorName":"Højde"
          },
          "alt":{
             "value":"Skihop - Maria Alm",
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"alt",
             "editorName":"Alt tekst"
          },
          "link":{
             "value":null,
             "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
             "editorAlias":"link",
             "editorName":"Link"
          }
       }
    ]
    
  • Cristhian Amaya 52 posts 413 karma points
    Mar 07, 2016 @ 15:41
    Cristhian Amaya
    0

    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

    @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?

    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

  • Bjarne Fyrstenborg 1135 posts 3217 karma points MVP 3x c-trib
    Mar 07, 2016 @ 16:08
    Bjarne Fyrstenborg
    0

    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

  • Cristhian Amaya 52 posts 413 karma points
    Mar 07, 2016 @ 16:33
    Cristhian Amaya
    1

    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!

  • Bjarne Fyrstenborg 1135 posts 3217 karma points MVP 3x c-trib
    Mar 07, 2016 @ 22:17
    Bjarne Fyrstenborg
    0

    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

  • Bjarne Fyrstenborg 1135 posts 3217 karma points MVP 3x c-trib
    Mar 08, 2016 @ 07:47
    Bjarne Fyrstenborg
    0

    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.

    enter image description here

    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?

    /Bjarne

  • Cristhian Amaya 52 posts 413 karma points
    Mar 08, 2016 @ 12:02
    Cristhian Amaya
    1

    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!

  • Bjarne Fyrstenborg 1135 posts 3217 karma points MVP 3x c-trib
    Mar 08, 2016 @ 14:10
    Bjarne Fyrstenborg
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft