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

V15 does not list "other URLs" from IUrlProvider #17952

Open
kjac opened this issue Jan 13, 2025 · 0 comments
Open

V15 does not list "other URLs" from IUrlProvider #17952

kjac opened this issue Jan 13, 2025 · 0 comments

Comments

@kjac
Copy link
Contributor

kjac commented Jan 13, 2025

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

V15

Bug summary

The URLs returned by IUrlProvider.GetOtherUrls(int id, Uri current) are not listed in the V15 backoffice.

Specifics

Given the following URL provider:

using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Routing;

namespace Umbraco.Cms.Web.UI.Custom;

public class MyUrlProvider : IUrlProvider
{
    public UrlInfo? GetUrl(IPublishedContent content, UrlMode mode, string? culture, Uri current) => null;

    public IEnumerable<UrlInfo> GetOtherUrls(int id, Uri current) =>
    [
        new UrlInfo($"https://some.where/{id}", true, null)
    ];
}

public class MyUrlProviderComposer : IComposer
{
    public void Compose(IUmbracoBuilder builder)
        => builder.UrlProviders().Insert<MyUrlProvider>();
}

V13 lists the "other URLs":

image

...but V15 does not:

image

Indeed, the "other URLs" ($"https://some.where/{id}") aren't included in the endpoint response:

image

Steps to reproduce

Add the example URL provider to a V15 site and rebuild. The "other URLs" are missing from the "Info" section.

Expected result / actual result

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants