The core editing solutions feels very hacky and not really future-proof and I’m wondering if there’s a better approach, considering we have dozens of websites suffering from this issues and applying this patch manually on every one is pretty time consuming.
MODX versions varying from 2.6.5 to 2.7.3
What that line does is change your SQL mode temporarily. To change that the proper way, change your mysql configuration:
Some hosts/control panels may offer an interface to do so instead of having to edit the my.cnf directly.
It would also be worthwhile to make sure details of the problem (i.e. what SQL mode is your server currently using that doesn’t work with Gallery, what errors does it cause in the MODX error log) are logged on Github. Perhaps the server upgrade also changed collations and you’re running into https://github.com/modxcms/Gallery/issues/85 or you’d need to create a new issue.