Hot answers tagged

2

I think that this is a bug in Sitecore. Here's whats happening When you enable the CDN config, it sets Media.AlwaysAppendRevision to true This appends rev=xxx to all media urls The media request protection protectedMediaQueryParameters config has <parameter name="rev" description="media revision"/>. The media request protection code in Sitecore....


2

First of all, you don't need to have a delegate there. It is useful when your function can accept optional parameters. You won't do it in Func and that is why we are using delegate. Otherwise, you can do something like that and skip delegate: args.GlobalScriptObject.Import("sc_link", new Func<Item, string>((item) => { // something return ...


2

For me Sitecore.Sites.SiteContextFactory.Sites worked to get all sites. If you need to know whether it is an SXA site or not, you can check for the property IsSxaSite (something like x => !string.IsNullOrEmpty(x.Properties.Get("IsSxaSite"))


1

I have answered the question you linked with some steps to troubleshoot this - but I will also answer here with an additional finding due to this question regarding SXA specifically. I found an issue where forms embedded in overlays in SXA (versions 1.9 and 9.3) will have this issue due to this bug in the component-overlay.js of the components theme which ...


1

I don't think this can work out of the box. The search results component reacts on a signature. In order to match the results with the search box those signatures need to be empty or the same. The requests to the search API will work fine. But when the javascript gets the returned data, it will try to find the results component with your signature and it ...


1

I stumbled across this while looking for a solution to the same issue and thanks to Mark's info I was able to get rid of the log spam by simply wrapping the GetMediaUrl in an extension method in which i'm foribly appending something that will be hashed with the media protection logic (so there will always be a hash value appended for places that I need it). ...


1

There are two ways to accomplish this, use custom Scriban extension, see the following code sample: public class GetLinkUrl : IGenerateScribanContextProcessor { private readonly IContext context; private delegate string LinkUrlDelegate(Item item, string linkFieldName); public GetLinkUrl(IContext context) { this.context = context; ...


Only top voted, non community-wiki answers of a minimum length are eligible