Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I could be wrong about the way LeBlender works, but I think I'm experiencing a bug. I'm running Umbraco 7.4.1 and LeBlender 1.0.8.
I've created two grid editors using the LeBlender Editor, and for both I've ticked 'Render in the grid'. As such I'm expecting that when I'm in the Backoffice instead of seeing just the name of the grid editor (in my case 'Service' and 'Brand') that I would see the same HTML as is output from the frontend, which is working fine. Is that not right? To be clear it doesn't working even when I just put a static
So I still have this and since adding a 404 page, and seeing that in the grid, it appears that the AJAX call /umbraco/backoffice/leblender/Helper/GetPartialViewResultAsHtmlForEditor is returning
Cannot bind source type Newtonsoft.Json.Linq.JObject to model type Umbraco.Core.Models.PublishedContent.PublishedContentModel.
This is presumable because I'm using the Models Builder and the model factory is returning something different to that expected. Any ideas how I solve this without ripping out LeBlender?
I believe this is the issue:
So I fixed this by adding
Layout = "";
The cause is that the API call to load the content in the back office, then calls Base.cshtml directly as if it were a View not a Partial View. Because I have a _ViewStart.cshtml setting a default Layout this Layout was getting called. However my Layout was expecting a model of a specific type, but a JObject as the API controller supplies.
Layout = "";
This didn't work for me. It turns out I also had to completely remove/rename the _viewstart.cshtml file from my project.
It happens because the layout you have defined in the ViewStart file will affect everything being rendered through mvc, unless it specifically defines that it should be rendered without a layout.
If you just put another _ViewStart.cshtml in your Views\Partials\Grid\Editors folder and set the Layout = null; in that file - it will override the ViewStart you have defined in the Views folder - but only in this specific subfolder (which is what we want).
Layout = null;
This allows you to still use the ViewStart for all your normal views, while still being able to use the LeBlender renderer.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted