IRC logs

20141209

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

IRC log range: 20141209*

20141209

  • 09:11:39 <batjony> guys how can I use a view helper in a view helper ?
  • 09:28:36 <bjo3rn> batjony what are you trying to achieve?
  • 09:30:02 <batjony> i want to translate some labels inside my custom view helper
  • 09:30:22 <batjony> i guess i should inject the objectManager ?
  • 09:30:28 <bjo3rn> why not inject the..
  • 09:30:31 <bjo3rn> hehe, yes
  • 09:40:42 <NamelessCoder> the answer is LocalizationUtility
  • 09:54:39 <batjony> NamelessCoder: what is this "LocalizationUtility"
  • 09:55:42 <Xatenev> batjony: using the LocalizationUtility you can access your translation files
  • 09:55:45 <batjony> when i try to call the translate view helper with the objectManager, it throws error Fatal error: Call to a member function getRequest() on a non-object
  • 09:55:59 <Xatenev> for example: LocalizationUtility::translate("key"......)
  • 09:56:15 <batjony> Xatenev: nice 10x
  • 10:00:32 <NamelessCoder> generally speaking, don't ever instanciate another ViewHelper in a ViewHelper. In the case of VHS, all ViewHelpers which make sense as a shared base already have an abstract base class that you can use. Other ViewHelpers are so simple that you simply replicate the function it does - translate, trim, split arrays, format strings, whatever.
  • 10:01:50 <NamelessCoder> and finally, some viewhelpers are simply not designed to ever be used outside Fluid; they require a properly bootstrapped controller context and path setups which are only there if rendered as proper ViewHelperNodes.
  • 10:07:38 <Denyerec> Hey Claus
  • 10:07:40 * Denyerec waves
  • 10:07:59 <NamelessCoder> hey Den!
  • 10:08:39 <Denyerec> You will be relieved to hear I come only with hello's and not problems :)
  • 10:09:27 <NamelessCoder> hehe that's good, for both of us ^^
  • 10:13:31 <Denyerec> ;)
  • 10:13:32 <Denyerec> Is all well ?
  • 10:15:24 <batjony> NamelessCoder: 10x for the view helper's info
  • 10:16:33 <Xatenev> So much 10x
  • 10:16:33 <Xatenev> :p
  • 11:15:21 <Xatenev> Heya peeps
  • 11:15:23 <Xatenev> one question
  • 11:15:32 <Xatenev> I got my own extension to create some kind of content element
  • 11:15:51 <Xatenev> there is the class called contentobjectrenderer which always shows the "Header"
  • 11:15:58 <Xatenev> can i hide the header somehow?
  • 11:16:16 <Xatenev> (I got a header field in the backend which I use somewhere else, I don't want the header to be above the content
  • 11:16:23 <Xatenev> instead I want it to be in a special place which is defined inside my fluid template
  • 11:16:40 <Xatenev> but the contentobjectrenderer is just always rendering the header field at the very top of my element :(
  • 11:18:22 <NamelessCoder> if css_styled_content, you need to either remove the header or add a TS "if" sub-structure. If fluidcontent_core you need to override the Layout template file.
  • 11:21:04 <Xatenev> NamelessCoder: Can't I somehow remove it from the content element in my action?
  • 11:21:13 <Xatenev> Cause im definetly NOT familiar with typoscript :p
  • 11:21:28 <Xatenev> its css_styled_content i think btw
  • 11:25:28 <NamelessCoder> well sorry to say but you're fucked then
  • 11:25:39 <NamelessCoder> css_styled_content means you use TypoScript
  • 11:26:42 <Xatenev> :D
  • 11:26:46 <Xatenev> Well
  • 11:26:58 <Xatenev> How do I add such a ts if substructure?
  • 11:27:01 <Xatenev> cna u give me a hint there?^^
  • 11:27:34 <NamelessCoder> do a search for typo3 css typoscript conditional header
  • 11:27:54 <NamelessCoder> it's a four-five line expression and it depends on your list_type etc.
  • 11:28:12 <Xatenev> I get a lot of results on conditional comments
  • 11:28:14 <Xatenev> Is that what I want?
  • 11:28:21 <Xatenev> Don't think so or?^^
  • 11:29:11 <NamelessCoder> hehe the usual crap when searching for typo3 related info... everything uses generic terms
  • 11:30:20 <NamelessCoder> I think somebody posted a similar code example on fluidtypo3.org
  • 11:30:43 <Xatenev> But in normal content elements
  • 11:30:47 <Xatenev> I got osmething like "Hide header"
  • 11:30:54 <Xatenev> I can choose there from h1 - h6 or hide
  • 11:31:05 <Xatenev> Can't I somehow implement that into my custom CE?
  • 11:31:36 <NamelessCoder> I'm a little hesitant to start supporting css_styled_content setup ;)
  • 11:31:57 <NamelessCoder> the answer is that yes, you can implement this - but it is 100% native TYPO3 in the shape of TCA setup and TypoScript
  • 11:32:30 <Xatenev> :|^^
  • 11:32:51 <Xatenev> Maybe I can simply add a CSS class to the header?
  • 11:32:58 <Xatenev> which I then just put on display:none? ^^
  • 11:33:02 <Xatenev> Its dirty but it would be okay..^^
  • 11:33:03 <NamelessCoder> same situation: you need TypoScript
  • 11:33:12 <NamelessCoder> you're not getting around it as long as you keep using css_styled_content
  • 11:33:26 <Xatenev> Well lets go with ts then .p
  • 11:33:41 <Xatenev> Ive tried using lib.stdheader > already but it doesnt seem to hide the headline
  • 11:33:45 <NamelessCoder> sucks, but that's CSC for you
  • 11:33:53 <Xatenev> from what I know, it should hide every headline
  • 11:34:06 <NamelessCoder> depends on inclusion order among other things
  • 11:35:39 <Xatenev> The problem is, that I dont even know what to google for :D
  • 11:38:59 <NamelessCoder> I'm afraid CSC isn't user friendly in this case, it requires a great amount of TS knowledge and being able to relate it, before you can properly control it
  • 11:40:16 <Xatenev> NamelessCoder: Thats bad for me I guess
  • 11:40:16 <Xatenev> D:
  • 11:40:42 <NamelessCoder> https://fluidtypo3.org/library/code-examples.html?tx_fluidshare_display%5Bgist%5D=14&tx_fluidshare_display%5Baction%5D=display&tx_fluidshare_display%5Bcontroller%5D=Gist&cHash=4f3775e12c6aba6070d8682fb3ead64b is an example that replaces the entire wrapper based on a field's value, maybe that will hint you towards adapting that into lib.stdheader so it makes an empty header if list_type is your plugin
  • 11:51:59 <Xatenev> NamelessCoder: Solved!
  • 11:52:14 <Xatenev> I saw this line:
  • 11:52:28 <Xatenev> tt_content.myext_teaser { 10 = < lib.stdheader
  • 11:52:34 <Xatenev> and then I just wrote
  • 11:52:38 <Xatenev> tt_content.drivefce_teaser.10 >
  • 11:52:42 <Xatenev> which empties the header :)))
  • 11:59:03 <jmverges> hey there folks, good morning all
  • 11:59:13 <jmverges> Just I quick question
  • 12:00:09 <jmverges> I just add to sys_file_reference a categories field
  • 12:00:41 <jmverges> show, now I'm need to get the category selected from each sys_file_reference (images in this case)
  • 12:00:46 <jmverges> how could I do this=?ç
  • 12:06:17 <jmverges> no one?
  • 12:28:24 <braguzz> how can I render tt_content.text.20 without css_styled_content ?
  • 13:17:13 <pedda> hi there
  • 13:17:52 <pedda> if i define some flux settings via typoscript, ho do i label type = select options?
  • 13:18:05 <pedda> fields.myField.type = select
  • 13:18:31 <pedda> fields.myField.items = {key1: 'label 1'} doesn't work
  • 13:18:45 <pedda> is it possible at all ?
  • 13:26:46 <NamelessCoder> pedda the TS has to be a TS array
  • 13:31:41 <pedda> @NamelessCoder labels work now, but i get a FlexFormService Error and the FE remains blank
  • 13:32:27 <pedda> form.fields.myField.items.key1 = Label 1
  • 13:32:38 <pedda> form.fields.myField.items.key2 = Label 2
  • 13:32:52 <pedda> renders a labeled select box in backend with two options, as expected
  • 13:33:41 <pedda> bt then i get an error log message: PHP Fatal error: Cannot create references to/from string offsets nor overloaded objects in .../TYPO3.CMS.6.2.x/typo3/sysext/extbase/Classes/Service/FlexFormService.php on line 48
  • 13:47:00 <pedda> hmm
  • 13:47:18 <pedda> error disappeared probably some caching/faulty flexform issue
  • 13:56:16 <pedda> another question regarding displayCond in a ts based flux form declaration
  • 13:57:23 <pedda> my displayCond looks like this: myField2.displayCond = FIELD:myField:=:key2 but myField2 is dsiplayed even if displayCond is not met
  • 14:26:28 <s-andersen> I need my menu to be special for one specific page. If I make a checkbox in the flux configuration of that page, how do I access the property of that field when building the menu?
  • 14:38:47 <s-andersen> nevermind, Claus has already answered this question elsewhere: http://stackoverflow.com/questions/22489001/access-fluidpage-configuration-in-template
  • 14:43:54 <j6s> Am I correct, that I can not have a variable group for my FCE?
  • 14:44:42 <j6s> (read from my typoscript)
  • 15:04:05 <s-andersen> I'm having trouble using the content elements of the fluidbootstraptheme. Everything is fine in the backend, but it is not rendered in the front-end. Regular elements works fine. Any idea of what could be wrong?
  • 15:09:59 <soee> s-andersen: did not added static template ?
  • 15:12:25 <s-andersen> soee: I have added the static template
  • 15:12:43 <soee> cache cleard ?
  • 15:13:54 <s-andersen> soee: yes
  • 16:31:14 <mrboe> s-andersen: please use latest dev branch
  • 17:54:53 <cbleicker> erm, how to make a difference between translation files in cms? prefix/folder/ substructure in xlf?
  • 18:03:50 <NamelessCoder> cbleicker in which context?
  • 18:06:46 <cbleicker> ehm?
  • 18:08:28 <NamelessCoder> are you trying to change labels for TCA fields? Trying to change which file f:translate will use?
  • 18:08:57 <NamelessCoder> or did I misunderstand you and were you asking how to create each translation?
  • 18:09:22 <NamelessCoder> if its the latter, just copy locallang.xlf to locallang.de.xlf etc. and adapt ;)
  • 18:10:03 <cbleicker> using f:translate and cms always using the locallang.xfl. tried de.locallang.xlf
  • 18:10:08 <cbleicker> no effect
  • 18:10:18 <cbleicker> locallang.de?
  • 18:10:25 <NamelessCoder> rename to locallang.de.xlf and bob's your uncle
  • 18:10:43 <NamelessCoder> (don't forget to nuke the system cache)
  • 18:10:56 <cbleicker> https://github.com/TYPO3-extensions/powermail/blob/master/Resources/Private/Language/de.locallang.xlf ^^
  • 18:11:06 <cbleicker> so thsi is a crap extension? ^^
  • 18:11:15 <NamelessCoder> I can only assume powermail uses full LLL references
  • 18:11:31 <NamelessCoder> or that the translation file is redundant because it uses the translation server
  • 18:11:42 <NamelessCoder> I stand by my suffix info ;)
  • 18:12:02 <cbleicker> locallang.de.xml no effect
  • 18:12:06 <NamelessCoder> xlf
  • 18:12:13 <cbleicker> year
  • 18:12:20 <NamelessCoder> if this is not an xlf, everything goes into the same file
  • 18:12:23 <cbleicker> sorry.
  • 18:12:30 <cbleicker> it is xlf :)
  • 18:12:47 <NamelessCoder> ah ok. in that case, this should be working if your language key is indeed "de" and the language variable gets applied correctly
  • 18:12:55 <NamelessCoder> backend/frontend?
  • 18:12:58 <cbleicker> what does t3 use here? locale_all or internal language?
  • 18:13:11 <NamelessCoder> iirc, config.locale
  • 18:13:22 <NamelessCoder> stripped charset part
  • 18:19:06 <cbleicker> localization utility gets correct language de
  • 18:19:49 <cbleicker> works
  • 18:20:01 <cbleicker> its de.locallang.xlf ^^
  • 18:20:16 <cbleicker> and constants fucks me ^^
  • 18:25:25 <cbleicker> thanks, NamelessCoder
  • 18:38:50 <NamelessCoder> hehe I stand corrected