November Happy Hour will be moved to Thursday December 5th.

Max length of UrlSegment

Vote:
 

Hi,

We're using EpiServer version 11.11.00 and (want to) rely on DefaultUrlSegmentCreator.Create to create a unique url segment on PageData for us. However, the suggestion will cut at 30 characters, and if so we do not get a unique suggestion. It simply returns the same UrlSegment.

We have created a workaround, but does anyone know if there is a way to get the DefaultUrlSegmentCreator to return a unique UrlSegment even if the length exceeds the maximum?

#202048
Mar 12, 2019 15:02
Vote:
 

Hi Andreas,

I had a look and there seems to be nothing in the codebase restricting it to 30 characters, I passed in content with much longer names and got out valid URL segments with more than 30 characters.

I also looked into the default IUniqueIdentityCreator and IUrlSegmentGenerator implemtnations which are used by the DefaultUrlSegmentCreator and couldn't see that restriction there. Maybe I'm just missing something!

Could you provide an example of how you're calling the Create() method and the content you're passing in?

/Jake

#202060
Edited, Mar 13, 2019 1:04
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.