<![CDATA[ [SOLVED] Snippet Parameters: using Chunks? - My Forums]]> https://forums.modx.com/thread/?thread=83947 <![CDATA[Re: [SOLVED] Snippet Parameters: using Chunks?]]> https://forums.modx.com/thread/83947/snippet-parameters-using-chunks#dis-post-463345 http://tracker.modx.com/issues/9845

And thanks for such a fast fix!]]>
atmmarketing Apr 17, 2013, 11:17 PM https://forums.modx.com/thread/83947/snippet-parameters-using-chunks#dis-post-463345
<![CDATA[Re: [SOLVED] Snippet Parameters: using Chunks?]]> https://forums.modx.com/thread/83947/snippet-parameters-using-chunks#dis-post-463344 Quote from: atmmarketing at Apr 18, 2013, 03:50 AM

Yama, can you debrief us on the cause and fix? I'm actually interested.
Also, do you need me to submit this as an issue to Tracker?
Thanks. Could you submit this issue to tracker?]]>
yama Apr 17, 2013, 11:09 PM https://forums.modx.com/thread/83947/snippet-parameters-using-chunks#dis-post-463344
<![CDATA[Re: Snippet Parameters: using Chunks?]]> https://forums.modx.com/thread/83947/snippet-parameters-using-chunks#dis-post-463343
Yama, can you debrief us on the cause and fix? I'm actually interested.

Also, do you need me to submit this as an issue to Tracker?]]>
atmmarketing Apr 17, 2013, 10:50 PM https://forums.modx.com/thread/83947/snippet-parameters-using-chunks#dis-post-463343
<![CDATA[Re: Snippet Parameters: using Chunks?]]> https://forums.modx.com/thread/83947/snippet-parameters-using-chunks#dis-post-463342 yama Apr 17, 2013, 10:42 PM https://forums.modx.com/thread/83947/snippet-parameters-using-chunks#dis-post-463342 <![CDATA[ [SOLVED] Snippet Parameters: using Chunks?]]> https://forums.modx.com/thread/83947/snippet-parameters-using-chunks#dis-post-463339 Edit: See Yama's reply for a Core patch/hotfix.

I'm not sure if 1.0.9 has a new parsing engine, but the following code no longer works:

[[Ditto? &config=`@FILE {{template-path}}config/ditto/myconfig.php`]]


In previous version of MODX, the chunk {{template-path}} would be evaluated first, and then passed to the Snippet as a parameter.

In version 1.0.9, it seems that the raw value {{template-path}} is passed through, which causes Ditto to try to include() a file with a totally incorrect path like this:

/var/www/mysite/{{template-path}}config/ditto/myconfig.php


when it really should look like this:

/var/www/mysite/correct/template/path/config/ditto/myconfig.php


I can easily fix Ditto to first parse the &config parameter, but that's a core change I would prefer not to do.

My only workaround is to completely avoid using a chunk in the snippet parameter.

Can anyone shed light on this issue?]]>
atmmarketing Apr 17, 2013, 09:45 PM https://forums.modx.com/thread/83947/snippet-parameters-using-chunks#dis-post-463339