Open chrden opened 10 months ago
Hi there @chrden!
Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.
We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.
Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:
Hi @chrden,
Thank you for reaching out 😄 apologies for the belated response, and thanks for putting in the effort to make this issue report so detailed 💪
I can confirm that the alias
is indeed empty when using entityResource
.
The following code:
...produces this log message:
This applies to any entity type, it is not limited to document types. The screenshots above is from V10, so this has been around for a long time.
Unfortunately there is no easy fix to mend this. The document type Alias
is simply not available when mapping entities to their response models. This has to do with how the EntityRepository
is built.
Still, I'm going to put this up for grabs, if anyone out there would like to have a go at mending it. A fix should ensure that the alias
property is fetched by the EntityRepository
and mapped by the EntityMapDefinition
, and should include both document, media and member types.
Hi @chrden,
We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.
For more information about issues and states, have a look at this blog post.
Thanks muchly, from your friendly Umbraco GitHub bot :-)
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
12.2.0
Bug summary
The angular
entityResource
does not return a value for the 'alias' property when "DocumentType" is passed to thetype
parameterSpecifics
When injecting the
entityResource
into an angular controller, and then calling thegetAll(type, postFilter)
method, the resulting array of Document Types always returns an empty string for thealias
property.It's not made clear from the below documentation what the result object should look like but both the
contentTypeResource
andelementTypeResource
return thealias
property correctly populated https://apidocs.umbraco.com/v12/ui/#/api/umbraco.resources.entityResourceI found this when upgrading to Umbraco v12.2.0 as we were previously using
contentTypeResource
but a change was made to restrict element types from being returned and we need to be able to retrieve a complete list of all Document Types, regardless of whether or not they are an element type: https://github.com/umbraco/Umbraco-CMS/commit/b2831dcd5efaf84c09bd2bfc7a2b4ce26a24b200Steps to reproduce
entityResource
into an angular controllergetAll("DocumentType")
alias
property is always emptyExpected result / actual result
alias
property is correctly populated when callingentityResource.getAll("DocumentType")