-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entity resource getByIds doesn't work as expected #11448
Comments
I also suggested this a year ago so we can fetch content and media by id, udi and guid (not slim entities). |
It seems to fail somewhere here: https://github.com/umbraco/Umbraco-CMS/blob/v9/contrib/src/Umbraco.Web.BackOffice/Controllers/EntityController.cs#L512
|
Looks like there might be an issue with the |
@AndyButland I can't find something specific recently has changed in For the specific request I am looking at now from MNTP it has the content nodes selected, but since the request fails it doesn't show nodes in the repeat using It use the first |
Btw. the first examples with |
I cloned latest changed from I could use the following the fetch media:
but when I use udi instead it throws an exception:
|
This doesn't actually work in the backoffice because of GH #11448 So lets fix that next.
ParameterSwapControllerActionSelectorAttribute - cached body survived between requests.
* Added EntityController.GetUrlsByIds support for int & guid + update MNTP Fixes issue with MNTP (for 8.18) in a partial view macro - GH #11631 Renamed GetUrlsByUdis to match, don't do this in v9 as it would be breaking there, instead mark it obsolete. TODO: v9 ensure integration test coverage, more painful here as no WebApplicationFactory. * Added partial test coverage for GetUrlsByIds. This doesn't actually work in the backoffice because of GH #11448 So lets fix that next. * Failing test demonstrating #11448 * Fix for #11448 getByIds doesn't work as expected. ParameterSwapControllerActionSelectorAttribute - cached body survived between requests. * Expand on sync vs async comment for future confused souls. * Might aswell cache parsed json vs string for performance * Make ParameterSwapControllerActionSelector remarks more accurate. * Share deserialized request body between action constraint and model binder * Be more defensive with RequestBodyAsJObject HttpContext item Only store if deserialize success. Don't assume key being present means can cast as JObject. * Nest constant a little deeper. * Final defensive tweak
Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8
9.0.1
Bug summary
In v8 we could pass in an array to
entityResource.getByIds()
to fetch documents, medias etc.According to docs this should be an array:
https://github.com/umbraco/Umbraco-CMS/blob/v9/contrib/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js#L224-L265
I tried with
int
ids, udis and Guid, but all seems to fail.Specifics
No response
Steps to reproduce
Request some media items / nodes from id, udi or guid via a dashboard or similar.
Expected result / actual result
No response
This item has been added to our backlog AB#15137
The text was updated successfully, but these errors were encountered: