Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

parse Snippet not work with [[ [[ #1100

Closed
Dmi3yy opened this issue Dec 13, 2016 · 11 comments
Closed

parse Snippet not work with [[ [[ #1100

Dmi3yy opened this issue Dec 13, 2016 · 11 comments
Assignees
Labels

Comments

@Dmi3yy
Copy link
Collaborator

Dmi3yy commented Dec 13, 2016

http://take.ms/oPgO7

This all ok
http://take.ms/pi8zW

But if change to [[Ditto not work (((

need normal work:
[[ [[
[! [!
[[ [!
[! [[

@bossloper
Copy link
Contributor

Is this already logged as issue #1089 ?

@Dmi3yy
Copy link
Collaborator Author

Dmi3yy commented Dec 13, 2016

yes not see close this )

@Dmi3yy Dmi3yy closed this as completed Dec 13, 2016
@Dmi3yy
Copy link
Collaborator Author

Dmi3yy commented Dec 14, 2016

The same problems with multilang ((

[!if? &is=[%mode%]:eq:ru &then=bla bla bla!] - not work

but

[%mode%] return ru

@Dmi3yy Dmi3yy reopened this Dec 14, 2016
@yama
Copy link
Collaborator

yama commented Dec 14, 2016

[%mode%]

What is this value?

@Dmi3yy
Copy link
Collaborator Author

Dmi3yy commented Dec 14, 2016 via email

@yama
Copy link
Collaborator

yama commented Dec 14, 2016

@yama
Copy link
Collaborator

yama commented Dec 14, 2016

// hook to OnParseDocument
$modx->documentOutput = str_replace('[%mode%]','ru',$modx->documentOutput);

I made a simple plugin like above and tried it, but it was no problem.
Would you open docid_xxx.pageCache.php by text editor and check how snippet calls are handled?
If there is something wrong, calling OnParseDocument may be able to solve it.

@yama
Copy link
Collaborator

yama commented Dec 14, 2016

$value = str_replace(array('[!','!]'), array('[[',']]'), $value);

Insert on the next line.

$this->invokeEvent('OnParseDocument');

Does this solve it?

@Dmi3yy
Copy link
Collaborator Author

Dmi3yy commented Dec 15, 2016

@yama
Copy link
Collaborator

yama commented Dec 15, 2016

I want to know where the value of [%mode%] comes from. This process is simple, so I can fix it if I can reproduce it. Is there a test environment etc?

@Deesen
Copy link
Contributor

Deesen commented Dec 18, 2016

@Dmi3yy Dmi3yy closed this as completed Dec 26, 2016
bossloper pushed a commit to bossloper/evolution that referenced this issue Jul 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants