In a clean install, when I try to manually recreate the templates, which reference Grids in many document types, I cannot find Grid Editor in the "Select Editor" list. Where should I be looking?
And, in an import of content using Usync into a clean install of Umbraco 11, where the templates have been copied in, I hit the following error:
The Grid Editor has been marked as obsolete in v11. There is a setting you can enable in the appsettings.json file to re-enable obsolete property editors to allow the grid to be seen
Changing that setting does indeed allow the Grid Editor to be seen and edited in the backoffice.
But it does not remove the error:
IHtmlHelper<dynamic>' does not contain a definition for 'GetGridHtml' and no accessible extension method 'GetGridHtml' accepting a first argument of type 'IHtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?)
How would we resolve this error and continue the upgrade?
Alternatively how do we migrate our hundreds of pages using the Grid Editor to the Block Editor? 😣
I'm afraid I have no idea what is causing your issue. I just created a new clean 11.0.0 project, enabled the grid editor and created a basic template with some content in the grid and everything works as expected.
The issue was that my custom views folder did not have "_ViewImports.cshtml" file, copying the one that is in by default in "/Views" folder fixed the issue.
'IHtmlHelper<dynamic>' does not contain a definition for 'GetGridHtml'
Upgrading to v11
I have to upgrade a raft of websites from Umbraco 8 to v11. I am having problems with the Grid Editor and templates. I am using the documentation at: https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/grid-layout/render-grid-in-template
In a clean install, when I try to manually recreate the templates, which reference Grids in many document types, I cannot find Grid Editor in the "Select Editor" list. Where should I be looking?
And, in an import of content using Usync into a clean install of Umbraco 11, where the templates have been copied in, I hit the following error:
"'IHtmlHelper
On this line:
@Html.GetGridHtml(Model, "bodyText", "bootstrap3-fluid")
But it seems that @Html.GetGridHtml somehow does not exist in this installation.
Have I installed Umbraco incorrectly?
The Grid Editor has been marked as obsolete in v11. There is a setting you can enable in the appsettings.json file to re-enable obsolete property editors to allow the grid to be seen
https://docs.umbraco.com/umbraco-cms/reference/configuration/contentsettings#show-deprecated-property-editors
Thanks Huw.
Changing that setting does indeed allow the Grid Editor to be seen and edited in the backoffice.
But it does not remove the error:
How would we resolve this error and continue the upgrade?
Alternatively how do we migrate our hundreds of pages using the Grid Editor to the Block Editor? 😣
Are you certain you have all the right usings etc?
I don't see that if I add
@Html.GetGridHtml(Model, "bodyText", "bootstrap3-fluid")
to a view templateThanks Huw!
I'm not sure whether I am using the usings I should be using. 🙂
The documentation I'm following is at https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/grid-layout/render-grid-in-template but it doesn't say on that page which usings to use.
Hi Gordon,
WHich version of Umbraco are you using and I will take a quick look.
11.0.0
Hi Gordon,
I'm afraid I have no idea what is causing your issue. I just created a new clean 11.0.0 project, enabled the grid editor and created a basic template with some content in the grid and everything works as expected.
This is the page template
Ah well.
I have tried using exactly your code, but still get the error.
I have gone back to Umbraco 10 as I don't have time for this kind of thing.
Thank you for your help Huw, very kind.
Hi, I just had the same issue but with
The issue was that my custom views folder did not have "_ViewImports.cshtml" file, copying the one that is in by default in "/Views" folder fixed the issue.
is working on a reply...