Skip to content

Skybrud.Umbraco.GridData v3.0.0-beta004

Pre-release
Pre-release
Compare
Choose a tag to compare
@abjerner abjerner released this 19 Dec 20:31

Installation

Changelog

  • Updated the GridControlEmbedValue class due to breaking changes in Umbraco 8.2 (see #33)
    In Umbraco 8.2, the way embed values are stored changed, resulting in a breaking change in Umbraco and thereby also in this package. The fix adresses those changes, but also ensures backwards compatibility with older values from Umbraco 8.1 and before.

    Thanks to @ArnoldV for finding the issue and submitting a PR 👍

    Details

    In Umbraco 8.1, the value of an embed grid control would be saved as a string value - eg.:

    {
      "value": "<iframe width=\"360\" height=\"203\" src=\"https://www.youtube.com/embed/VTnDYxwhSaI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
      "editor": {
        "alias": "embed"
      }
    }

    In Umbraco 8.2 and newer, the value is instead saved as a JSON object with more information about the embedded resource:

    {
      "value": {
        "constrain": true,
        "height": 240,
        "width": 360,
        "url": "https://www.youtube.com/watch?v=VTnDYxwhSaI",
        "info": "",
        "preview": "<iframe width=\"360\" height=\"203\" src=\"https://www.youtube.com/embed/VTnDYxwhSaI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"
      },
      "editor": {
        "alias": "embed"
      }
    }
  • Fixed an issue with GridControlHtmlValue and GetSearchableText (see 41d282c)
    Previously, any HTML elements in the value would be replaced by an empty string. In some cases, this could cause two words to be joined as one - eg. hello<br />world would become helloworld. With this release, HTML elements are instead replaced by a space, ensuring hello<br />world is instead converted into hello world.