voklee
1
Summary
Nesting simple template variables and chunks suddenly start to throw errors in the logfiles (that overload hosting space quick)
Observed behavior
[[[[*pagetitle:notempty=`$pagetitleChunk`]]]]
This will work…
Because the check is before loading the chunk loadtimes are faster. We learned this like 5 year ago in the forums and it works great…
But it throws this error in logfiles lately. (Modx 2.6.5.)
......./core/model/modx/modparser.class.php : 540) Could not find snippet with name [[*pagetitle:notempty=`$pagetitleChunk`]]
Expected behavior
Not throw errors in the logfiles
1 Like
There were some bug fixes for tag parsing around 2.6.x
I believe you’ll need to modify your tag logic. (Or better yet, use a simple snippet)
1 Like
voklee
3
Thanks for your quickresponse. I now noticed that the parsing method was changed in 2.6.0.
There is even a topic about my question in the old forums: https://forums.modx.com/thread/103127/2-6-0-error-logs-could-not-find-snippet-with-name
In the setting we can set error not to show up because of this parse change:
“log_snippet_not_found”
True that a simple snippet would be better.
2 Likes
markh
4
What about this?
[[[[*pagetitle:notempty=`$pagetitleChunk`:default=`- do nothing`]]]]
2 Likes
voklee
5
Tested it. Works in 2.6.5.
Thanks
1 Like