MYSQL error for guests not when loged in
Permalink Browser Info Environment
Hi when I'm logged in as admin filesets works as expected (I love this plugin). But since swapping to a new server guests or non logged in visitors get this MYSQL error
-------------- MESSAGE START
Guest:
Exception Occurred: /container/application/public/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:90 An exception occurred while executing 'SELECT * FROM FileSets WHERE (fsType = 1) OR ((fsType IN (0, 2, 1)) AND (uID = )) ORDER BY fsName ASC':
SQLSTATE[42000]: Syntax error or access violation: 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 ')) ORDER BY fsName ASC' at line 1 (0)
----------------------- ENDS
Thanks
-------------- MESSAGE START
Guest:
Exception Occurred: /container/application/public/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:90 An exception occurred while executing 'SELECT * FROM FileSets WHERE (fsType = 1) OR ((fsType IN (0, 2, 1)) AND (uID = )) ORDER BY fsName ASC':
SQLSTATE[42000]: Syntax error or access violation: 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 ')) ORDER BY fsName ASC' at line 1 (0)
----------------------- ENDS
Thanks
Type: | Pre-Sale |
---|---|
Status: | In Progress |
Hi grabs of the errors attached
I think this may be an issue with the custom template you are using with the block.
I can see from the error messages that the function getMySets() is being called.
Within the core block, this is only called when editing the block, not when it's displayed, which means it's only going to be called to logged in users.
You may need to seek help from whoever developed the custom template.
You're welcome to paste the contents of the template here too.
I can see from the error messages that the function getMySets() is being called.
Within the core block, this is only called when editing the block, not when it's displayed, which means it's only going to be called to logged in users.
You may need to seek help from whoever developed the custom template.
You're welcome to paste the contents of the template here too.
Okay that may make sense as the templates were built for 5.7.5.13
And presumably permissions etc have upgraded since then - I've attached it so if you could have a look that would be great - Thanks
And presumably permissions etc have upgraded since then - I've attached it so if you could have a look that would be great - Thanks
This template is quite outside the original scope of what the List Files From Set block was intended to do. In fact, I don't even think it requires the block specifically at all, it's effectively a stand-alone script that just happens to have used a List Files From Set block template as a location.
So it's then quite outside the 'support' of this block I'd generally be offering, as it's really a custom piece of custom development, and not based off of the List Files From Set template. I have to draw the line somewhere, sorry.
You're welcome to contact me directly if you are wanting help with this, but it would be more of a commercial offering of services (if that's applicable to your site/organisation), or you could post this on the jobs forum.
So it's then quite outside the 'support' of this block I'd generally be offering, as it's really a custom piece of custom development, and not based off of the List Files From Set template. I have to draw the line somewhere, sorry.
You're welcome to contact me directly if you are wanting help with this, but it would be more of a commercial offering of services (if that's applicable to your site/organisation), or you could post this on the jobs forum.
Hi for sure lots of custom stuff...
However I've worked out how to reuse the script - the 8.5.1 getMySets function has changed and requires extra params - I've just called those as an object and it all works now
Thanks
R
However I've worked out how to reuse the script - the 8.5.1 getMySets function has changed and requires extra params - I've just called those as an object and it all works now
Thanks
R
are you able to post a screenshot of this error with the full debug turned on via the dashboard? That might help pinpoint what is going wrong.
I have a suspicion though that it's not something directly to do with List Files From Set, but something to do with the internals of concrete5 and how it fetches file sets...
-Ryan