Copied to clipboard

Flag this post as spam?

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


  • Marshall Penn 49 posts 208 karma points
    Sep 05, 2019 @ 16:13
    Marshall Penn
    0

    What actually happens under the covers when you "Move" a page

    Does anyone know what happens (step by step) under the covers when you move a page using the UI?

  • Dennis Adolfi 1072 posts 6378 karma points MVP 2x c-trib
    Sep 09, 2019 @ 06:20
    Dennis Adolfi
    100

    Hi Marshall. You can always have a look at the source code of Umbraco-CMS if there is something that happens "under the cover" that you are interested in: 
https://github.com/umbraco/Umbraco-CMS

    Looking at the Move event, it seems like:


    1. … the first thing that happens is that ContentController.PostMove gets triggered: https://github.com/umbraco/Umbraco-CMS/blob/v8/dev/src/Umbraco.Web/Editors/ContentController.cs#L1542

    2. … which then calls ContentService.Move: https://github.com/umbraco/Umbraco-CMS/blob/v8/dev/src/Umbraco.Core/Services/Implement/ContentService.cs#L1907

      // Moves an object to a new location by changing its parent id. /// If the object is already published it will be /// published after being moved to its new location. Otherwise it'll just /// be saved with a new parent id.

    3. ... which then calls ContentService. PerformMoveLocked method, where all the magic happens: https://github.com/umbraco/Umbraco-CMS/blob/v8/dev/src/Umbraco.Core/Services/Implement/ContentService.cs#L1979

    Hope you can find what you are looking for, take care!

  • 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