Copied to clipboard

Flag this post as spam?

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


  • Tim 225 posts 690 karma points
    Sep 03, 2010 @ 19:13
    Tim
    0

    Can't get the 404 handler to work

    Hi,

    I'm implementing an Umbraco 4.5.2 multilingual site and am setting up the 404 errors in umbracoSettings.config.

    However it doesn't seem to work correctly.

    I have this in my umbracoSettings.config file:

        <errors>

          <error404>

            <errorPage culture="default">1254</errorPage>

            <errorPage culture="en-GB">1259</errorPage>

    <errorPage culture="fr-FR">1256</errorPage>

          </error404>

        </errors>

    However when it tries to redirect to 404 I get this error in the umbracoLog table

    System.FormatException: Input string was not in a correct format.

         at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

         at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)

         at System.Int32.Parse(String s)     at umbraco.handle404.Execute(String url)

    Anyone got any ideas what I'm doing wrong?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 06, 2010 @ 13:31
    Dirk De Grave
    1

    Tim,

    i'm assuming the correct errorPage node's not found when executing the 404 handler. Config is fine, think you need to check the domains you've specified and whether that corresponds to the SERVER_NAME  server variable. Have any info on that?

     

    Cheers,

    /Dirk

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 06, 2010 @ 13:35
    Dirk De Grave
    1

    Also, if you've specified this specific errorPage after having added the domains using 'Manage domains' context menu, best bet is to restart the app, as the domains are being cached... and changes to your config after changing domains won't have any effect until after a restart.

     

    Hope this helps.

    Regards,

    /Dirk

  • Tim 225 posts 690 karma points
    Sep 06, 2010 @ 14:23
    Tim
    0

    Thanks Dirk,

    All working now. A domain caching issue as you suggested above.

    T

     

     

Please Sign in or register to post replies

Write your reply to:

Draft