modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.36k stars 528 forks source link

five curly brackets will become substituded to one squared bracket #13091

Closed mopox closed 8 years ago

mopox commented 8 years ago

Summary

{{{{{ }}}}} becomes substituded to [ ] in templates.

Step to reproduce

include {{{{{ }}}}} into a template or <?php return "{{{{{ }}}}}"' into a snippet

Observed behavior

the output always will be [ ]

Expected behavior

though, it should be untouched and the expected output should be {{{{{ }}}}}. that is important if one is working with JSON that are more than 5 levels deep.

Environment

Tested with MODX Revolution 2.5.0 and 2.5.1, Apache/2.4.7 (Ubuntu), MySQL 5.5.50, Firefox 47.0

pixelchutes commented 8 years ago

Very interesting. I've tried both Template and custom snippet, neither of which are converting my output:

test

MODX Revo 2.5.1 / NGINX / PHP 5.6.23 / MySQL 5.6.31

pixelchutes commented 8 years ago

@mopox how is the data being loaded? e.g. via traditional GET, or perhaps, POST?

mopox commented 8 years ago

well, i was able to reproduce ur findings. with a cleanly installed modx without modules and so on. i do not see the problem. so i ve to trace down the module which is making the trouble.

mopox commented 8 years ago

by the way, for loading the JSON data i am using XMLHttpRequest. but i don't really think it matters. coz when i load it traditionally it is the same issue...

Mark-H commented 8 years ago

If you're using pdoTools (the pdoParser) I think the {{ }} syntax might have a meaning there?

Jako commented 8 years ago

It could be the Fenom parser. Please deactivate the Fenom parser for the page template in modx system setting: pdotools_fenom_parser -> no

mopox commented 8 years ago

Yes, i am using pdoTools but pdotools_fenom_parser is already deactivated ... so i ll go into pdoTools more. thx

pixelchutes commented 8 years ago

Think we are good to close this issue?

mopox commented 8 years ago

It seems not to be a issue of the core. so i think you can close it. i also have a workaround for my usage. i opened a thread here https://forums.modx.com/thread/100731/trouble-with-json-output for further discussions.

bezumkin commented 8 years ago

@mopox I believe you need to update Tickets component. It is the very old code.

Current version escapes MODX tags another way.

mopox commented 8 years ago

haha, thank you. that solved the issue for me. i removed tickets. i just was fiddling around with that. it is runing as expected now. thx