Merge pull request #10722 from umbraco/v9/bugfix/fix-multi-url-picker
V9: Fix multi url picker
This commit is contained in:
@@ -258,16 +258,16 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
/// <summary>
|
||||
/// Gets the URL of an entity
|
||||
/// </summary>
|
||||
/// <param name="udi">UDI of the entity to fetch URL for</param>
|
||||
/// <param name="id">UDI of the entity to fetch URL for</param>
|
||||
/// <param name="culture">The culture to fetch the URL for</param>
|
||||
/// <returns>The URL or path to the item</returns>
|
||||
public IActionResult GetUrl(Udi udi, string culture = "*")
|
||||
public IActionResult GetUrl(Udi id, string culture = "*")
|
||||
{
|
||||
var intId = _entityService.GetId(udi);
|
||||
var intId = _entityService.GetId(id);
|
||||
if (!intId.Success)
|
||||
return NotFound();
|
||||
UmbracoEntityTypes entityType;
|
||||
switch (udi.EntityType)
|
||||
switch (id.EntityType)
|
||||
{
|
||||
case Constants.UdiEntityType.Document:
|
||||
entityType = UmbracoEntityTypes.Document;
|
||||
|
||||
@@ -142,7 +142,7 @@ function entityResource($q, $http, umbRequestHelper) {
|
||||
umbRequestHelper.getApiUrl(
|
||||
"entityApiBaseUrl",
|
||||
"GetUrl",
|
||||
[{ udi: udi }, {culture: culture }])),
|
||||
[{ id: udi }, {culture: culture }])),
|
||||
'Failed to retrieve url for UDI:' + udi);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user