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

Type: Pre-Sale
Status: In Progress
bitpacket
View Replies:
mesuva replied on at Permalink Reply
mesuva
Hi Rob,

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
bitpacket replied on at Permalink Reply 5 Attachments
bitpacket
Hi grabs of the errors attached
mesuva replied on at Permalink Reply
mesuva
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.
bitpacket replied on at Permalink Reply 1 Attachment
bitpacket
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
mesuva replied on at Permalink Reply
mesuva
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.
bitpacket replied on at Permalink Reply
bitpacket
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

concrete5 Environment Information

# concrete5 Version
Core Version - 8.5.1
Version Installed - 8.5.0
Database Version - 20190301133300

# concrete5 Packages
List files from set (1.0.13), Long Story Short (1.2)

# concrete5 Overrides
blocks/page_list/templates/home_page_promos/view.php, blocks/page_list/templates/home_page_promos, blocks/page_list/templates/culpeper_news_events_top_two/view.php, blocks/page_list/templates/culpeper_news_events_top_two, blocks/page_list/templates, blocks/page_list, blocks/list_files_from_set/templates/culpeper_gallery/view.php, blocks/list_files_from_set/templates/culpeper_gallery, blocks/list_files_from_set/templates/culpeper_team_slider/view.php, blocks/list_files_from_set/templates/culpeper_team_slider, blocks/list_files_from_set/templates/culpeper_food_slider/view.php, blocks/list_files_from_set/templates/culpeper_food_slider, blocks/list_files_from_set/templates/culpeper_food/view.php, blocks/list_files_from_set/templates/culpeper_food, blocks/list_files_from_set/templates, blocks/list_files_from_set, blocks/google_map/templates/culpeper/view.php, blocks/google_map/templates/culpeper, blocks/google_map/templates, blocks/google_map, themes/culpeper/view.php, themes/culpeper/fonts/glyphicons-halflings-regular.svg, themes/culpeper/fonts/glyphicons-halflings-regular.woff, themes/culpeper/fonts/glyphicons-halflings-regular.ttf, themes/culpeper/fonts/sanchez-font/Sanchez-Regular.woff, themes/culpeper/fonts/sanchez-font/Sanchez-Regular.svg, themes/culpeper/fonts/sanchez-font/Sanchez-Regular.otf, themes/culpeper/fonts/sanchez-font/Sanchez-Regular.eot, themes/culpeper/fonts/sanchez-font/Sanchez-Italic.htm, themes/culpeper/fonts/sanchez-font/Sanchez-Regular.htm, themes/culpeper/fonts/sanchez-font/Sanchez-Italic.svg, themes/culpeper/fonts/sanchez-font/Sanchez-Italic.eot, themes/culpeper/fonts/sanchez-font/Sanchez-Italic.otf, themes/culpeper/fonts/sanchez-font/Sanchez-Italic.woff, themes/culpeper/fonts/sanchez-font, themes/culpeper/fonts/glyphicons-halflings-regular.eot, themes/culpeper/fonts/neuzefont/NeuzeFCBol.eot, themes/culpeper/fonts/neuzefont/NeuzeitFC-Bold.otf, themes/culpeper/fonts/neuzefont/NeuzeFCDemBol.eot, themes/culpeper/fonts/neuzefont/NeuzeFCDemBol.woff, themes/culpeper/fonts/neuzefont/NeuzeFCBol.woff, themes/culpeper/fonts/neuzefont/NeuzeFCReg.woff, themes/culpeper/fonts/neuzefont/NeuzeFCReg.eot, themes/culpeper/fonts/neuzefont/NeuzeFCBol.htm, themes/culpeper/fonts/neuzefont/NeuzeFCDemBol.svg, themes/culpeper/fonts/neuzefont/NeuzeFCReg.svg, themes/culpeper/fonts/neuzefont/NeuzeitFC-Bold.suit, themes/culpeper/fonts/neuzefont/NeuzeFCBol.svg, themes/culpeper/fonts/neuzefont/NeuzeFCDemBol.htm, themes/culpeper/fonts/neuzefont/NeuzeFCReg.htm, themes/culpeper/fonts/neuzefont, themes/culpeper/fonts, themes/culpeper/full.php, themes/culpeper/standard_page.php, themes/culpeper/elements/footer.php, themes/culpeper/elements/footer_blank.php, themes/culpeper/elements/header.php, themes/culpeper/elements/header_top.php, themes/culpeper/elements/footer_bottom.php, themes/culpeper/elements/dummy_content.php, themes/culpeper/elements, themes/culpeper/description.txt, themes/culpeper/img/euro-star-large.png, themes/culpeper/img/bottom-arrow-white.png, themes/culpeper/img/bottom-arrow-black.png, themes/culpeper/img/menu-white.png, themes/culpeper/img/close.png, themes/culpeper/img/euro-star.png, themes/culpeper/img/white-arrow-right.png, themes/culpeper/img/marble-bg-small.jpg, themes/culpeper/img/team-mock.psd, themes/culpeper/img/culpeper-diamond.png, themes/culpeper/img/bottom-arrow.png, themes/culpeper/img/euro-white.png, themes/culpeper/img/home-background.jpg, themes/culpeper/img/euro-black.png, themes/culpeper/img/arrow-right.png, themes/culpeper/img/euro-logo-large.png, themes/culpeper/img/menu-black.png, themes/culpeper/img/google-pin.png, themes/culpeper/img/brick-background.jpg, themes/culpeper/img/transparent.gif, themes/culpeper/img/left-arrow.png, themes/culpeper/img/drop-shadow.png, themes/culpeper/img/white-arrow-left.png, themes/culpeper/img/diamond-bg.png, themes/culpeper/img/brick-background-small.jpg, themes/culpeper/img/right-arrow.png, themes/culpeper/img, themes/culpeper/js/velocity.min.js, themes/culpeper/js/nourish-culpeper.js, themes/culpeper/js/bootstrap.min.js, themes/culpeper/js/jquery.scrollTo.min.js, themes/culpeper/js/scrollReveal.min.js, themes/culpeper/js/main.js, themes/culpeper/js/hw-parallax.min.js, themes/culpeper/js/jquery.parallax-1.1.3.js, themes/culpeper/js/ie10-viewport-bug-workaround.js, themes/culpeper/js/js.cookie.js, themes/culpeper/js/jquery.easing.1.3.js, themes/culpeper/js/modernizr.custom.js, themes/culpeper/js/sscr.js, themes/culpeper/js/jquery.arctext.js, themes/culpeper/js, themes/culpeper/thumbnail.png, themes/culpeper/page_theme.php, themes/culpeper/default.php, themes/culpeper/css/nourish-culpeper.css, themes/culpeper/css/nourish-culpeper-main.css, themes/culpeper/css/hw-parallax.min.css, themes/culpeper/css/presets/defaults.less, themes/culpeper/css/presets/dark.less, themes/culpeper/css/presets, themes/culpeper/css/old/nourish-culpeper.css, themes/culpeper/css/old/nourish-culpeper-medium.css, themes/culpeper/css/old, themes/culpeper/css/customizer.less, themes/culpeper/css/styles.xml, themes/culpeper/css/bootstrap.min.css, themes/culpeper/css/nourish-culpeper-medium.css, themes/culpeper/css/responsive-typography.css, themes/culpeper/css/main.css, themes/culpeper/css/fonts.less, themes/culpeper/css/build/mixins.less, themes/culpeper/css/build, themes/culpeper/css, themes/culpeper/standard_page_right_sidebar.php, themes/culpeper

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - On - If blocks on the particular page allow it.
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
fpm-fcgi

# PHP Version
7.2.21

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, mongodb, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 5000
memory_limit - 128M
post_max_size - 100M
upload_max_filesize - 100M
ldap.max_links - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
redis.pconnect.connection_limit - 0
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:69.0) Gecko/20100101 Firefox/69.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.