Have switched experimental on and off a few times,
With E.F. off I get a JSON parse error “Error parsing the JSON in exec”
Also when switching I keep losing the DB connection settings and have to re-input them each time
Hi Brian,
Just enable the experimental features and define your security provider under globals.
Then don’t add security provider as a step in your server action.
Everything defined under globals (database connections, security providers etc) should be directly reused, not added a separate step in the server action …
Brian, if they are “linked” - i.e. you clicked the link button, they will appear under globals.
So you only need to select them in the dropdown of the restrict step or login step or logout step:
Yes, they all appear in the globals, that was not a problem.
I was using a security provider step to allocate the correct provider as there is actually no need for a security restrict as the output would be null if the user was not logged in (that is actually the purpose of the SA)
However removing the security provider stage and using a security restrict in it’s place has cleared the error but i does to me seems a counter intuitive workaround.
I’ve just tested this and it works fine.
Can you please make sure the experimental features are turned on in the settings and then fully quit and restart Wappler?
Well Brian, this is a known bug with views in PHP (in PHP itself not in the PHP extensions) and MySql server version older than 5.7 (many bug reports like this are available )
That's why we have added the prepared statements option in the database connection options, so that you can enable or disable this option in order to fix this error:
Yes but that issue related of using views?, these are tables not views
Anyway i have re-uploaded the dmxConnectLib folder and that has cleared the error BUT the query is still not returning any data (single or multiple query). Multiple returns an empty set, single returns null
The error is caused by the bug in the PHP i mentioned. Set the prepared statements to true and save the database connection for your selected target to fix it.
So is the prepared statements error now fixed?
Does the query return any results if you remove the filter?
based on single query,
If i remove the filter then the first record in the table is returned as I would expect (which just happens to be the record i am using for testing)
If i hard code the record number as a filter then the correct record is returned.
Just set up a quick test locally - one server action for login, global identify step and another action with a setvalue step which uses identify as a value - the identity is properly returned in the setvalue step.
Can you try deleting the dmxConnectLib folder and resave your server action so it can be recreated? Then upload it to your server and test again.