IRC logs

20140920

Logs from channel #fedext on freenode - our official support channel.

IRC log range: 20140920*

20140920

  • 07:56:02 <Romm> Hey :)
  • 07:56:09 <Romm> Anyone there ?
  • 08:02:01 <bjo3rn> yep, shoot
  • 08:03:14 <bjo3rn> Romm?
  • 08:19:41 <bjo3rn> ok, next time ^^
  • 08:28:43 <Romm> Hey bjo3rn, still there ? :p
  • 08:29:02 <Romm> I have a question about Fluid inline usage
  • 08:30:08 <Romm> I want to call a ViewHelper in an inline condition
  • 08:30:23 <Romm> I tried several things, including the one below:
  • 08:30:27 <Romm> arguments="{label: '{f:if(condition: field.errors, then: sf:errorMessage(errors: {field.errors}), else: \'\')}'}"
  • 08:30:41 <Romm> But it ain't working :/
  • 08:33:46 <Romm> If there is no solution, I can call the ViewHelper in my section, but I wanted to know if I can do it this way :)
  • 08:34:23 <bjo3rn> hi Romm
  • 08:35:13 <bjo3rn> sf:errorMessage is another viewhelper, right?
  • 08:35:56 <Romm> Yup, one of my own
  • 08:36:14 <bjo3rn> try wrapping that one in '{sf:errorMessage()}'
  • 08:36:26 <bjo3rn> (including the quotes)
  • 08:36:29 <Romm> Ok
  • 08:36:35 <Romm> Quotes need to be escaped I guess ?
  • 08:36:46 <bjo3rn> no, not there
  • 08:37:08 <Romm> ok
  • 08:37:10 <bjo3rn> ah, wait
  • 08:37:32 <bjo3rn> I'd first try to use the condition outside of the label to see it's working
  • 08:37:41 <bjo3rn> then fiddle with the quoting
  • 08:38:23 <bjo3rn> fx double quotes for the label argument and single quotes inside
  • 08:38:37 <bjo3rn> the proper nesting is important
  • 08:38:42 <Romm> Yup I got an exception with not escaped quotes, but now I got something interesting
  • 08:39:02 <Romm> I run into the ViewHelper
  • 08:39:47 <bjo3rn> that means?
  • 08:39:55 <Romm> #1: PHP Warning: implode(): Invalid arguments passed in [...]typo3conf/ext/site_factory/Classes/ViewHelpers/Be/ErrorMessageViewHelper.php
  • 08:39:58 <Romm> :)
  • 08:40:18 <Romm> Meaning function is called, but argument seems to be null
  • 08:40:51 <bjo3rn> nah, '{field.errors}' with quotes please ;)
  • 08:41:19 <Romm> Oh right
  • 08:41:29 <bjo3rn> or field.errors without braces and quotes (better)
  • 08:43:18 <Romm> Yeah working ! =)
  • 08:43:24 <bjo3rn> yay!
  • 08:43:30 <Romm> Great, thanks man :)
  • 08:43:36 <bjo3rn> yw :)
  • 08:44:17 <Romm> Have a nice day ^^
  • 08:44:42 <bjo3rn> rule of thumb: if the argument is a variable use it as is. if it needs to be rendered (strings fx) use braces and quotes.
  • 08:44:54 <bjo3rn> thanks, same to you
  • 08:45:07 <Romm> Ok I'll remember the tip :)