7
votes
Accepted
Does Sitecore support internationalization with Urls?
For your request you can use Display name functionality
Display names can include characters not allowed in item names.
Display names can vary by language, where item names cannot.
Because display ...
5
votes
Accepted
Why is Display Name and the Item Name in the URL resolving to the same item
This is how Sitecore works with item resolving. It will resolve via Item Name or Display Name. Setting the useDisplayNames in the LinkProvider will have zero effect on how Sitecore resolves the item ...
5
votes
Redirecting to Lowercase URL and removing trailing slashes for SEO
Have you checked the configuration in LinkManager?
<linkManager defaultProvider="sitecore">
<providers>
<clear />
<add name="sitecore" type="Sitecore.Links.LinkProvider,...
5
votes
Accepted
MediaManager throwing null error
From what I can tell your exception says in fact that you passed null MediaItem to GetMediaUrl method.
It looks like you have a field ImageField imageItem but imageItem.MediaItem is null. It's either ...
5
votes
Accepted
Why does MediaManager.GetMediaUrl() return internal "/sitecore/shell/-/media" URL instead of "~/media" URL?
From what I remember, if you add an image from media library into RTE field, Sitecore uses the following format:
<img src="-/media/5EA5C007FFFF4688A0B7E6F58B79D2E8.ashx" />
With your media ...
5
votes
Accepted
Unwanted Sitecore URL
You need to block them. Ideally, Google should never have been told about these URLs in the first place, it looks like you might have some mismanaged Site Url Generation going on elsewhere.
But for ...
5
votes
Accepted
mutated vowel in display name and don't show it in the generated url
In general, when using the out of the box functionality and fields , you can specify the display name to any value you like for the URL. It appears you have already configured your Link Provider to ...
4
votes
Accepted
Sitecore Url not working - layout not found error
This may happen when you have a sibling item (e.g. folder or item without a layout) with the same name or display name.
Be aware that Sitecore replaces hyphens to spaces when it tries to find an item ...
4
votes
Accepted
When should I use ScalableLinkProvider or ItemSearchLinkProvider?
ItemSearchLinkProvider
ItemSearchLinkProvider is a very simple provider with GetItemUrl method which:
Checks if item is inside a bucket
If no it returns base.GetUrl - where base class is Sitecore....
4
votes
Accepted
How do I allow only the configured language for each site?
I don't know of an ootb solution, this is how I usually "fix" this issue:
Add a setting to the site definition that lists all available languages
Add a a processor to the httpRequestBegin pipeline ...
4
votes
Getting an item using Powershell having only the URL
You can get item by URL using below function. You may have to tweak it for resolving wildcard items.
function GetItemByUrl($url){
$url = [System.Uri]::new($url);
$siteContext = [Sitecore....
4
votes
How to get URLS added in the Rich Text field and Link Manager Fields?
From what I understand, you want to implement custom logic for generation of internal links added by content authors in Rich Text fields.
If that's the case, you need to change the logic of ...
3
votes
Accepted
Custom Item Url Builder
The update in Sitecore 9.3 adds the new itemUrlBuilder configuration to control how item and media URLs are built. Unfortunately, this in not wired into the IoC container (unlike the LinkManager ...
3
votes
Accepted
Sitecore 9.3 CustomLinkProvider
The problem you are trying to solve, rendering the full URL with host name, does not require a custom link provider since this behaviour is available out of the box.
There are 2 settings which control ...
3
votes
Accepted
Is it possible to teach the keepalive agent to overcome TLS/SSL certificate warnings?
You can override UrlAgent that is used to make keepalive.aspx call. And disable certificate validation:
System.Net.ServicePointManager.ServerCertificateValidationCallback =
((sender, ...
3
votes
Why does MediaManager.GetMediaUrl() return internal "/sitecore/shell/-/media" URL instead of "~/media" URL?
This happens because your context site is "shell" .
You need to switch to website site using :
using (new SecurityDisabler())
{
var item = mediaCreator.CreateFromStream(ms, fileName, ...
3
votes
Accepted
Automatically Replacing Spaces with Dashes in URLs within RTE
You will need to create a custom processor inside renderField pipeline to replace space with dashes in external urls inside RTE.
Firstly you will need to create a custom processor as below, that ...
3
votes
Internal link in Rich text editor are not getting resolved after publishing
Internal links in Rich text editor are being resolved through below processor inside the renderField pipeline.
<renderField>
<processor type="Sitecore.Pipelines.RenderField.ExpandLinks,...
3
votes
Internal link in Rich text editor are not getting resolved after publishing
You need to find the <renderField> pipeline and check for this processor.
<processor type="Sitecore.Pipelines.RenderField.ExpandLinks, Sitecore.Kernel" />
You can debug the ...
2
votes
How to make query to form as part of base URL
You could use Sitecore wildcard item(s) to achieve this.
You create a page underneath searchpage and name it "*". Sitecore will map all request that are made to something underneath searchpage (and ...
2
votes
Alias with query string
You won't be able to do this with an ootb alias and customizing that code just for a querystring seems a bit overkill. Why not use redirects?
There is a redirect module on the marketplace (https://...
2
votes
Accepted
How to reload the current page with a query string parameter
If you only want to refresh the querystring and nothing else, you don't have to write the url for the current page, you can just write the querystring part:
click <a href="?test">here</a> ...
2
votes
Message: A potentially dangerous Request.Path value was detected from the client (>)
ASP.NET implements various algorithms for securing ASP.NET websites against potentially malicious user requests, for example, by rejecting requests that contain characters susceptible to be used in ...
2
votes
Accepted
Can I include image URL options with Synthesis field rendering helpers?
Synthesis has an extension method for ImageFields called RenderDpiAware (link) that allows you to specify a bunch of sizes to be used in a CSS source set.
Additionally, the Render() extension method (...
2
votes
Accepted
Should targetHostName and hostName be the same?
targetHostName attribute is used to generate URLs from linkManager when SiteResolving is set to true.
The host name to use when generating URLs to items within this site
from the context of ...
2
votes
Accepted
Sitecore how to get an ImageField full url, not a relative path?
you have to use MediaUrlOptions and to pass it to GetMediaUrl method.
You will have:
var image = new MediaItem(imageField.MediaItem);
MediaUrlOptions mediaUrlOptions = new ...
2
votes
Sitemap generating random urls
bgsi/public/group_scheme/index.jsp
Sounds like Java Server Pages. Sitecore is based on .Net and doesn't use this page extension. That is why I assume that it could be added by some external sitemap(...
1
vote
Shorturls being indexed under incorrect domains
This could be due to numerous reasons, although ultimately it means that you have a page that is accessible via multiple domains and that a canonical URL has not been specified. Typically speaking, if ...
1
vote
Sitemap generating random urls
If you take a look at the current implementation of the SitemapGenerator service in Sitecore.XA.Feature.SiteMetadata.dll, there is a method GetFullUrl which renders the url in the sitemap
...
1
vote
Accepted
Image hash in URL causes image to have black background in normal mode
It turned out to be that there were two images with the same path / name. One was a jpg and one was a png.
Because we're using paths instead of IDs for the image URLs, Sitecore seems to have trouble ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
urls × 42media-library × 8
url-rewrite × 7
multilingual × 5
link-manager × 4
redirect × 3
security × 2
pipelines × 2
richtext-editor × 2
mediaurls × 2
sxa × 1
powershell-extensions × 1
sitecore-api × 1
presentation × 1
upgrade × 1
multisite × 1
powershell × 1
site-configuration × 1
links × 1
scheduled-tasks × 1
certificate × 1
link-database × 1
seo × 1
error-handling × 1
renderfield × 1