Copied to clipboard

Flag this post as spam?

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


  • MK 426 posts 902 karma points
    Mar 16, 2013 @ 19:53
    MK
    0

    4.11.5 Moving Doc to new parent

    Hi there,

    The following code work just fine in 4.7 but after upgrading to 4.11 i get weird errors:

               Document doc = new Document(childDocId);
               doc.Move(newParentDocId);
               umbraco.library.UpdateDocumentCache(doc.Id);
               umbraco.library.RefreshContent();
               doc.Publish(new User(0));
               umbraco.library.UpdateDocumentCache(doc.Id);
               umbraco.library.RefreshContent();
               return umbraco.library.NiceUrl(doc.Id);
    
    

    I can see the doc moved to the new parent but in razor I still see it under the old parent?!

    Regards,

    mkariti

  • MK 426 posts 902 karma points
    Mar 16, 2013 @ 21:18
    MK
    0

    Update: For some reason it will not update the doc url.

    Any Idea?

  • MK 426 posts 902 karma points
    Mar 17, 2013 @ 08:39
    MK
    0

    OK So Ive tried to create  a new node in the backsystem and move it to a new parent and same result.

    The url still refers to the old parent.

    What went wrong?!

     

     

  • Charles Afford 1163 posts 1709 karma points
    Mar 17, 2013 @ 10:24
    Charles Afford
    0

    Hi, its a known bug,  See http://umbraco.com/follow-us/blog-archive/2013/2/1/umbraco-4114-released.aspx for the patch :).  (Think this is correct) Charlie :)

  • MK 426 posts 902 karma points
    Mar 17, 2013 @ 10:34
    MK
    0

    Hi Charles,

    Many thanks for your reply.

    Im coming from 4.7 So not sure if its applicable. I did however tired the patch but with no success

    Cheers

    mkariti

  • Charles Afford 1163 posts 1709 karma points
    Mar 17, 2013 @ 10:56
    Charles Afford
    0

    Sorry, did not see the version you are using :).  No problem.  Charlie.

    Is it to do with the cache?  Have you tried removing it?

  • MK 426 posts 902 karma points
    Mar 17, 2013 @ 11:31
    MK
    0

    No worries, 

    I tried everything. Creating deleting and moving via system and c# as well.

    Nothing seems to cut it.....

  • Charles Afford 1163 posts 1709 karma points
    Mar 17, 2013 @ 20:05
    Charles Afford
    0

    Ok, well trying hasing umbraco on twitter see if someone has had that issue, if not i would raise it as a bug here i think :) 

    http://our.umbraco.org/forum/ourumb-dev-forum/bugs  

    and 

    http://our.umbraco.org/contribute/report-an-issue-or-request-a-feature

     

    Charlie.

  • MK 426 posts 902 karma points
    Mar 18, 2013 @ 09:32
    MK
    0

    Many thanks - Im hoping to find an answer soon......

  • 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