Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2014-06-30 16:57:09

Andrei_Grosu
Member
Registered: 2014-06-30
Posts: 8

Files_GetAssetIdsByFilename Bug

Hello,

      First I want to say 'Great Job' for you application, it's very useful.  I'm a developer working for one of your clients Historic Images(http://ims.historicimages.com/apidocumentation.tlx) and  for one of my tasks I need to find  the " IMS File Reference" for multiple filenames. I am using the PHP Client that you provided in the documentation and all the functions work great except for Files_GetAssetIdsByFilename. Below is the returned result when I use this function.
      As a substitute I am using Search_GeneralSearch(array("query"=>$filename, "exactMatches"=>"false")) where $filename  is a picture filename. If I could use Files_GetAssetIdsByFilename the response time  shouldn't be a little faster?(I make this call for multiple filenames).
    Also is there a function from the API that can accept multiple filenames and return the associated IMS File Reference?
 
    Thank you very much

Array
(
    [result] => Array
        (
            [api] => INTERNAL_ERROR
            [action] => API_ERROR
            [debug] => SQLQuery() Failed

MYSQL ERROR 1064:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'assets_sortables.gid = 1375803731 AND containers.objecttype=4 AND assets_sortabl' at line 1

SQL:
SELECT assets_sortables.assetid FROM assets_sortables INNER JOIN containers ON assets_sortables.gid=containers.gid AND assets_sortables.containerid=containers.containeridWHERE assets_sortables.gid = 1375803731 AND containers.objecttype=4 AND assets_sortables.filename = 'ora'
        )

)

Offline

#2 2014-06-30 17:30:07

steve
Third Light Staff
Registered: 2013-06-06
Posts: 92

Re: Files_GetAssetIdsByFilename Bug

Dear Andrei,

Thank you very much for this report. We have located the problem and I will let you know as soon as we released a new version of the software that contains the fix.

We don't have an API method to accept multiple filenames so when GetAssetIdsByFilename() is fixed you would need to call it multiple times or use a search based alternative. With the Advanced search, you could filter against filename without needing to check other fields as the GeneralSearch would. There is an example on this page that will show the ids https://secure.thirdlight.com/developer … .php?id=46

Offline

#3 2014-08-04 15:39:13

steve
Third Light Staff
Registered: 2013-06-06
Posts: 92

Re: Files_GetAssetIdsByFilename Bug

Just a quick note to say that this problem is resolved in IMS versions 6.1.0 and above.

Offline

Board footer