Closed xchs closed 7 years ago
@aschempp @Toflar can we even support the nested insert tags? Or shall we provide the extra key for that insert tag, e.g. {{options_label::1::_post_foo}}
?
Did anybody debug why it does not work? Sounds like a Core bug to me because nested insert tags should work.
Is the syntax of the nested insert tag correct? Or do I have to write three curly brackets?
{{{options_label::1::{{post::foo}}}}}
I just tried the {{abbr::{{page::title}}}}Foobar{{abbr}}
syntax and it does work in the frontend, so I assume two curly brackets are enough. @xchs can you check if a single {{post::foo}}
outputs the correct data in the notification?
Also, why would you use the inputvar extension if that insert tag is provided by Contao out of the box? Maybe the problem is that the extension does not play well for some reason with haste or notification_center.
Thanks, Kamil.
can you check if a single {{post::foo}} outputs the correct data in the notification?
Yes. The single insert tag {{post::foo}}
outputs the correct option value bar
.
Also, why would you use the inputvar extension if that insert tag is provided by Contao out of the box?
Yes, my bad, sorry. I have only seen now that this insert tag is also present in the core. I have now removed the extension.
However, the initial problem remains:
{{options_label::1::{{post::foo}}}}
→ bar
{{post::foo}}
→ bar
{{options_label::1::bar}}
→ foobar
(i.e. the correct option label)I didn't even know we can nest insert tags ^^
Hmm I can't reproduce issue neither in the frontend nor in the notification_center. My notification content:
POST: {{post::foobar}}
OPTIONS LABEL: {{options_label::12::{{post::foobar}}}}
And the output:
POST: value_2
OPTIONS LABEL: Label 2
@xchs guess we would need to debug it on your system then.
Just came to my mind – what is your exact field name and test value? Maybe it has something to do with the encoding.
@qzminski Thanks. I can give you access to my system if you want to reproduce it there. Can I contact you via email?
Feel free, you can find my e-mail on my Github profile.
Ok so the issue does not appear under Contao 3 but appears under Contao 4 and only in the production environment. The development seems to work fine. @aschempp @Toflar any ideas?
Maybe related to AppCache and insert tags as ESI requests?
This is the contao/core-bundle issue, see https://github.com/contao/core-bundle/issues/849
I have tried to get the option label by passing the field value via inputvar extension:
(
foo
denominates the field name of the corresponding select menu)However, the insert tag above outputs only the value provided by the
{{post::foo}}
insert tag and not the option label previously selected in the form.The same insert tag works perfectly fine in the Notification Center if
{{post::foo}}
gets replaced by the##form_foo##
simple token:[Tested with Contao 4.3.10]