Closed nilshoerrmann closed 13 years ago
It also happens on another SSM:
{$start}–{$ende}
Both fields are simple input fields and it seems like SSM recognizes the token correctly but doesn't replace the value correctly.
Those are fields of target subsection, right?
I can guess only one possible common property there: text formatter. Are those input fields formatted? Telefonnummer does not look like it is a field type, only a text formatter. Am i correct?
Yes, sorry, of course it's a text formatter (got confused myself).
recognizes the token correctly but doesn't replace the value correctly.
Does that mean that token is left as it is, or simply removed from result string (without adding any value in place)?
Do those fields have value set, or are their values empty?
Also, could you paste both caption and data drop settings? Are there any unicode characters there (sorry that i ask so many questions, but it is kinda hard to guess what could go wrong :)?
I just tested it here, on our internal "ToDo" section, where each entry has SSM field called "depends on", that points to "ToDo" section:
{$done}: {$task} {$minutes-spent}
$done
is a checkbox, two other fields are text input fields (Symphony's default fields). It worked OK.
Are your fields text input or text area? Or something else (we use mostly Text Box fields here, and they seem to work OK too. Same for Reflection fields).
It also worked with:
{$done}: {$task} - {$more-info}
$more-info
is a Text Box field with chained text formatter (custom regex rules, markdown, etc...).
Okay, here we go with some additional information:
Both SSM fields have only a caption specified (droptext is left empty). They are set to:
constructable
destructable
draggable
searchable
multiple
nonquantifiable
Nested subsection are set to ignore
.
{$typ}: {$vorwahl}/{$nummer}
typ
= select box with 3 static values: Telefon, Telefax, Notfall
vorwahl
= single line Textbox field with Telefonnummer as Textformatternummer
= single line Textbox field with Telefonnummer as Textformatter (last field in section){$start}–{$ende}
start
= input field with /^(([0-1]?[0-9])|([2][0-3])):([0-5]?[0-9])$/
as validation ruleend
= input field with /^(([0-1]?[0-9])|([2][0-3])):([0-5]?[0-9])$/
as validation rule (last field in section)Okay, it has to do with the field position in the section: When I added another field (it doesn't matter of which type) as the last field of the section, the captions displays as expected (the newly added field is not part of the caption). Moving one of the caption fields to the bottom of the section removes it from the caption display again.
Good info, thanks for debugging that!
So your $start
field token was correctly replaced, only $ende
was not? Or did both fail to be replaced with correct values?
yes, only $ende
was left empty – and only if it was the last field in a section.
Expected result:
Telefon: 01234/56789
8:00-16:00
Given result:
Telefon: 01234/
8:00-
OK, thanks for debugging :). I found the reason. Looks like it is not a good idea to use array
value pointers and unset
array values in the same foreach
loop. Sorry for that.
GitHub closes issues automatically, so please reopen if my patch did not help (i tested it here with similar setup, found that bug shows up here too, and fixed it with patch listed above, so here it works OK now).
GitHub closes issues automatically.
It does so when you have things like fix #123
, fixes #123
or fixed #123
in your commit message.
Just pulled your changes and seems to work perfectly. Thanks!
Thanks :).
I've just updated to the latest development version and I'm having problems with captions. I've got this setup:
The first two are replaced correctly, the third not. This last field is a special field type (Telefonnummer).
It worked before – is there anything that needs adjustment on my side?