Open skttl opened 4 years ago
We actually got this working, and didn't encounter this error at all. It just works :-) Perhaps you can provide some more information about your block ( data / settings) configuration (e..g specific data types) so we will able to reproduce.
Ah yes, I can see it works with "simple" blocks.
I have a block list inside my block, and it must be that one that makes the circular error :)
Yes, that must be it! Good to know this is a known limitation. Nested block lists might be a common scenario.
Triple nesting in our case. (Layout areas, sections, content blocks)
Figured I'll share some insights here. We have been using this in a project that we're working on. I've made some major changes to both the C# code and the controller - thank you very much for the inspiration @skttl
I ran into this particular issue when using a block editor inside on of the "blocks".
Turns out that "angular.copy" will strip all "angularjs"-stuff from the object (variables starting with $).
Something like:
var valueCopy = angular.copy(value);
var reqModel = {
....
value: JSON.stringify(valueCopy)
}
I'm more than happy to share our "stuff" if someone wants to look at it, not sure if a PR is the way to go but please let me know.
I'm more than happy to share our "stuff" if someone wants to look at it, not sure if a PR is the way to go but please let me know.
Forking would be better!
Getting
when updating an existing block.
It comes from this line https://github.com/skttl/umbraco-block-type-custom-view-previewer/blob/master/src/Our.Umbraco.BlockTypeGridViewPreview/App_Plugins/Our.Umbraco.BlockTypeGridViewPreview/BlockTypeGridViewPreviewController.js#L38 where I try to send the block data to the backend controller responsible for rendering the preview.
Don't know how to fix - any help appreciated :)