Copied to clipboard

Flag this post as spam?

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


  • Marco Lusini 176 posts 1370 karma points
    Jun 07, 2010 @ 13:07
    Marco Lusini
    0

    Nasty bug when deleting copied content nodes with an uploadFile property

    Hi,

    I've finally traced down a nasty problem that made images disappear from my editors work!

    I have a site with a document type wich has an image embedded via a dedicated uploadField property.

    Since this site has two distinct language subtrees, my editors often copy content nodes from the italian tree to the english one, and then edit the contents and leave the images in place.
    If someone eventually delete a copied node and then EMPTIES the trashcan, PUFF: the images disappear also from the original content.

    This is due to a bug in Document (umbraco.cms.businesslogic.web.Document) class, that, in the Copy() method, simply copies the values of every property without creating a copy of the uploaded file for an uploadField.
    Then, in the Delete() method, it removes any uploadField file when emptying the trashcan.

    As a workaround I am considering an event handler that makes a copy of uploaded files, but this, IMHO, should definitely get fixed ASAP.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jun 07, 2010 @ 13:09
    Jeroen Breuer
    0

    Did you already create a workitem for this? http://umbraco.codeplex.com/WorkItem/Create.aspx


  • Marco Lusini 176 posts 1370 karma points
    Jun 07, 2010 @ 13:20
    Marco Lusini
    0

    Not yet, I was waiting to see if anyone had some more insight on this...

  • Marco Lusini 176 posts 1370 karma points
    Jun 07, 2010 @ 17:22
    Marco Lusini
    0

    ARRGHH!!!

    Looks like I can't write an event handler that fires after a document is copied and fixes all that needs to be fixed, since the event handler doesn't receive any reference to the new node, only to the source of the copy :(

     

  • Marco Lusini 176 posts 1370 karma points
    Jun 08, 2010 @ 11:54
    Marco Lusini
    0
Please Sign in or register to post replies

Write your reply to:

Draft