In the process of cleaning up our error logs, I also came across this:
[2018-06-20 00:26:16] (ERROR @ /.../modx-core/model/modx/modparser.class.php : 538) Could not find snippet with name 290.
Fastfield is not installed. I'm wondering if maybe it's related to a deleted snippet, but it's just guesswork. I set the log_snippet_not_found warning setting to No just to get rid of it in the logs, though I don't like hiding warnings because sometimes they show relevant things you should be aware of.
No snippet name was attached to the number 290, and, also interesting, when I checked our snippet ID numbers, none of them are above 100.
I don't know when this issue started because I hadn't checked our logs for a while.
I decided to actually figure this out rather than masking the issue, which turned out to be real, I'll outline the process I used, which only will work if you have access to your physical raw server web-logs.
1. go to your server web log directory. Ours are separated into gz'ed daily files, which are date stamped in the file name, which makes it easier. You are searching for the time stamp you saw in the modx error logs:
zgrep '00:26:16' site20180620.gz
repeat for all missing snippet errors. This will give you the page(s) url. If you get nothing, try adding or subtracting one second from the time stamp, sometimes logs get written right at the switch to a new second.
2. go to the page in the resource editor, search for the snippet id number if you don't see any non existing snippets in the code. In our case, it turned out to be a bad office admin updater who had sloppily copied and pasted:
You'll note that without the ~ in the link shortcut [[~290]] it becomes a snippet call, thus tripping the missing snippet error.
Repeat until you've found all instances. So in this case, this had nothing to do with snippets, it was just bad site updaters being sloppy, and adding in a nothing link, which is then processed as a snippet which does not exist, which then trips modx error reporter, absolutely correctly.
Since such a sloppy link error is very easy to make, and very hard to spot, this method will let you find all the pages without having to go through them one by one, which is obviously not possible once you have more than a handful of pages.
[ed. note: lizardx last edited this post 1 year, 1 month ago.]