I have an object that is in state clipboard but should be moved to trash. Though the asset is not committed and thing bail:
2007/03/02 17:16:24 - WARN - our.server.com.conf - main::[[undef]] - Couldn't call method deleteList on asset for url: intra Root cause: Can't call method "canEdit" on an undefined value at /data/WebGUI/lib/WebGUI/AssetTrash.pm line 209.
/Erik
Erik,
I can't duplicate this bug. Can you please tell me how you managed to set it up?
For reference, this is what I tried:
Seems correct from your point. But the asset should be created by another user then the one trying to delete
(same case as when the "Move Clipboard to trash" workflow triggers).
I cant check this out by now, maybe if you got some time to try this?
/erik
Okay, that's the missing piece (another user).
Here's the procedure to repeat.
Since the asset is not committed, it can't be instanced via newByDynamicClass without a specific revisionDate, so Asset->newByDynamicClass returns undef and then eventually undef->method gets called.
I don't know if this can be fixed. We might have to live with trapping the error and letting you know that the asset must be committed before being deleted. I'll have to check with JT.
JT said the right fix is not to display the Asset in the Clipboard unless it's committed, or in your version tag.
If it becomes a big issue, Admin should be able to set the version tag to be their own and then move it to the trash manually.
Fixed in 7.3.12
It is not an big issue, but please confirm that the "Move asset to trash" workflow wont bail and exit when running into one of these assets!
I hand tested the TrashClipboard activity by running the workflow. With an uncommitted Asset, no warnings or errors and the Asset was not Trashed. With a committed Asset, it Trashed it.