knop-project / knop

Web application framework for Lasso 8 and 9
18 stars 46 forks source link

user -> login fails on FileMaker 12+ #116

Open stevepiercy opened 8 years ago

stevepiercy commented 8 years ago

FileMaker 12 syntax has changed to not require an extra "=" when performing a query. So I inserted a temporary workaround in line 422:

if(#db -> 'isfilemaker') => {
    // FileMaker 12 and later syntax
    #searchparams -> merge(array(-op='eq', .'userfield' = #_username))
    // FileMaker 11 and earlier syntax
    //                  #searchparams -> merge(array(-op='eq', .'userfield' = '="' + #_username + '"'))
else

This ought to be handled better by automatically detecting the version of FileMaker if at all possible.

stevepiercy commented 8 years ago

Parse the XML result from this curl or include_url with authentication. https://hostname/fmi/xml/FMPXMLRESULT.xml?-db=FMServer_Sample

<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
<ERRORCODE>4</ERRORCODE>
<PRODUCT BUILD="01/15/2015" NAME="FileMaker Web Publishing Engine" VERSION="13.0.9.905"/>
jolle-c commented 8 years ago

The present Knop for Lasso 9 build has been poorly tested on Filemaker. As in not tested at all.

HDB Jolle

stevepiercy commented 8 years ago

I've tested some of Knop for Lasso 9 with FileMaker 12+, and so far it works except as noted in the workaround above. That's not really a Knop issue, but a Lasso 9/FM 12+ issue: FM changed the syntax or how it parses the request, and LassoSoft has not adapted its FM connector to send a properly formed request.