greetings all,
I am trying to update my assets with descriptive metadata to no joy. I've been digging through the forums hoping someone has wanted to do a similar thing in the past to no avail. I have tried the import from XML script and it's looking like it only works if you are creating new assets. I think to myself surely there are people who would like to do this every now and then and sure enough there are but they tend to use the csv to xml but the issue is that my metadata has a lot of commas in it.
This is some of the XML (I didn't put all of it as it is a repeat of the same thing), the metadata goes in the variable '$description'.
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<action_id>set_Image_31450_metadata_field_832</action_id>
<action_type>set_metadata_value</action_type>
<asset>[[output://create_Image_31450.assetid]]</asset>
<fieldid>832</fieldid>
<value>![CDATA[$description]]</value>
</action>
<action>
<action_id>set_Image_31452_metadata_field_832</action_id>
<action_type>set_metadata_value</action_type>
<asset>[[output://create_Image_31452.assetid]]</asset>
<fieldid>832</fieldid>
<value>![CDATA[$description]]</value>
</action>
The error is as follows
set_Image_31450_metadata_field_832 +---------
--------------------------------------------------------------------------------
-----------------------------------------------------------------------------+
| MySource Error
|
|-------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-------|
| Failed getting asset for set_metadata_value action "set_Image_31450_metadata_f
ield_832" - attribute references action "create_Image_31450" that has not yet be
en run |
+-------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-------+
Thus there is a create_image_asset_ID that has to be run which becomes a handle for the set_Image_31450_metadata_field_832 action. But I have the assets already created all i want is to set the metadata. So may be there should be another action like the Hipo job (hipo_job_import_assets_from_xml.inc line 148) {if($action['action_type'][0] === 'create_file_asset') {
} which will look at just setting metadata or other attributes of the already created assets.