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

Chunk with parameters drops placeholders defined before chunk #874

Closed
pmfx opened this issue Oct 29, 2016 · 7 comments
Closed

Chunk with parameters drops placeholders defined before chunk #874

pmfx opened this issue Oct 29, 2016 · 7 comments

Comments

@pmfx
Copy link
Contributor

pmfx commented Oct 29, 2016

Have issue with #625

Placeholders defined before chunk are missing inside this chunk when it have a parameter.

2016-10-29-21-21-23

When I call chunk {{chunktest}}, [+before_chunk_placeholder+] inside chunk is OK and value is visible.

When I call chunk {{chunktest?&chunk_placeholder='Im chunk placeholder'}}, [+before_chunk_placeholder+] inside chunk is empty.

@Deesen
Copy link
Contributor

Deesen commented Oct 31, 2016

Ok I can recreate that issue and will look into it.

@Deesen
Copy link
Contributor

Deesen commented Oct 31, 2016

If I change 'hasModifier' to false both placeholders are working -> https://github.com/modxcms/evolution/blob/develop/manager/includes/document.parser.class.inc.php#L1044

@yama Is this a fix or does it break other functionality?

@Deesen
Copy link
Contributor

Deesen commented Dec 3, 2016

@pmfx As stated in Slack I checked myself again and also with yama. It seems this issue is solved, I cannot recreate it using the same test-case as 1 month ago.

@yama
Copy link
Collaborator

yama commented Dec 3, 2016

inside chunk is OK and value is visible.

I can not understand this part well. "value is visible"?

@Deesen
Copy link
Contributor

Deesen commented Dec 3, 2016

@pmfx Please correct me if I am wrong. My test-case for this issue:

Chunk "chunkph":

in chunk: [+chunk_placeholder+]
before chunk: [+before_chunk_placeholder+]

Snippet "setPlaceholder":

$modx->setPlaceholder($placeholder, $content);

Content of my test-resource:

[[setPlaceholder?&placeholder=`before_chunk_placeholder` &content=`this is content for ph before_chunk_placeholder`]]

chunk_placeholder is parsed, before_chunk_placeholder is NOT
{{chunkph?&chunk_placeholder=`chunk_placeholder`}}

chunkph - before_chunk_placeholder is parsed
{{chunkph}}

@yama
Copy link
Collaborator

yama commented Dec 3, 2016

It is not linked with setPlaceholder. I will improve it later.

@pmfx
Copy link
Contributor Author

pmfx commented Dec 3, 2016

Just tested it and works great now. Thanks! Closing.

@pmfx pmfx closed this as completed Dec 3, 2016
Dmi3yy pushed a commit that referenced this issue Dec 10, 2018
Dmi3yy pushed a commit that referenced this issue Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants