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.
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 :(
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.
Did you already create a workitem for this? http://umbraco.codeplex.com/WorkItem/Create.aspx
Not yet, I was waiting to see if anyone had some more insight on this...
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 :(
OK, created a workitem: http://umbraco.codeplex.com/workitem/27419
is working on a reply...