Sudden / Recent issue causing fastfield (or pdoresources) content includes to no longer work

I have a commercial site that has been working well for months/years with this setup. Over the weekend, with no updates or changes made as far as I am aware (I am the guy who would handle all of them), I have certain pages that would include content from hidden resources - a way to easily allow for Fred editable muti-tabbed interfaces - these includes have simply stopped rendering. It is baffling. Originally using a simple fastfield call:


I tried re-engineering it to a pdoresources call today to see if I could get it back working:

[[pdoResources? &parents=`0` &resources=`780` &limit=`1` &select=`content` &tpl=`@INLINE [[+content]]`]

With no success - it’s like something has changed in the SQL setup or flags or PHP to no longer allow.

The modx error log is showing this error, regardless of fastfield or pdoresources method:

(ERROR @ /home/site-xx-name-xx-here/modx-core/components/pdotools/model/pdotools/pdofetch.class.php : 178) [pdoTools] Error 42000: 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 ‘) ASC, modResource.pagetitle DESC’ at line 1


Modx 2.8.5
PHP 7.3
MySQL version 5.7.42

Any help would be awesome. This is a live site

This error gets generated in the pdoTools extra.
But it’s not clear what the exact SQL syntax error is.

Change modX::LOG_LEVEL_INFO in this line of the code to modX::LOG_LEVEL_ERROR (or change the system setting log_level) to get the full SQL query in the error log.

Maybe this provides more insight.

Is the pdoTools extra up to date?

Wow. I spent a whole day working this one out.

Not MODX. Not PHP. Not MySQL.

In the end, a stupid CSS collision that rendered the wrapper div to display:none was the problem.

What a Monday. Sigh.

Thanks @halftrainedharry for troubleshooting.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.