What version of MODX Revolution you are using?
I get the 500 Internal Server Error if I use it on MODX 2.2.9
Kind Regards
====================
montagproject
Update:
The snippet has a trailing "?" at the end. That may cause errors
Kind Regards
====================
montagproject