IRC logs

20141111

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

IRC log range: 20141111*

20141111

  • 08:41:42 <jmverges> good morning mates
  • 13:51:31 <batjony> guys can I set somehow a page template automatically based on the page type (doktype) ?
  • 13:53:34 <batjony> so for example if I have a page with doktype NEWS then automatically set a page template Private/Templates/Page/NewsPageTemplate.html
  • 13:54:05 <batjony> NamelessCoder: is it possible ?
  • 15:34:57 <batjony> someone could explain me why a syntaxis like:
  • 15:35:02 <batjony> {f:if(condition: '{record.starttime}', then: '{record.starttime}')} works
  • 15:35:21 <batjony> but when I try to format the date like:
  • 15:35:26 <batjony> {f:if(condition: '{record.starttime}', then: '{record.starttime}->f:format.date(format:'d-m-Y')')} - then doesn work
  • 15:35:38 <Akii> because of a syntax error
  • 15:35:51 <Akii> multiple in fact
  • 15:36:02 <Akii> {record.starttime -> f:for
  • 15:36:25 <batjony> Akii: what is the correct way ?
  • 15:36:31 <Akii> and escape the ' in the format like this: format: \'d-m..\')
  • 15:36:39 <Akii> ^ that
  • 15:37:51 <batjony> {f:if(condition: '{record.starttime}', then: '{record.starttime}->f:format.date(format:\'d-m-Y\')')} - also does not work
  • 15:38:04 <Akii> you overlooked my first line
  • 15:41:13 <Akii> also I think that you might need to prepend '@' in order to be parsed correctly
  • 15:41:28 <Akii> not so sure about that
  • 15:43:11 <batjony> btw if I try only this: {record.starttime -> f:format.date(format:'d-m-Y')} also does not work and says "1415708770" could not be parsed by \DateTime constructor "
  • 15:43:47 <Akii> exactly
  • 15:44:03 <batjony> hmm why it can not be parsed
  • 15:44:20 <Akii> try this {f:format.date(date: \'@{record.starttime}\', format:\'d-m-Y\')')}
  • 15:46:38 <batjony> with @ works
  • 15:46:46 <batjony> why does it happen like that
  • 15:47:18 <batjony> what does @ mean ?
  • 15:47:18 <Akii> I guess the DateTime constructor requires it
  • 15:47:39 <bjo3rn> record.date is a timestamp (integer) and not a DateTime object
  • 15:48:52 <batjony> @ in php means - just ignoring error
  • 15:48:58 <bjo3rn> not in this case
  • 15:49:30 <batjony> bjo3rn: and in this way @ mean convert the integer to datetime object ?
  • 15:49:40 <bjo3rn> if you pass a timestamp to DateTime you have to prepend it with @ to be parsed
  • 15:49:57 <bjo3rn> see the first comment here http://php.net/manual/de/datetime.settimestamp.php
  • 15:50:51 <bjo3rn> sorry, not first comment, first note
  • 15:50:53 <bjo3rn> http://php.net/manual/en/datetime.settimestamp.php
  • 15:51:55 <batjony> ya I see, 10x guys
  • 15:52:35 <batjony> bjo3rn: do you have also answer about my previous question, if I can set somehow a page template automatically based on the page type (doktype) ?
  • 15:52:47 <Guest|11377> Hi there, I have problems with assets and caching
  • 15:52:58 <Guest|11377> all my js and css files are included twice
  • 15:53:17 <Guest|11377> I've read on this chat, about it but without solution
  • 15:53:35 <jmverges> hey NamelessCoder, what about sysutils? is working?
  • 15:53:42 <bjo3rn> Guest|11377 this has been fixed in the current dev branch see https://github.com/FluidTYPO3/vhs/pull/712
  • 15:53:49 <bjo3rn> batjony sorry, no idea
  • 15:53:55 <batjony> ok
  • 15:54:07 <Guest|11377> Ok, thanks, I'll try that.
  • 16:27:25 <batjony> guys I have extended the pages table and added some images FAL field called 'featured_images', which works fine, but I have some troubles when trying to output 'featured_images' in a page template
  • 16:27:31 <batjony> what i am trying is http://pastebin.com/c2dNeydL
  • 16:27:35 <batjony> but doesnt work
  • 16:27:41 <batjony> no images are rendered
  • 16:29:51 <bjo3rn> what about that <f:then/>?
  • 16:30:46 <batjony> i dont see something wrong there
  • 16:31:10 <bjo3rn> then?
  • 16:31:26 <Akii> hihi <f:than/> hrhr
  • 16:31:39 <bjo3rn> I mean, that's not meant to be placed there, is it?
  • 16:33:10 <bjo3rn> why did you add it?
  • 16:34:36 <batjony> i think such syntaxis is supported
  • 16:34:37 <batjony> see https://github.com/bootstraptheme-for-typo3/fluidbootstraptheme/blob/development/Resources/Private/Templates/Content/ImageGallery.html#L34
  • 16:34:59 <batjony> this is the example which I have used and it works fine with content elements
  • 16:35:03 <bjo3rn> hehe, but there's a condition
  • 16:35:05 <NamelessCoder> you see the v:condition.type around it?
  • 16:35:18 <NamelessCoder> it matters ;)
  • 16:35:24 <bjo3rn> slightly
  • 16:35:28 <batjony> ops :)
  • 16:35:31 <bjo3rn> :)
  • 16:35:35 <Akii> also, content.resources.fal is closed early
  • 16:35:43 <bjo3rn> oh, yes.
  • 16:36:05 <bjo3rn> this template should make your server explode.
  • 16:36:07 <Akii> the amount of syntax errors is too damn high
  • 16:38:38 <batjony> again does not work
  • 16:38:39 <batjony> http://pastebin.com/AuQde5za
  • 16:39:33 <bjo3rn> because the fal viewhelper is still closed early
  • 16:40:35 <Akii> hasn't been mentioned yet ofc
  • 16:41:11 <bjo3rn> that's progressive enhancement
  • 16:41:42 <batjony> fixed it, all caches cleared http://pastebin.com/0tSFaYfs
  • 16:41:50 <batjony> i think we have fixed all the errors :)
  • 16:42:05 <bjo3rn> the question is: does it work?
  • 16:42:09 <bjo3rn> ^^
  • 16:42:14 <Akii> the question is: what does the fox say
  • 16:42:25 <NamelessCoder> oh no.
  • 16:42:26 <batjony> no doesnt work
  • 16:42:38 <bjo3rn> holy guacamole!
  • 16:43:42 <NamelessCoder> no offense but that's the worst error description you can possibly give a developer ;)
  • 16:43:59 <Akii> I've seen worse
  • 16:44:25 <NamelessCoder> "I accidentally the whole bottle"? :o
  • 16:44:29 <batjony> there are no errors, but also no images are rendered
  • 16:44:42 <Akii> NamelessCoder: repeatedly
  • 16:44:45 <NamelessCoder> batjony what does {images} contain before the condition?
  • 16:44:52 <bjo3rn> but we also had 'oops, I fixed it!'
  • 16:44:52 <NamelessCoder> Akii yeah like the whole bottle lol
  • 16:44:57 <NamelessCoder> is that bad?
  • 16:45:21 <batjony> NULL :)
  • 16:45:36 <batjony> <f:debug>{images}</f:debug> is NULL
  • 16:45:56 <NamelessCoder> alright, this should give you a clue
  • 16:46:27 <batjony> but i see them when I edit the page
  • 16:46:50 <NamelessCoder> that's also a clue
  • 16:47:12 <NamelessCoder> the problem is in your viewhelper that assigns the {images} variable. It's in the usage.
  • 16:47:52 <batjony> somethign is wrong here <v:content.resources.fal field="featured_images" record="{record}" as="images">
  • 16:47:57 <NamelessCoder> so what property might you be missing to make this a valid usage?
  • 16:48:22 <batjony> table="pages" ?
  • 16:48:46 <NamelessCoder> no, that would load your images from the page, not the content element. I assume you ARE building a content element since you're using v:CONTENT.resources.fal?
  • 16:49:27 <bjo3rn> at the end of the day that should be the same, doesn't it?
  • 16:49:29 <batjony> no, i am just trying to render some of the page properties in a fluid page template
  • 16:50:09 <NamelessCoder> bjo3rn each of the content/page specific viewhelpers perform slightly different lookups and have different defaults - most obviously, the table parameter has a different value
  • 16:50:09 <batjony> oo ya I see, I cant use v:content.resources.fal in this case ?
  • 16:50:22 <NamelessCoder> which is why if you use the content VH in a page content you get what batjony gets
  • 16:50:29 <NamelessCoder> switch to https://fluidtypo3.org/viewhelpers/vhs/development/Page/Resources/FalViewHelper.html batjony
  • 16:50:31 <bjo3rn> sure, but in this case it's the only difference. the default table
  • 16:50:39 <NamelessCoder> it's the VITAL difference
  • 16:51:21 <bjo3rn> ja-haa. what I am trying to say is that table="pages" would work as well with the content.fal dealio
  • 16:51:24 <bjo3rn> ^^
  • 16:51:39 <Akii> hehe
  • 16:51:43 <bjo3rn> semantics aside
  • 16:51:52 <Akii> Cat\Grumpy::NO
  • 16:51:52 <NamelessCoder> default table as well as default fieldname
  • 16:52:26 <NamelessCoder> but you are correct: you can make content.resources.fal, page.resources.fal and resources.record.fal work exactly the same way if you assign every argument
  • 16:52:29 <bjo3rn> yeah, that's like poking the cube into the round hole in that kid's toy
  • 16:52:46 <NamelessCoder> you can "there, I fixed it" it ;)
  • 16:53:12 <bjo3rn> exactly. let's not confuse him more than he is. NamelessCoder is right.
  • 16:53:42 <NamelessCoder> http://1.bp.blogspot.com/-Qqarp01dujE/UR0JKgI_PyI/AAAAAAAAB-A/TsUvAAL1Qdk/s1600/wd40-duct-tape-combo.jpg
  • 16:53:52 <batjony> again does not work http://pastebin.com/jiGLV3qX
  • 16:53:59 <batjony> renders nothing
  • 16:54:20 <NamelessCoder> is {record} correct?
  • 16:54:36 <NamelessCoder> you can't just copy/paste any example, gotta check that your variable scopes are okay
  • 16:55:31 <batjony> ya its correct
  • 16:56:31 <batjony> unfortunetely i have to go, tomorrow I will continue, but all variables are tested and the images really exist
  • 16:56:41 <batjony> have a nice evening guys and 10x for the help
  • 16:56:51 <NamelessCoder> yw, good luck when resuming :)
  • 16:57:14 <batjony> 10x
  • 16:57:49 <Akii> I think that means 10 whole bottles
  • 17:00:17 <NamelessCoder> he accidentally the whole 10 bottles
  • 17:00:35 <NamelessCoder> http://knowyourmeme.com/memes/i-accidentally
  • 17:01:18 <bjo3rn> lol
  • 17:01:39 <Akii> haha
  • 17:01:49 <Akii> "you did what?" - "my whole super nintendo"
  • 17:01:58 <Akii> that's one meme I haven't seen in a while
  • 17:02:12 <NamelessCoder> DERP!
  • 17:02:18 <NamelessCoder> invented by south park
  • 17:37:48 <jmverges> NamelessCoder, do you plan to move sysutils to 6.2 ?
  • 17:38:02 <jmverges> https://github.com/TYPO3-coreapi/ext-coreapi/issues/26
  • 17:45:19 <tbrodard> Hi everyone,
  • 17:47:06 <tbrodard> Dilemna: my partner is for creating a standard extbase domain model, with record, TCA, ... and so on, but I'm "tired" to repeat again and again the same things for each plugin. Can Flux / Fluidcontent be used to "replace" the standard way to create Extbase plugins ?
  • 17:47:36 <tbrodard> i.e.: can Flux be used to define the Flexform of a standard plugin ?
  • 18:08:23 <gbod> tbrodard: Yes, flux can be used for this kind of thing.
  • 18:08:57 <tbrodard> Do you have a link to an example ?
  • 18:10:47 <gbod> tbrodard https://github.com/dohomi/flux_galleria
  • 18:12:16 <gbod> tbrodard: And for the model and tca - https://github.com/FluidTYPO3/fluidshare
  • 18:27:45 <tbrodard> OK, thanks, I will have a look at them
  • 19:54:18 <ulrikkold> is there a good (and/or simple) explanation as to why I get no RTE features when I use <flux:field.text enableRichText="1" label="textareaName"/> in my site provider extension?