question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Save ImageBlock error

See original GitHub issue

Piranha CMS is a great project, we are planing to use it for our blog system.

When we save an ImageBlock in page or post, there is an error from Json

{“errors”:{“blocks[1].model.body.media.properties”:[“Cannot deserialize the current JSON array (e.g. [1,2,3]) into type ‘System.Collections.Generic.IDictionary`2[System.String,System.String]’ because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.\r\nPath ‘blocks[1].model.body.media.properties’, line 1, position 1238.”]},“type”:“https://tools.ietf.org/html/rfc7231#section-6.5.1",“title”:"One or more validation errors occurred.”,“status”:400,“traceId”:“|da6c8724-499ab94159c29f4e.”}

i have check it, because the data from manager/api/media/list can not be deserialized into Piranha.Models.Media.

Property1 size,:“xxxx kb” can not convert to size int64 Property2 properties:[] can not convert to dictonary

so please check these error.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tidyuicommented, Apr 9, 2020

Thank you for your detailed descriptions. A property accessor for set had changed from internal to public which cased media object to be deserialized and bound when it wasn’t supposed to.

0reactions
tidyuicommented, Apr 9, 2020

So I checked and the error is not present in the latest released version 8.2. We’ll try to locate the commit that has changed the behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

image Block not working properly
We run a large number of WordPress websites and we are starting to notice that the image block is not showing up on...
Read more >
Validation on a BlockType - no errormessage in UI when ...
But when a user add an Image and click "Spara" no error message is shown i the UI, the "Spara" button gets inactive...
Read more >
Image Block Error: Something went wrong on resizing the ...
I am trying to: Apply a custom size with crop and scale to an image block. When I attempt to save the custom...
Read more >
Piranha CMS - Custom block won't save
The error is identical to Save ImageBlock error #1117, which appears to have been fixed in 8.2. I'm on 8.4.2.
Read more >
Images not loading and email won't save
The viewer shows nothing at all, not even an image block to show that something is there. I have tried logging out and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found