Copied to clipboard

Flag this post as spam?

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


  • Dima Stefantsov 100 posts 225 karma points
    Mar 17, 2014 @ 19:00
    Dima Stefantsov
    1

    Redirects are not created automatically, Umbraco 7.0.3

    Hi. I remember using 301urlTracker earlier on umbraco 4 or 6, and I remember it was creating redirects automatically when any node URL was changed.
    It is said in current description: "It automatically tracks URL changes, for instance when a node is renamed, and makes sure the old URL will redirect to the new location."

    But this is not the case when I install it on my Umbraco 7.0.3 / iisexpress / mssql2012. No records are being added automatically. Logging does not show anything suspicious like errors. Redirecting works for manually created items.

    How do I get 301urlTracker to create redirect items automatically?

     

    PS: I also remember being able to add 301urlTracker "widget" to node Properties itself, so I can manage redirects in-place. Have not found info on this in current version. Is this feature discontinued as well?

  • Dima Stefantsov 100 posts 225 karma points
    Mar 18, 2014 @ 14:27
    Dima Stefantsov
    1

    I can see in sources that it's still supposed to create redirects automatically, but it just does not work.

    Code
                  Document.BeforeMove += Document_BeforeMove;
                  Document.BeforePublish += Document_BeforePublish;
                  content.BeforeClearDocumentCache += content_BeforeClearDocumentCache;
                  Document.BeforeDelete += Document_BeforeDelete;
                  Domain.AfterDelete += Domain_AfterDelete;
                  Domain.AfterSave += Domain_AfterSave;
                  Domain.New += Domain_New; 
    is being invoked (even though ApplicationBase is obsolete), but methods/events are never being called.

    I can see code like this is recommented in https://github.com/umbraco/Umbraco4Docs/blob/master/Documentation/Reference/Events/application-startup.md , but my VS tells me Document is obsolete too, and I should be using Core.Models.Content. Probably something like https://github.com/umbraco/Umbraco4Docs/blob/master/Documentation/Reference/Events-v6/ContentService-Events.md
    I tried it and ContentService methods are being invoked indeed.

  • Vladimir Knobel 95 posts 170 karma points
    Mar 28, 2014 @ 11:42
    Vladimir Knobel
    0

    Hi Dima 

    Have you tried to set "urlTracker:trackingDisabled" to false?
    It's described in the settings tab of the Url Tracker ("The Url Tracker supports a few settings, which you can use in the appSettings section of your web.config.")...

    Regards
    Vlax

     

     

  • Dima Stefantsov 100 posts 225 karma points
    Mar 28, 2014 @ 13:59
    Dima Stefantsov
    0

    Hi Vlax, I believe I did. Even though it should not be required because it's enabled by default.

    Like I said in the post before, I have debugged it with source code and found a reason it does not work: addon uses legacy events methods which do not fire on documents publish. Now it's just a matter of time Stefan will fix this bug I believe.

  • nathan 8 posts 28 karma points
    Apr 24, 2014 @ 19:20
    nathan
    0

    I can confirm this is an issue in 7.0.4.  Here are the rows from the database when renaming a page then naming it back:

    Id OldUrl OldUrlQueryString OldRegex RedirectRootNodeId RedirectNodeId RedirectUrl RedirectHttpCode RedirectPassThroughQueryString Notes Is404 Referrer Inserted ForceRedirect
    143126 mystery/ NULL NULL 1066 NULL NULL 301 1 NULL 1 http://www.example.com/ 2014-04-24 16:42:50.0000
    143127 mystery-2 NULL NULL 1066 NULL NULL 301 1 NULL 1 NULL 2014-04-24 16:43:02.2970

    Trying to navigate to the old URL would just result in the 404 error page.

  • Michael Boserup Hesselberg 4 posts 25 karma points
    May 20, 2014 @ 11:23
    Michael Boserup Hesselberg
    1

    Confirmed also as an issue in 7.1.1.

  • Karl Kopp 121 posts 227 karma points
    Jun 06, 2014 @ 02:24
    Karl Kopp
    0

    Not working in 7.1.4 either. Is the source code available somewhere so I can update the events?

  • Dima Stefantsov 100 posts 225 karma points
    Jun 06, 2014 @ 10:10
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies