Copied to clipboard

Flag this post as spam?

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


  • Jason 122 posts 637 karma points
    Mar 30, 2018 @ 13:50
    Jason
    0

    After upgrade Grid Layout Editors not Rendering on frontend.

    Having an issue that the Grid layout is not rending in views. This started after a major upgrade from 7.2.8 to 7.10. I did the upgrade in steps. The issue only happens after I re-publish a page that uses the grid, hence I did not notice the issue until I was completely done with the upgrades. They render fine until I republish. I am not using any custom Grid editors, mostly just the default RTE editor. I have stepped through the code and the issue is that in the Bootstrap3.cshtml partial when it gets to the part to call the editor partials the value for control.editor.view is always null causing the call to the partial to always fail. The only value in control.editor is the alias of the editor, nothing else. So, for some reason, the server is not fully populating the model for the Grid, data. I looked in the umbraco.config and saw that node with Grids properties that I did not re-publish they had more data for the editor in the JSON, but the republished ones only had the alias. I looked at a working version of the umbraco.config on another site using the Grid and the RTE only had the alias also, but they work. I think this is a property value converter issue and I have missed something while upgrading but I am out of ideas. Does anyone have any?

  • Frans de Jong 548 posts 1840 karma points MVP 3x c-trib
    Mar 30, 2018 @ 15:01
    Frans de Jong
    0

    Did you leave the EnablePropertyValueConverters set to false in umbracoSettings.config?

  • Jason 122 posts 637 karma points
    Mar 30, 2018 @ 18:15
    Jason
    0

    yes, tried both true and false with not luck.

  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Mar 30, 2018 @ 15:18
    Anders Bjerner
    0

    Hi Jason,

    In Umbraco 7.2, the configuration for each grid editor was included in the JSON, and then used as is in the frontend. This meant any changes to the configuration wouldn't be reflected in existing grid controls.

    From Umbraco 7.3 and up, Umbraco will tries to fix this by injecting the new editor configuration into the JSON you're using in the frontend. My guess is that it is this part that is failing, causing your frontend to break. Do you by any change get any messages in the log regarding this?

    If not, would it be possible for you to post the JSON for the grid of one of the pages that fails? And also the contents of ~/Config/grid.editors.config.js - then I'll try to see if I can spot anything out of order ;)

  • Jason 122 posts 637 karma points
    Mar 30, 2018 @ 18:25
    Jason
    0

    Here is the grid.edotors.config.js:

    [
        {
            "name": "Rich text editor",
            "alias": "rte",
            "view": "rte",
            "icon": "icon-article"
        },
        {
            "name": "Image",
            "alias": "media",
            "view": "media",
            "icon": "icon-picture"
        },
        {
            "name": "Macro",
            "alias": "macro",
            "view": "macro",
            "icon": "icon-settings-alt"
        },
        {
            "name": "Embed",
            "alias": "embed",
            "view": "embed",
            "icon": "icon-movie-alt"
        },
        {
            "name": "Headline",
            "alias": "headline",
            "view": "textstring",
            "icon": "icon-coin",
            "config": {
                "style": "font-size: 36px; line-height: 45px; font-weight: bold",
                "markup": "<h1>#value#</h1>"
            }
        },
        {
            "name": "Quote",
            "alias": "quote",
            "view": "textstring",
            "icon": "icon-quote",
            "config": {
                "style": "border-left: 3px solid #ccc; padding: 10px; color: #ccc; font-family: serif; font-style: italic; font-size: 18px",
                "markup": "<blockquote>#value#</blockquote>"
            }
        }
    ]
    
  • Jason 122 posts 637 karma points
    Mar 30, 2018 @ 18:29
    Jason
    0

    Here is the JSON from the umbraco.config for one of the pages I am having the issue with the RTE not rendering::

    <![CDATA[{
      "name": "Narrow",
      "sections": [
        {
          "grid": 2,
          "allowAll": false,
          "allowed": [
            "None",
            "Full"
          ],
          "rows": [
            {
              "name": "Full",
              "areas": [
                {
                  "grid": 12,
                  "hasConfig": false,
                  "controls": []
                }
              ],
              "hasConfig": false,
              "id": "590efd12-41e5-82c3-fd24-dc868c52b769"
            }
          ]
        },
        {
          "grid": 8,
          "allowAll": false,
          "allowed": [
            "Full",
            "Sidebar",
            "Split",
            "Three"
          ],
          "rows": [
            {
              "name": "Full",
              "areas": [
                {
                  "grid": 12,
                  "hasConfig": false,
                  "controls": [
                    {
                      "value": "<p>Stuff</p>",
                      "editor": {
                        "alias": "rte"
                      },
                      "active": false
                    }
                  ]
                }
              ],
              "hasConfig": false,
              "id": "60d048a5-1345-d65b-1bcc-8624f0be4a0c"
            }
          ]
        }
      ]
    }]]>
    
  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Mar 31, 2018 @ 10:26
    Anders Bjerner
    0

    Hi again,

    I've tried setting the exact same JSON on a page in a fresh installation of Umbraco 7.10.0, and it works fine. Your grid.editors.config.js also looks identical to the one in a fresh installation. So for now, I can't reproduce the error.

    Have you checked the Umbraco log to see whether there are any clues to what goes wrong?

  • Jason 122 posts 637 karma points
    Apr 02, 2018 @ 15:34
    Jason
    0

    Noting in the logs. Data is just not getting bound to the model.

  • Rune Hem Strand 147 posts 911 karma points hq c-trib
    Apr 01, 2018 @ 08:11
    Rune Hem Strand
    0

    Might be worth looking into the grid rendering files (views) . I'm pretty sure they changed recently(ish), so if they weren't updated along with the upgrade that could be the source of the issue.

    Try doing a compare between your files and a fresh 7.10 in the '/Views/Partials/Grid/' folder.

  • Jason 122 posts 637 karma points
    Apr 02, 2018 @ 15:35
    Jason
    0

    I did compare those files. The issue is that the model is missing data.

  • Jason 122 posts 637 karma points
    Apr 02, 2018 @ 22:34
    Jason
    0

    Started over with the upgrade and it broke on upgrading from 7.2.8 to 7.3. Editor model data is not being set.

  • Jason 122 posts 637 karma points
    Apr 03, 2018 @ 16:00
    Jason
    100

    Thank you, everyone, for the help. I have finally found the issue. The site was using the Skybrud.Umbraco.GridData.dll. This was conflicting with the new data structure of the Grid in versions 7.3+. Removed the DLL and all was good again.

  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Apr 03, 2018 @ 16:11
    Anders Bjerner
    0

    Good to see that you found a solution to your problem ;)

    I'm the developer of the package. Do you have some more information about the error besides what you already have posted in this thread? Then I can look into whether there is anything I need to fix in the package.

    What version of Skybrud.Umbraco.GridData were you using? Most likely you've been using v1.0.x, which was released before Umbraco 7.3, and thus didn't support the changes made in Umbraco 7.3. Updating to v1.5.x or a newer version of my package should then fix the problems.

  • Rune Hem Strand 147 posts 911 karma points hq c-trib
    Apr 03, 2018 @ 16:21
    Rune Hem Strand
    0

    Great to hear you managed to fix it! That was a tricky one to spot ;)

    And h5yr to Anders for following up on it 🙌🏻

Please Sign in or register to post replies

Write your reply to:

Draft