Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Error when attempting to add metadata to placeholder
rabs
I am getting the following error - "The user is not authorized for the action or access to the object" when I attempt to add metadata to a placeholder via the line "placeHolderAsset.ReviseMetaData(metaData)"
I have previously copied the metadata from the accession folder which holds the placeholder.
Any ideas on how to resolve this?
Find more posts tagged with
Comments
Migrateduser
I'm assuming you're using the COM API. It should work unless you're restricted from doing it based on permissions, either to the parent folder or to the metadata definition of the metadata you're attempting to revise.
You need to pass the metadata to revise as an MBObjectCollection of Metadata Objects. Is it possible you haven't put the metadata into a collection before calling the revisemetadata method?
rabs
I have successfully added the metadata to the placeholder now - it was a permissions issue on the metadata items.
However, I am attempting to copy the placeholder metadata items to an image via "image.ReviseMetaData(metaData)" and I am getting the following error message - "The attempted operation is not allowed on this item."
Any ideas?
Migrateduser
You may not have the required permissions to the parent folder of the target image or the image's parent folder may be the Deleted Items folder.
rabs
I have tweaked my code and now seem to have resolved the permissions issue on the parent folder, but I'm getting the following error now - "The attempted operation is not supported in the current item state"
Migrateduser
It sounds like the asset is in the process of being inserted. In other words, the insert operation could have begun by submitting an insert "job" to the MediaBin server. When a new asset is "added" to MediaBin from a client, a job id is returned to the caller. The asset is not actually added to the repository until the job completes. We're guessing you're getting the asset id by asking for the children of a container. In that case, you will get the asset id, but if you check its state, you'll notice it's not completely inserted (use the IsGhost property to detect this). If you open your JOBS page in the web client or the JOBS view from the Windows native client, you'll see how an insert job goes through its transitions.
lyman
There has been some notational confusion on this forum. Placeholder assets refer to assets put only as a place to hang metadata and can, for example, serve as MediaBin representations of non-digital assets. Some workflows also involve adding a placeholder, adding metadata to that placeholder and then checking in the actual image on top of the placeholder.
When assets are inserted they are represented by "pending" (or less formally "ghost") images. This is not the same thing. These assets are not able to be manipulated and are there simply as a reminder that an asest is coming and to help avoid name collisions.
Inserting assets is asynchronous and you have to wait for job completion to be able to modify them.
Cheers,
Lyman Hurd
suj
In script model, you may try something like this:
Do While objAsset.IsGhost
objAsset.Refresh()
Loop
'Wait Until the Asset is completely updated
Do While objAsset.IsUpdating
objAsset.Refresh()
Loop
rabs
Thanks Guys.
I am now checking that the insertion job is completed b/f copying metadata. No errors now.