04:54:32 <shaggz> Here's the gist for my template https://gist.github.com/tkasper/91fba32c85560850d178
05:45:27 <shaggz> Another problem I recognize is that my changes are not visible. I have to uninstall and then install the extension again. And I have set the configuration "Disable Fluid caching of Flux forms"
06:00:07 <cedricziel> the fluid cache gets reloaded in development context
07:36:31 <shaggz> @cedricziel I set basic.debugMode to 1 (flux configuration)
07:36:59 <shaggz> Thought that this should be sufficient
08:48:35 <s-andersen> I'm trying to assign a custom variable to my template in my provider extension, but I can't figure out how to do it. Have tried following this page, but get a "Cannot redeclare pagecontroller": https://fluidtypo3.org/documentation/templating-manual/advanced-provider-extensions/custom-flux-controllers/controller-actions.html
08:53:30 <cedricziel> shaggz: Development Context is for development. Production is for .. well. Production.
08:56:52 <cedricziel> Uhm. How does your controller look like, s-andersen?
09:03:26 <s-andersen> cedricziel: I think the problem was the way I registered my provider extension in ext_tables.php
09:04:09 <s-andersen> cedricziel: No not completely, because now I get: Template could not be loaded. I tried "/var/www/jvk.dk/ny/web/typo3conf/ext/flux/Resources/Private/Templates/Page/Default.html"
09:04:47 <s-andersen> Do I have to call the render() function in my pagecontroller?
09:06:50 <s-andersen> cedricziel:This is what my controller looks like: http://pastebin.com/cbQvqnCd
09:10:30 <cedricziel> Interesting. This shoud run in your extensions scope.
09:10:42 <cedricziel> NamelessCoder knows best around custom controller.
09:11:24 <cedricziel> btw. grabbing raw request parameters wont significantly improve your security
09:49:49 <s-andersen> Is there another way to assign a simple variable from PHP to a fluid template, than to make a controller in the provider extension.
09:56:22 <NamelessCoder> plus some other circumstances which are taken care of by PageController to make it perfect for pages
10:00:08 <s-andersen> NamelessCoder: something like this: http://pastebin.com/uSbnMDqW
10:00:31 <s-andersen> Returns no error, but it seems the function is not called.
10:00:54 <NamelessCoder> hmm now it's a viewhelper, not a controller
10:01:23 <NamelessCoder> or rather a controller placed in the viewhelper scope
10:01:43 <NamelessCoder> the things you should do, in order:
10:02:11 <NamelessCoder> 1) General note: you should use another vendor name than FluidTYPO3 and you should include this other vendor name in the calls to register your provider
10:02:59 <NamelessCoder> 2) Your controller should be YourVendor\Newjvk\Controllers\PageController and should extend FluidTYPO3\Fluidpages\Controller\PageController
10:03:34 <NamelessCoder> 3) Your action should be public (but it technically does not have to be)
10:05:00 <NamelessCoder> 4) Your template file and action should not be named "ProductID" and "productID" respectively. The uppercase "ID" part may mess with detection. UpperCamelCase is the appropriate template file naming (e.g. ProductId.html) and lowerCamelCase is appropriate for controller actions (e.g. productIdAction).
10:05:29 <NamelessCoder> 5) Your controller uses a raw GET argument; this should be left to the argument mapping of Extbase.
10:06:29 <NamelessCoder> 6) Your controller may, in a broader perspective, make more sense as an actual plugin that you insert on a page, rather than an emulated page template. It looks like you will be needing argument mappings and appropriate contexts, which means a proper plugin context is preferable.
10:07:18 <NamelessCoder> formalities: your controller action has @return integer which is incorrect. It should @return void.
10:07:44 <NamelessCoder> and your file uses a closing php tag which is no longer allowed according to the TYPO3 CGL.
10:08:01 <NamelessCoder> that should be everything, with medium detail ;)
10:08:18 <gbod> Hope that author's name in annotation is right. :D
10:09:08 <NamelessCoder> there's a LOT of side stuff to do with controllers ;)
10:12:29 <s-andersen> NamelessCoder: Thank you for you elaborate explanation. I began with a viewhelper, then thought a controller would be the better choice. I then mixed up the code in my editor and put the wrong thing on pastebin :)
10:12:40 <s-andersen> gbod: The authors name seems to be the only thing that is correct :)
10:13:13 <NamelessCoder> s-andersen I guessed that you were experimenting a bit ;)
10:15:15 <NamelessCoder> s-andersen I think that in the end, you will be happier with a proper plugin that renders your product info. You can, if you want to, limit the allowed CTypes in the fluidpages template so your product template is only allowed to contain for example your list or detail plugin.
10:16:33 <s-andersen> NamelessCoder: Am I getting close: http://pastebin.com/ZjfUPki8
10:16:43 <NamelessCoder> I've been doing that myself for as long as I can remember and it's the way that causes least "crap, have to rethink/redo that"-moments during developent
10:17:40 <NamelessCoder> when you register the provider extension in ext_* files, use 'JVK.Newjvk' as extension key
10:17:51 <s-andersen> Yep, I have already done that.
10:18:09 <NamelessCoder> your template file should then be Page/ProductList.html
10:18:18 <s-andersen> The code where I extended the AbstractFluxController provoked an error, so somehow my function got called. But now, the function doesn't seem to get called.
10:19:20 <NamelessCoder> s-andersen the problem when you only extend the basic controller class is that you will lack the tablename and fieldname properties that connect your Provider to the controller. You would either get no Provider in $this->provider or an incorrect one.
10:19:56 <NamelessCoder> alright - assuming the registration is okay and you've got template paths right, your controller should work
10:20:57 <s-andersen> I have \FluidTYPO3\Flux\Core::registerProviderExtensionKey('JVK.Newjvk', 'Page');
10:25:54 <NamelessCoder> if you select ProductList as template to use on a page, your controller should be called. But make sure you return something more than an integer or Extbase may see it as an empty result
10:27:14 <s-andersen> ProductList is selected and the template is rendered, but the variable I assign is not displayed. And if I place a die() function in the code, the template still renders. Seems like the function is not processed
10:28:12 <shaggz> Hey NamelessCoder, I have a problem that my provider extension does not recognize changes like adding a new content element template. I set basic.debugMode to 1 (development) but I have to uninstall and reinstall the extension.
10:28:14 <s-andersen> I had some "returns" from my viewhelper attempt
10:28:49 <shaggz> I created the provider extension using the builder extension. Is there anything I have to register manually?
10:29:34 <shaggz> In former version I just had to add a new html file but that does not work this time and I use the newest versions of flux, fluidcontent etc
10:30:45 <s-andersen> NamelessCoder: Thank you for your help!
10:32:21 <NamelessCoder> you're welcome, hope it works!
10:33:13 <NamelessCoder> shaggz you probably either need to clear the system cache or there's some error in your template.
10:33:26 <NamelessCoder> fluidcontent caches pageTSconfig in the "system" group
10:34:07 <shaggz> I tried to clear general caches and manually cleared typo3temp/Cache/*