JS API batchRequest and using createAsset with additional attributes


(Nic Hubbard) #1
When using the batchRequest feature with the createAsset function, the JS API (enhanced) calls this._cleanUrlParam(postData) on all of the JSON that is going to be sent to the server, so essentially everything. 
 
This is a huge problem for the createAsset function, because the cleanUrlParam function converts ampersands (&) into %26. In doing this, it breaks the ability to pass in extra attributes on create since that attribute create string needs to be delimited by an ampersand.
 
The createAsset itself correctly doesn't use the cleanUrlParam function on the extra_attributes.
 
I am assuming this is a bug as I can't find a way around this. Has anyone else used the batchRequest with createAsset and additional attributes?

(Cgrist) #2

I've never had much luck getting the extra_attributes to work (this is probably why) and have usually resorted to subsequent batch requests or the results keywords. 


(Bart Banda) #3

Sounds like a bug to me, can you report into bug tracker Nic? and then maybe note the bug number here for future reference? 


(Nic Hubbard) #4

Bug # 6848: http://bugs.matrix.squiz.net/view_bug.php?bug_id=6848