Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • pbl_dk 150 posts 551 karma points
    May 03, 2017 @ 22:31
    pbl_dk
    0

    Hi there. Just found something odd. When umbraco generates an URL, in my solution, with an å it becomes "aa", but capital Å becomes "å". I'm running 7.5.13, anything I can do to change this?

    like this: nyheder/årets-naeststoerste-gevinst-vundet-paa-danskespildk/

    The article is called "Årets næststørste gevinst...".

    update: Just tried this, and it doesnt work, seems like its set elsewhere.

    <requestHandler>
     <urlReplacing ...>
       ....
       <char org="Æ">ae</char>
     </urlReplacing>
    </requestHandler>
    

    Thanks /Peter

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    May 04, 2017 @ 06:16
    Dennis Adolfi
    102

    HI Elitent.

    Im not sure if you want Å to be converted to Aa or if you want å to not be converted, but maybe this can point you to your solution:

    When you add urlReplacing, all your URL:s doesn´t automagically update (becouse that would be super scary), instead you need to manually Save&Publish for the new Url to be generated for your node.

    I've added this urlReplacing in my umbraco.config:

     <urlReplacing removeDoubleDashes="false" toAscii="false">
          <char org="Å">Aa</char>
          <char org="å">aa</char>
          <char org="Ä">ae</char>
          <char org="ä">ae</char>
          <char org="Ö">Oe</char>
          <char org="ö">oe</char>
        </urlReplacing>
    

    Then, I've created a node called "Årets näst störste gevinst vundet på danskespildk" (i know not exactly what you typed but I wanted to test ÅÄÖ). With the above urlReplacing I get this url (after I Saved and Published):

    /aarets-naest-stoerste-gevinst-vundet-paa-danskespildk/
    

    If you´d want to keep all your ÅÄÖ, add this:

    <urlReplacing removeDoubleDashes="false" toAscii="false">
          <char org="Å">Å</char>
          <char org="å">å</char>
          <char org="Ä">Ä</char>
          <char org="ä">ä</char>
          <char org="Ö">Ö</char>
          <char org="ö">ö</char>
        </urlReplacing>
    

    And the URL will be:

    /årets-näst-störste-gevinst-vundet-på-danskespildk/
    

    But remember, Save&Publish is key here!

    I´ve used Umbraco 7.5.12 for this example.

    Best of luck to you, have a great day!

    EDIT:

    Obviously, the following also works with:

    <urlReplacing removeDoubleDashes="false" toAscii="false">
          <char org="Æ">ae</char>
          <char org="æ">ae</char>
        </urlReplacing>
    

    Or the other way around, If you dont want to replace them.

  • pbl_dk 150 posts 551 karma points
    May 04, 2017 @ 12:02
    pbl_dk
    2

    Hi Dennis

    You are right. It works with save and publish! thanks. :-)

    I found out also via a blog post, that I can delete all the content of the urlreplace and only set like this:

    <urlReplacing toAscii="true" />
    

    Then the url becomes:

    /én-god-dag/ => /en-god-dag /Årets-bedste/ => arets-bedste

    I wonder why this isnt default in umbraco, I am getting a lot of errors when I validate the URL's as a feed for W3.

    Is it possible for someone to create a "feature-change" in the system for this?

    Thanks again, Dennis.!

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    May 04, 2017 @ 12:07
    Dennis Adolfi
    1

    That is awesome! Thanks for sharing! #h5yr

    Glad that it worked out for you Elitent! Happy I could help. :)

    I´m not sure about the issue you addressed, but if you think you have found a bug, you can always submit it to http://issues.umbraco.org and someone will eventually fix it (hopefully).

    Have a greay day!

  • pbl_dk 150 posts 551 karma points
    May 04, 2017 @ 14:31
    pbl_dk
    1

    Seems its already there from 2013:

    http://issues.umbraco.org/issue/U4-1952

    I have written some more info on the subject with W3 and urls.

    Please ppl vote this up, if anyone gets the chance :-)

    /Thanks Peter

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    May 05, 2017 @ 06:29
    Dennis Adolfi
    0

    That´s great Elitent!

    #h5yr

    Thank you, your feedback helps Umbraco become even better!

Please Sign in or register to post replies

Write your reply to:

Draft