IRC logs

20150701

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

IRC log range: 20150701*

20150701

  • 05:37:20 <fger> hi guys ... simple question: how do i receive a GET-Parameter value inside a fluidcontent element ?
  • 05:37:39 <fger> i pass it with a f:link.page additionalParams construct from another page
  • 05:38:18 <fger> dont find it in any context - does it have to be prefixed with some tx_fluidcontent_.... or do I need a controller inside my provider extension to pass it ?
  • 05:45:25 <bjo3rn> fger that smells like a content controller although I'm not sure if the current request is available then.
  • 05:51:29 <fger> I did a ContentController in my provider extension and extended the fluidcontent-ContentController. added a myelementAction($myVariableToPass) and am now determining the right additionalParams-syntax in my link.page viewhelper
  • 05:51:33 <bjo3rn> on the other hand you can access the superglobals like $_GET in a content controller *shiver*.
  • 05:52:54 <fger> oh nice security flaw then ;) ...
  • 05:53:07 <bjo3rn> yeeehaw!
  • 05:56:12 <bjo3rn> GeneralUtility::_GET('foo') maybe?
  • 06:07:39 <fger> hmm... i added a controller to my provider extension but it isnt recognized
  • 06:09:18 <fger> looked into the fluidbootstraptheme extension https://github.com/bootstraptheme-for-typo3/fluidbootstraptheme/blob/development/Classes/Controller/ContentController.php
  • 06:09:29 <fger> and inside its ext_tables.php and did it the same way
  • 06:09:49 <bjo3rn> probably an issue with namespaces?
  • 06:11:20 <fger> i register it with XY.XYtemplates in ext_tables.php
  • 06:11:35 <fger> and in my controller: namespace XY\XYTemplates\Controller...
  • 06:11:44 <bjo3rn> looks fine
  • 06:11:49 <fger> its in the correct folder inside Classes/Controller
  • 06:11:56 <fger> ContentController.php
  • 06:13:05 <bjo3rn> \FluidTYPO3\Flux\Core::registerProviderExtensionKey('XY.XYTemplates', 'Content'); ?
  • 06:14:40 <bjo3rn> btw. the action can't have any arguments
  • 06:23:23 <NamelessCoder> fger you need to nest the parameters in a tx_yourext_content[arg] way
  • 06:23:38 <NamelessCoder> raw query parameters are not intended to be available in any Extbase controller
  • 06:23:48 <NamelessCoder> (if you need that, GeneralUtility::_GET)
  • 06:24:27 <NamelessCoder> to check which scope is expected you can for example generate a link from your controller via UriBuilder or some f:link.action or something in the template that belongs to it
  • 06:51:16 <fger> hmm my problem is more that the controller action isnt weven called
  • 06:54:13 <fger> I'm now transmitting GET-Param called ?tx_XYtemplates_content[discussionID]=6
  • 06:58:55 <NamelessCoder> the controller class name has to match the extension key you register in ext_localconf.php, maybe you left out the "Vendor." part? Maybe the controller class is not named or placed correctly - or maybe the action method is protected or incorrectly named.
  • 06:59:22 <NamelessCoder> e.g. no "Action" suffix on the method. It has to be 100% extbase style.
  • 06:59:49 <fger> i did it like in fluidbootstraptheme
  • 06:59:51 <fger> all fine
  • 06:59:54 <NamelessCoder> gotta go - but pretty sure you will find the cause in one of those things ;)
  • 06:59:56 <fger> ContentController.php
  • 07:00:01 <fger> ok thx
  • 07:00:03 <NamelessCoder> can be a simple typo in filename or class
  • 07:00:11 <fger> probably
  • 07:03:22 <fger> and no, i dont even have an ext_localconf.php
  • 07:03:30 <fger> just like fluidbootstraptheme only exT_tables.php
  • 07:03:43 <fger> \FluidTYPO3\Flux\Core::registerProviderExtensionKey('FluidBT.Fluidbootstraptheme', 'Content');
  • 07:03:53 <fger> i register my extension the same way
  • 07:04:06 <fger> and have XY\XYTemplates\Controller as namespace
  • 07:10:38 <fger> ok, debugged it with xdebug ... my ContentController is called, but not my action
  • 07:10:42 <fger> will dig into that
  • 07:12:32 <bjo3rn> fger what is the name of your element's template file?
  • 07:21:35 <fger> the action name is forumDetailAction()
  • 07:21:44 <fger> template file name is .../ForumDetail.html
  • 07:33:15 <fger> seems right, doesnt it ? at which point is any custom controller/FCE ActionName generated ?
  • 08:10:01 <bjo3rn> fger that's correct indeed. hm...
  • 08:33:31 <NamelessCoder> fger whatever the reason may be... https://github.com/FluidTYPO3/flux/blob/development/Classes/Controller/AbstractFluxController.php#L271 might be getting the wrong context so if you're debugging I would start there
  • 08:45:30 <Tjark> hi, i just tested my provider ext. with Custom FCE´s in TYPO3 7.x (7.0, 7.1 and 7.3).
  • 08:45:30 <Tjark> I can select my FCE´s, but the flux fields are not visible.
  • 08:45:30 <Tjark> Any Ideas ?
  • 08:49:04 <fger> @namelesscoder: wow this is strange .. the renderAction of the AbstractFluxController isnt called at all, i cleared cache and did an xdebug breakpoint there ... doesnt work
  • 08:49:14 <bjo3rn> Tjark we released a bugfix today (4.2.4) please try that.
  • 08:51:04 <Tjark> @bjo3rn wow nice
  • 08:54:36 <Tjark> awesome, it works!
  • 09:03:44 <fger> ah, the resolveFluxControllerClassNameByExtensionKeyAndAction returns NULL
  • 09:18:51 <fger> seems it tries to resolve class "Tx_XYtemplates_Controller_PageController " , but i am using namespaces
  • 09:19:00 <fger> and the pagecontroller class is there
  • 09:23:20 <NamelessCoder> what exactly is your vendor name and extension key? the example dummy names you give aren't valid and if your name uses the same naming that might cause this
  • 09:24:03 <NamelessCoder> in your example, extension key must be "x_ytemplates" in the last example and "x_y_templates" in the ones before that
  • 09:25:01 <NamelessCoder> and you say ContentController is called - but you're giving an example from attempting to resolve the page controller. Are you doing two controllers?
  • 09:26:12 <NamelessCoder> (the resolving method executes any number of times, once for the page and X number of times depending on how many Flux-enabled content elements get rendered)
  • 09:32:47 <fger> ok, i register the content/page structure in my provider-extension like this:
  • 09:32:48 <fger> \FluidTYPO3\Flux\Core::registerProviderExtensionKey('F03.F03templates', 'Content');
  • 09:33:08 <fger> my extension folder is named f03templates
  • 09:45:03 <fger> the provider extension was built with builder
  • 09:47:47 <fger> i activated hardFail in the resolver and it failed first for the pageController,... I created it the same way like my ContentController
  • 09:47:51 <fger> still not found
  • 09:48:13 <fger> namespace F03\F03templates\Controller; in both controllers
  • 09:48:43 <fger> that isnt correctly mapped from Tx_F03templates_Controller_....
  • 09:49:43 <fger> TYPO3 6.2.latest on PHP 5.6
  • 09:51:16 <NamelessCoder> something definitely is off with that extension key
  • 09:51:24 <NamelessCoder> it's an O, not a zero, right?
  • 09:53:21 <NamelessCoder> https://github.com/FluidTYPO3/flux/blob/development/Classes/Helper/Resolver.php#L147
  • 09:53:35 <fger> zero
  • 09:53:36 <NamelessCoder> does your extension key have a vendor name here?
  • 09:53:53 <fger> yes - I added a Migrations/Code/ClassAliasMap.php file now
  • 09:53:57 <fger> then it works
  • 09:55:00 <NamelessCoder> https://github.com/FluidTYPO3/flux/blob/development/Classes/Controller/AbstractFluxController.php#L212
  • 09:55:18 <NamelessCoder> I bet on your end, $controllerExtensionKey lacks the vendor name. And that might be a bug.
  • 09:55:51 <NamelessCoder> do you use a custom Provider class?
  • 09:56:46 <fger> yes it lags the vendor name
  • 09:57:01 <fger> its f03templates when the method u linked last is called
  • 09:57:04 <NamelessCoder> https://github.com/FluidTYPO3/fluidcontent/blob/development/Classes/Provider/ContentProvider.php#L140 - is how fluidcontent will read the expected extension key which means the value recorded in DB should also contain the vendor name - which I bet yours doesn't
  • 09:57:09 <fger> but i register F03.F03templates
  • 09:57:26 <fger> hmm
  • 09:57:38 <fger> yeah i changed it later one
  • 09:57:40 <fger> -e
  • 09:58:08 <fger> the builder version i used put in a 'f03templates' in the ext_tables.php register statement
  • 09:58:16 <NamelessCoder> well, those two are, strangely enough, compatible in the eyes of fluidcontent but NOT in the eyes of Flux when resolving a controller class
  • 09:58:27 <fger> guess so
  • 09:58:40 <NamelessCoder> if you add a new content instance now, does it record the vendor name in DB? (asking so we narrow the problem down)
  • 09:59:00 <fger> and u are right, the DB entries dont have a vendor name if the provider extension is not registered with a vendor name FROM THE BEGINNING
  • 09:59:12 <fger> ok
  • 09:59:16 <fger> i will test mom
  • 10:00:30 <NamelessCoder> this would be the crucial point - if the new content record has the vendor name, there's no "bug" but it definitely is cause for confusion when you don't have a class alias map
  • 10:03:11 <NamelessCoder> the reason it works with and without vendor name until you try to resolve PHP classes is of course that Flux doesn't care when resolving paths for templates or expected filesystem paths
  • 10:04:11 <NamelessCoder> ah, the wonders of using vendor names in TYPO3 ^^
  • 10:04:15 <fger> ;)
  • 10:04:45 <fger> yes, using a vendor-name in the registration statement in the provider breaks my newContentWizard completely
  • 10:05:03 <fger> the pageTs, that is rendered into cf_fluidcontent in the DB doesnt seem compatible anymore
  • 10:08:42 <fger> see https://gist.github.com/fgerards/5a33027bd5c2b1ee14c8
  • 10:09:03 <fger> just posted the first lines
  • 10:21:19 <fger> but yes, the tx_fed_fcefile is set to F03.F03templates:<filename>
  • 10:23:30 <fger> so i guess as we already have around 250 FCEs with old db-naming i leave the register-process with "f03templates" and map the class in migrations/classes ...
  • 10:23:35 <fger> migrations/code...
  • 10:41:55 <fger> ok, i got it working with the migrations
  • 10:42:17 <fger> another "flaw": tx_f03templates_Content is the right prefix
  • 10:42:30 <fger> tx_f03templates_content wont work here
  • 10:42:35 <fger> notice the case-sensitivity
  • 10:42:42 <fger> never had that in TYPO3
  • 10:44:02 <fger> because if I build the link with sth like <f:link.action action="forumDetail" pageUid="123" arguments="{discussionId : uid}">...
  • 10:44:15 <fger> TYPO3 generates a tx_f03templates_content prefix
  • 10:44:17 <fger> which fails