Skip to content
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

Lookup content root nodes when using MNTP in media and members section #10049

Closed

Conversation

bjarnef
Copy link
Contributor

@bjarnef bjarnef commented Mar 23, 2021

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes #9917

Description

When using MNTP in media and member section it was throwing console errors, because entityResource.getByQuery() didn't return an enity as $routeParams.id is the current node and when $site and $root in XPath entityResource.getByQuery() query for a start node, but it couldn't find one in media and member because no Document had those ids - only when accessing MNTP in content section.

Currently I am not sure how much we can do about that since it is possible to have muliple root/site nodes in content and editors/users may have different start nodes.

It seems GetChildren in EntityController handle this if start nodes have been configurated:
https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Web/Editors/EntityController.cs#L483-L490

I tested when user has access to a different start node (site node), where it seems to be same behaviour:

image

But with "Ignore User Start Nodes" enabled on the datatype, which also seems to be same behaviour:

image

However if "Content Root" has been selected as start node or no start node is configurated and the entity controller only returns a single root node, it is rendered a bit nicer with the XPath expression.

p1bw5Yv8wi

@umbrabot
Copy link

Hi there @bjarnef!

Thanks for the contribution here and apologies if it has been a while since you heard from us. We have been in the very fortunate position of having lots of work to do. With this in mind, we are writing to let you know that with the release of the Long Term Support (LTS) version, 8.18, we have now moved into the support phase of Umbraco 8. You can read all about that here but to surmise, we will be keeping Umbraco 8 safe and well by releasing patching for security or regression issues if they arise but no longer will we do that for bug fixes. The same is still true for features, although we stopped merging those some time ago.

We'd love for you to keep contributing and while we are not able to merge this to Umbraco 8, if this is still something you'd like to see in Umbraco 9, please take a look and either create an issue to say so or find an issue that already exists. We'll be happy to give you some input around how you can adjust your pull request to target Umbraco 9. Even better, it might be something that Umbraco 9 already does or has. In which case, enjoy!

Once again, a huge thank you for the time you have spent working with us.

#H5YR
Your friendly Umbraco GitHub bot 🤖 🙂

@umbrabot umbrabot closed this Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make XPATH filter work when MNTP is placed on a member/media type
2 participants