Hey all, I’m getting a strange issue where the articles grid is not displaying. I’m getting this error message “A server error prevented this grid’s content from loading. Refer to your browser’s console, manager logs, and/or php server logs for more information.”
The server is using PHP 8.1
What is causing this issue and how can I resolve it?
rthrash
October 31, 2023, 11:07pm
2
Articles hasn’t been touched in a while. That said, if you could file a bug at its repo, it will get reviewed (at GitHub).
Have you thought about converting it to Collections?
There is a bug in the current version of Articles . The “getlist” processor throws an error when “utf8mb4” is used as the database charset.
To fix it, take a look at this pull request:
modxcms:develop-3x
← halftrainedharry:patch-getlist
opened 12:58PM - 14 Oct 23 UTC
### What does it do?
Reads the charset value from the setting `modx_charset` in… stead of `charset`.
### Why is it needed?
The setting `charset` seems to be the database charset. If "utf8mb4" is used in the database, the code throws a fatal error
```
Fatal error: Uncaught ValueError: mb_substr(): Argument #4 ($encoding) must be a valid encoding, "utf8mb4" given
```
in PHP 8 (and outputs a `Unknown encoding "utf8mb4"` warning in PHP 7.4).
### Related issue(s)/PR(s)
Fixes #164