You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, this.allowedContentTypeIds is whatever is allowed at media root, as the call to the api method passes "null" not the id of the type of the parent folder. This happens in link-picker-modal.element.ts
// Get all the media types, excluding the folders, so that files are selectable media items. const mediaTypeStructureRepository = new UmbMediaTypeStructureRepository(this); const { data: mediaTypes } = await mediaTypeStructureRepository.requestAllowedChildrenOf(null); this._allowedMediaTypeUniques = (mediaTypes?.items.map((x) => x.unique).filter((x) => x && !isUmbracoFolder(x)) as Array<string>) ?? []; }
So, you can only pick types allowed at root.
Specifics
No response
Steps to reproduce
In a fresh install, add an RTE to a doctype.
Remove "File" type from Allow at root
Create a media folder, and create a child file underneath this
Create a doctype in Content of type created in step 1.
In the RTE, go to insert a link, choose media
Navigate to the file in the folder. It's disabled and cannot be picked
Expected result / actual result
This should update the allowed items based on those that are allowed by the folders that are selected as you navigate down the tree
The text was updated successfully, but these errors were encountered:
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'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
We'll replicate the issue to ensure that the problem is as described.
We'll decide whether the behavior is an issue or if the behavior is intended.
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.
Hi @InfiniteSpirals , could you give me more details on line "Remove "File" type from Allow at root"?
I was not able to reproduce it on v15.2.0-rc like this
Hi @InfiniteSpirals , could you give me more details on line "Remove "File" type from Allow at root"? I was not able to reproduce it on v15.2.0-rc like this
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
15.1, 15.2rc
Bug summary
Picking Media Items via RTE Insert Links, only allows items which are allowed at Media Root.
It seems the problem stems from the fact that in the the Lit component 'media-picker-modal-component.ts' call this_selectableFilter
#renderCard(item: UmbMediaTreeItemModel | UmbMediaSearchItemModel) { const canNavigate = this.#allowNavigateToMedia(item); const selectable = this._selectableFilter(item);
Which in turn calls this private function within input-media.element.ts'
#pickableFilter = (item: UmbMediaItemModel): boolean => { if (this.allowedContentTypeIds && this.allowedContentTypeIds.length > 0) { return this.allowedContentTypeIds.includes(item.mediaType.unique); } return true; };
In this case, this.allowedContentTypeIds is whatever is allowed at media root, as the call to the api method passes "null" not the id of the type of the parent folder. This happens in link-picker-modal.element.ts
// Get all the media types, excluding the folders, so that files are selectable media items. const mediaTypeStructureRepository = new UmbMediaTypeStructureRepository(this); const { data: mediaTypes } = await mediaTypeStructureRepository.requestAllowedChildrenOf(null); this._allowedMediaTypeUniques = (mediaTypes?.items.map((x) => x.unique).filter((x) => x && !isUmbracoFolder(x)) as Array<string>) ?? []; }
So, you can only pick types allowed at root.
Specifics
No response
Steps to reproduce
In a fresh install, add an RTE to a doctype.
Remove "File" type from Allow at root
Create a media folder, and create a child file underneath this
Create a doctype in Content of type created in step 1.
In the RTE, go to insert a link, choose media
Navigate to the file in the folder. It's disabled and cannot be picked
Expected result / actual result
This should update the allowed items based on those that are allowed by the folders that are selected as you navigate down the tree
The text was updated successfully, but these errors were encountered: