IRC logs

20150811

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

IRC log range: 20150811*

20150811

  • 04:04:48 <mneuhaus> NamelessCoder: how'd you go about a "generic" way to provide access to the "request" inside viewHelpers? i know fluid standalone doesn't have a request anymore. but i kind of need a way to read request arguments like page, sortBy, order, limit, search, filter
  • 05:46:10 <NamelessCoder> mneuhaus $this->renderingContext->getView() and let the View contain the Request if you need it. As it is default, the View is decoupled from everything Request-context related except for knowing the controller, action and format (which it uses to resolve our MVC-based template locations)
  • 05:46:41 <NamelessCoder> alternatively, insert it into ViewHelperVariableContainer as a stored variable; inserted by the View as well
  • 05:47:12 <NamelessCoder> and finally, if we are in TYPO3 context with your question, $this->controllerContext exists on ViewHelpers (but only in TYPO3)
  • 05:47:13 <mneuhaus> hmm, yea kinda figured a way like that :)
  • 05:47:40 <mneuhaus> well, i'd like to keep it open/flexible this time around ;D
  • 05:47:51 <NamelessCoder> but you can get to the View instance from within ViewHelpers and that's an extremely transparent way of doing such a thing
  • 05:47:59 <NamelessCoder> e.g. ControllerActionView ;)
  • 05:48:18 <mneuhaus> yep, i think something like that makes sense, maybe even as a trait
  • 05:48:41 <mneuhaus> i already toyed with the idea to move quite a bit of logic out of the "controller" area towards the view area
  • 05:48:51 <NamelessCoder> Traits are good but lets avoid them since we have none at this point
  • 05:48:54 <mneuhaus> so the controller is only used to fetch/store data
  • 05:49:13 <NamelessCoder> hehe tread carefully now ;)
  • 05:49:46 <mneuhaus> isn't as bad as it sounds ;)
  • 05:50:16 <mneuhaus> what i mean is, that the fluid viewhelper, etc are quite "self-sufficiant"
  • 05:50:52 <mneuhaus> i'm creating a QueryInterface and ResultInterface that the table output expects to iterate/modify
  • 05:51:29 <mneuhaus> which is just a basic "proxy" between a Doctrine query, some NoSQL, filesystem, simple array, whatever
  • 05:55:50 <NamelessCoder> sounds like this may fit in a custom VariableProvider
  • 05:58:35 <mneuhaus> hmm, not sure
  • 05:59:24 <mneuhaus> "all i need" is an iteratable object with a common api for rendering a table
  • 06:00:05 <mneuhaus> so, it needs to be iteratable and i need to be able to set limit, offset, order, and maybe search/filter stuff
  • 06:01:20 <mneuhaus> so i was thinking to use a common pattern kinda like: EntityQuery('MyEntity')->execute() which gives me an EntityResult i can iterate over and a method EntityResult->getQuery() to refine the query with limit, offset, etc
  • 06:01:47 <mneuhaus> that's basically exactly what i do currently in the flow version of expose which makes sense imho
  • 06:02:28 <NamelessCoder> since this *is* a View I would prefer something that only works with predefined queries or query types
  • 06:02:40 <NamelessCoder> e.g. .all, .single.$uid, whatever
  • 06:02:50 <NamelessCoder> (as variables accessed in template)
  • 06:03:25 <mneuhaus> it is, the EntityResult is assigned as {items} in the template
  • 06:03:40 <NamelessCoder> that's not what I mean :)
  • 06:04:13 <NamelessCoder> {myRepository.query.all}
  • 06:04:42 <mneuhaus> hmm, ok
  • 06:04:48 <NamelessCoder> it gets quite hard to debug, but it has a very safe api
  • 06:05:02 <NamelessCoder> e.g. no parameters except what you define as "variable path segments"
  • 06:05:51 <mneuhaus> how'd you go about this then?
  • 06:05:51 <mneuhaus> https://github.com/mneuhaus/Flowpack.Expose/blob/master/Classes/Flowpack/Expose/ViewHelpers/BehaviorViewHelper.php#L46-L67
  • 06:07:02 <mneuhaus> i fetch the defined objects/items from the current view, which usually was a QueryResult. i then fetch the Query from that and pass that through the QueryBehaviors to modify it if needed with limit, offset, sortBy, etc
  • 06:07:41 <NamelessCoder> not sure I understand the logic
  • 06:07:42 <mneuhaus> then inside the BehaviorViewHelper i override the original items/objects with the result of the modified query
  • 06:08:06 <mneuhaus> wait, i'll sketch some pseudo code
  • 06:08:36 <NamelessCoder> you retrieve a template variable, then overwrite it and use it, but never restore the original... so this works like a cumulative filter, i.e. the more instances of the ViewHelper you use on the same $objects, the smaller that set becomes.
  • 06:08:52 <mneuhaus> basically yes
  • 06:09:13 <NamelessCoder> defining the desired PHP class name is quite risky imho
  • 06:09:16 <NamelessCoder> in a template
  • 06:09:59 <mneuhaus> https://gist.github.com/mneuhaus/586cb19bd9e856af9afa#file-4_processviewhelper-md
  • 06:10:22 <mneuhaus> i used to call them "ProcessViewHelpers" in my original idea/concept
  • 06:11:01 <mneuhaus> which QueryBehaviors are applied will probably be moved to the expose settings for a entity
  • 06:11:26 <NamelessCoder> hmm.
  • 06:11:39 <NamelessCoder> hmmmm...
  • 06:11:49 <NamelessCoder> I still think this mostly relates to VariableProvider
  • 06:12:00 <mneuhaus> the idea behind this is to seperate logic that is used again and again into reusable parts
  • 06:12:05 <NamelessCoder> + a ViewHelper to do the interaction with your data source
  • 06:12:06 <mneuhaus> sorting, pagination, etc
  • 06:13:00 <mneuhaus> hmm, ok, so i'll create a VariableProvider that gets objects in form of a QueryResult for example and i interact with the VariableProvider to tell it i only want 10 of the results starting from 30?
  • 06:13:02 <NamelessCoder> what if a VariableProvider had DataSourceInterface[] and DataSourceInterface declared these unified methods you can do to a generic source of data.
  • 06:13:12 <NamelessCoder> yes baby that's it ;)
  • 06:13:22 <mneuhaus> hmm, ok
  • 06:13:35 <mneuhaus> can a view have multiple VariableProvider?
  • 06:13:39 <mneuhaus> or just one?
  • 06:13:47 <NamelessCoder> currently just one
  • 06:13:55 <NamelessCoder> but why the hell not let it support more.
  • 06:14:08 <mneuhaus> would prefer that in that case i think
  • 06:14:34 <mneuhaus> because if you add a ExposeVariableProviderWhatever, you still might want to add generic variables
  • 06:14:41 <NamelessCoder> you could then ship your solution as a VariableProvider, the DataSourceInterface and X number of ViewHelpers to paginate, limit, filter by attributes, etc.
  • 06:15:03 <mneuhaus> sounds good i guess :)
  • 06:15:36 <mneuhaus> if only one provider is possible the ExposeVariableProvider would need to support default/other variable logics as well
  • 06:15:38 <NamelessCoder> and obviously require the interface in the ViewHelper so you've got full control over the expected input
  • 06:15:48 <mneuhaus> of course ;)
  • 06:17:08 <NamelessCoder> I'm thinking if there's a way to avoid multiple providers. It would obscure the logic in f:debug, would make it hard to predict when there are collisions too.
  • 06:18:12 <mneuhaus> i mean the expose one could just extend the default one, would probably solve 90+% of usecases
  • 06:18:14 <NamelessCoder> ...without making DataSourceInterface part of Fluid
  • 06:19:28 <mneuhaus> i guess extending should be fine
  • 06:19:50 <NamelessCoder> yeah but TYPO3 already does this so the solution would need a TYPO3-specific version too.
  • 06:20:01 <NamelessCoder> that's the not-so-great part
  • 06:20:36 <NamelessCoder> VariableProvider was *meant* to be replaced, to be viewed like a crazy dynamic arrayobject-type storage you can manipulate from the outside, too.
  • 06:21:07 <mneuhaus> instead of extending i could make it a "fallback" inside it, if !hasVariable -> fallback->hasVariable
  • 06:21:09 <NamelessCoder> I'll think about this.
  • 06:21:24 <NamelessCoder> but make VariableProvider your API, then we can solve the integration details later
  • 06:21:33 <mneuhaus> ok
  • 06:21:35 <mneuhaus> :)
  • 06:22:03 <mneuhaus> looking forward to a dead-fast standalone expose ;)
  • 06:22:20 <NamelessCoder> "sans controller" ;)
  • 06:22:28 <NamelessCoder> making a custom one for the purpose?
  • 06:22:51 <pedda> hi there
  • 06:22:58 <mneuhaus> currently i'm using nickic's fastRoute router and a little bit of glue here and there
  • 06:23:12 <mneuhaus> as barebone as possible
  • 06:23:43 <mneuhaus> when it's running barebone i'll think about integrating it into extbase to test it
  • 06:28:37 <NamelessCoder> as long as you do some sort of Request interaction I suppose that's fine. We would then trust whatever is around Expose to actually make the Request safe ;)
  • 06:28:41 <NamelessCoder> hey pedda
  • 06:29:02 <pedda> hey claus, long time no see, i hope you're well
  • 06:29:14 <NamelessCoder> can't complain :)
  • 06:29:26 <mneuhaus> yes, request safety is not the job of expose + i won't pretend i'd be able to harden all those edge-cases
  • 06:30:28 <NamelessCoder> ooooohmama... ooooooooohmama! My 40" 4K display is coming tomorrow if all ends well
  • 06:30:37 <mneuhaus> :D
  • 06:31:09 <NamelessCoder> http://www.philips.com.au/c-p/BDM4065UC_75/brilliance-led-backlit-lcd-display and it's only €800. Not kidding.
  • 06:31:39 <mneuhaus> nice :)
  • 06:31:45 <NamelessCoder> 50% more pixels than I have now, in both directions :)
  • 06:31:48 <mneuhaus> ^^
  • 06:32:00 <mneuhaus> currently mainly working on my macbook retina only
  • 06:32:09 <mneuhaus> way to much agency-hopping
  • 06:32:09 <NamelessCoder> of course I bought a wall mount because that stand is just crap looking
  • 06:33:50 <pedda> i boouth two 27" 4K recently and some ergotron mount for those.. but my mbp can't fire up two screens at 4K resolution :-/
  • 06:34:16 <pedda> -boouth + boght
  • 06:34:49 <pedda> god damnit... imy fingers seem too fat today again
  • 06:35:24 <pedda> did you test your 40" screen before somehow ?
  • 06:36:10 <NamelessCoder> nope, I read some insane-level expert reviews so I'm just trusting the numbers
  • 06:36:19 <pedda> so did i
  • 06:36:20 <NamelessCoder> if it fails or sucks, I've got 14 days return
  • 06:36:24 <mneuhaus> afk, lunch
  • 06:36:51 <pedda> my font seems a bit unsharp by now.. but it may be related to my mbp running those screens at half teh maximum resolution
  • 06:37:02 <pedda> *the
  • 06:37:13 <NamelessCoder> I don't expect it to perform as well as my thunderbolt cinema display. So my expectations are as they should be, given the price, size, 4K immaturity etc.
  • 06:37:19 <pedda> DELL 27" 4K with IPS panel
  • 06:37:35 <NamelessCoder> those are some great displays though
  • 06:37:42 <pedda> ah well.. this was my conclusion as well..
  • 06:38:08 <pedda> i would give my screens a B+
  • 06:39:50 <pedda> and i hope for better performance when i'm in the need of a new computer which then, hopefully, will be able to power external 4K displays at 60 Hz
  • 06:43:49 <NamelessCoder> mac pro :)
  • 06:44:01 <NamelessCoder> because dual thunderbolt busses
  • 06:45:54 <pedda> well the price... and the portability :)
  • 06:46:17 <pedda> but... you're right
  • 06:46:17 <NamelessCoder> mac pro + macbook!
  • 06:46:26 <NamelessCoder> be like me, be like me, be like me!
  • 06:46:39 <pedda> lol
  • 06:47:05 <pedda> wel i have an imac which is used to play music a the moment
  • 06:47:40 <pedda> i realized, syncin my dev env on two computers just takes too uch time/effort
  • 06:48:27 <pedda> maybe i've not the best setup to work on both computers with just a short delay of transition from one computer to another
  • 06:51:40 <NamelessCoder> I don't do it myself, but you could easily use git to track all your dot-files and Library/Xyz folders. And you could equally easily use something like composer to load every repository you work on.
  • 06:52:04 <NamelessCoder> but I know, one machine is easier. It's also all eggs in the same basket :)
  • 06:52:14 <pedda> exactly
  • 06:53:34 <pedda> all my projects are versioned so, fetching files, stying up to date is not that hard, bad as soon as you add some bookmark to sequel pro, or some editor config.. you need to extend your sync-config or add that bookmark on both computers which is a bit annoying
  • 06:53:51 <pedda> but as you said, it's just a matter of configuration
  • 06:54:05 <pedda> some scripting magic, and wer're in
  • 06:54:08 <pedda> -r
  • 06:54:49 <pedda> mmmh .. a mac "the power horse" pro on my table..
  • 06:54:50 <pedda> :D
  • 06:56:00 <NamelessCoder> it's fast. I mean... FAST.
  • 06:56:07 <pedda> i bet it is
  • 06:56:35 <pedda> the only thing which is missing is a sound like some muscle car durong boot
  • 06:56:39 <pedda> *during
  • 06:56:53 <pedda> probably, because there is no "boot process" anymore
  • 06:57:13 <pedda> or better say, it is too short to play some sound..
  • 06:57:42 <NamelessCoder> yeah, 4 seconds is not a lot of time
  • 06:57:59 <pedda> lol.. just imagine the beginning of your career where you were waiting 2-3 minutes while windows2K was booting..
  • 06:58:06 <pedda> what a waste of time
  • 06:58:31 <pedda> which probably was not at the beginning of your carerr, but rather mine
  • 06:58:42 <pedda> :)
  • 06:58:42 <NamelessCoder> not that I reboot often, but I've probably saved many hours by now during phpstorm indexing and unit test running.
  • 06:58:56 <NamelessCoder> hehe when I began, 3 minutes would be lucky :)
  • 06:59:12 <pedda> there was a turbo button once..
  • 06:59:19 <NamelessCoder> that'd be "the good computer" among all the crap ones
  • 06:59:26 <pedda> hehe
  • 06:59:30 <NamelessCoder> two of my PCs had turbo buttons hehe
  • 06:59:48 <pedda> like nitro for cars ;)
  • 07:00:31 <NamelessCoder> all fun and games, that button
  • 07:02:39 <pedda> the first time i turned on my mbp (early 2015) i was like: dude! if the time, you spent waiting for your imac to finish indexing and such, was added, you could have boght two of those mbp's
  • 07:03:12 <pedda> althought my imac was late 2012
  • 07:03:19 <pedda> which is only 3 years
  • 07:03:50 <artisticMink> Hello, after updating to 7.1 from 6.X i'm unable to add new content elements to a page. Old CE are displayed flawlessly. I went trough the migration sheets and validated my markup. It might have to do with the issue that my custom content controller doesn't get recognized as well. Methods won't get called. Where the similiar issues in the past?
  • 07:04:51 <pedda> artisticMink in such cases i get the latest version of EXT:builder to check if a bare extension generated by EXT:builder looks the same as my older provider extension
  • 07:06:07 <pedda> if your controlles actions aren't called, check if the fce you're playing around is stored the correct way in the database
  • 07:06:49 <artisticMink> pedda: I already tried examples from the documentation but you're right. I'll should give it a try.
  • 07:07:00 <pedda> speaking of : Vendor.ExtensionNAme->MyFce.html
  • 07:07:11 <pedda> or without vendor and stuff like this
  • 07:07:48 <pedda> fix such a record and see if DebuggerUtility in your fce's action makes it to the frontend
  • 07:08:52 <pedda> if it does use this to have a one liner ;)
  • 07:08:52 <pedda> https://gist.github.com/wikipeter/b8119e2d1d64ae3be309
  • 07:09:59 <NamelessCoder> pedda could you submit that gist to the code library please?
  • 07:10:03 <pedda> also suitable if you rename an extension for whatever reason.
  • 07:10:07 <pedda> sure
  • 07:10:54 <NamelessCoder> thanks :)
  • 07:24:23 <pedda> @NamelessCoder: done
  • 07:24:51 <pedda> additionally you could change "Entry created! Please allow a bit of time for the web master to approve the submission." to "Entry created! Please allow a bit of time for the master to approve the submission." ;)
  • 07:25:10 <NamelessCoder> hehe :p
  • 07:26:23 <pedda> claus? regarding https://github.com/FluidTYPO3/flux/issues/878
  • 07:26:56 <pedda> is this really an issue? i mean. my code is okay, behaviour is wrong?
  • 07:28:03 <pedda> as i was wondering if this was my fault... which happens still quite often, working late at night :P
  • 07:28:27 <NamelessCoder> I don't know yet - lunch is over for today but if I get time later I'll look at it
  • 07:29:09 <pedda> well .. this is not urgent anymore.. but i just wanted to know
  • 07:47:25 <xaver> hi
  • 08:08:12 <mneuhaus> re
  • 08:08:12 <FT3BOT> Welcome back mneuhaus!
  • 08:19:41 <Guest|98765> !
  • 12:03:37 <Kaimane> When I set the icon option to a flux:form like options="{icon: '{f:uri.resource(path: \'Icons/Content/Icon.png\')}'}" the icon will not be shown in the backend. The image src is "../typo3conf/ext/myext/Resources/Public/Icons/Content/Icon.png" but the browser tries to load it from http://dev.local/typo3/sysext/cms/typo3conf/ext/myext/Resources/Public/Icons/Content/Icon.png". I'm using the latest
  • 12:03:37 <Kaimane> vhs, flux, fluidpages und fluidcontent extensions from TER.
  • 12:23:44 <pedda> specify ExtensionName attribute on f:uri.resource if it works then, your extension is not properly implemented regarding namespacing
  • 12:23:52 <pedda> gotta run
  • 12:23:54 <pedda> cu guys
  • 12:35:14 <Kaimane> With extensionName attribute on f:uri.resource it doesnt work either.
  • 12:59:12 <xaver> Kaimane: remove the icon path and add icon with smae name as the file
  • 12:59:25 <xaver> should be resolved automaticly
  • 13:30:43 <thierry> Any hint why the "admin panel" buttons aren't displayed for fluidcontent_content CType ? It's tt_content, after all ;-)
  • 13:35:41 <xaver> thierry: looks nearly the same fluidcontent_core and csc - maybe addionalconfigruation is fcc stuff
  • 13:35:44 <xaver> 2 lines
  • 13:36:36 <thierry> My fault: didn't try fcc at this time ... !
  • 14:41:40 <mneuhaus> NamelessCoder: workin on the variableProvider stuff, hitting a first bump, what, if i want to show to lists of objects on in the same template? the way the variableProvider would be set up, it would be just for one resultSet
  • 15:34:32 <mneuhaus> NamelessCoder: found another issue regarding using a variableProvider:
  • 15:35:37 <mneuhaus> currently the AbstractTemplateView creates a new StandardVariableProvider for rendering sections and partials which makes the initially set VariableProvider not accessable anymore
  • 15:36:30 <mneuhaus> sorry for spamming you ;)