-
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
Combine GetUrl requests when loading a MNTP with many entries #11207
Conversation
Enables loading multiple URLs in a single request for Media & Documents
src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
Show resolved
Hide resolved
|
I think mostly it was because old pickers stored int ids. I haven't checked i all pickers in v9 now stores udi and legacy pickers have been removed? |
This is for v8! I can't find code that handles int ids for MNTP any more in v8, nor are the legacy datatypes available any more so I believe it's safe to say that those will not work in v8 and that we don't need to anticipate them. |
@nul800sebastiaan ahh sorry, just noticed @p-m-j was working on various PRs for v9 (but not this 😅 ). Regarding udi there are a few places it would be great to support this as well: Maybe not for v8.17, but a later release on v8. |
Might need to consider folks who have come from v7 and may have custom value converters to deal with large amounts of legacy pickers using IDs (aka people like me 🙄). It's probably an edge case, and should be rectified by migrating the id-based data, but assuming UDI would cause issues for these people... |
@nathanwoulfe yep that's exactly what we're trying to establish, is it possible to create a v7.5 site with integer based MultiNodeTreePicker (int), take it through 7.6 where there would be both MultiNodeTreePicker (int) and MultiNodeTreePicker2 (udi) onwards to 7.14 followed by 8.x still maintaining integers in the property data and if that is possible, how does it work with the current v8 MultiNodeTreePicker (udi) at present. The upgrade process from 7.5 to 8.x isn't much fun even with a practically empty site so it's hard to establish whether we still need to support this. |
Since it is possible to migrate id-based to UDI-based, maybe the solution would be adding a migration so that anyone landing on 8.17 will be doing so without IDs? |
The confusion here is that since the v8 MultiNodeTreePicker only works with UDIs we're assuming that must have already been handled, see GetReferences in https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Web/PropertyEditors/MultiNodeTreePickerPropertyEditor.cs If you have a v8 site with a MultiNodeTreePicker that still has comma separated integers in the property data then that would prove we still need to handle somehow (via a migration path or adding additional routes for looking up a url map via integer ids) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me, only found a couple of minor things 👍
src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just tested it out again and everything works as expected, I'll go ahead and merge 👍
Sounds like we did indeed need support for integers #11631 |
This is marked as breaking as it causes problems as described in #11631 - unfortunately we didn't get a chance to fix it before the 9.1.0 release, but we'll fix this in version 9.1.1. |
One of the problems is that in V9 assumption that the MultiNodeTreePicker only works with Udis!
In fact... Macro Parameter Editors that use the MultiNodeTreePicker in V9 have been kept as storing integer ids... ... and although it's been suggested to update them to use Udis, it's been felt this could only really be done in V10, to avoid breaking changes! But in the meantime, everything has to take ints into consideration. |
When loading MNTP's in the backoffice with existing entities associated, a request was made per entity to umbraco/backoffice/UmbracoApi/Entity/GetUrl
All URLs are now resolved in a single request.
Tested