From thasmo at gmail.com Sun Nov 1 21:28:44 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Sun, 01 Nov 2009 21:28:44 +0100 Subject: [TYPO3-mvc] Forwarding action without loosing request parameters In-Reply-To: References: Message-ID: That's all a bit weird. I changed the method to 'redirect()', but now the following accours: If I use method="post" in the tag, it will redirect me to http://my-domain.tld//.<id>.<type>.html?&tx_ext_plugin[action]=index&tx_ext_plugin[controller]=PluginController&cHash=<hash> The weird is, that the two "//" won't be recognized by TYPO3 and the homepage will be shown with no error-handling page defined in the install-tool. (Also 'index' as controller is wrong, but should be overwritten with the POST variable anyways.) If I use method="get" in the <f:form> tag, the form action attribute of http://my-domain.tld/<title>.<id>.<type>.html?&tx_ext_plugin[action]=calculate&tx_ext_plugin[controller]=PluginController&cHash=<hash> won't be used as the destination uri, further more ONLY the valuepairs which are in the form will be sent as querystring, which resulst in: http://my-domain.tld//<title>.<id>.<type>.html?tx_ext_plugin[__referrer][extensionName]=ExtName&tx_ext_plugin[__referrer][controllerName]=PluginContro... which completely skips the dstination controller 'calculate' which was set in the action or the form. I'm using Firefox 3.5.4. Any ideas? Is this a bug? Thanks! Jochen Rau schrieb: > Hi Thomas. > >> The process looks like the following: >> 1. Index action gets called, showing a form in index.html >> 2. Form gets submitted with the action "calculate" >> 3. Variable gets assigned, forwarding to index action >> 4. {address} is not available in the view/template >> >> Is there a way to either forward the {address} to the index action, >> or a way to use the same template/view for the calculate action also? > > Maybe you would like to invoke redirect() instead of forward(). This > will persist your calculated address by finalizing the actual request > and sending a new one. > > class MyController extends Tx_Extbase_MVC_Controller_ActionController { > > /** > * The main action > * @param string $newAddress > * @dontvalidate $newAddress > */ > public function indexAction($newAddress = NULL) { > // Display Form > } > > /** > * The calculate action > * > * @param string $address > * @validate $address Alphanumeric > */ > public function calculateAction($address) { > $this->view->assign('address', $address); > $this->redirect('index'); > } > } > > The methods redirect() and forward() are defined in the ActionController > of Extbase. > > Regards > Jochen > > From thasmo at gmail.com Sun Nov 1 23:45:08 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Sun, 01 Nov 2009 23:45:08 +0100 Subject: [TYPO3-mvc] Instantiate extbase action controller inside tslib_fe hook In-Reply-To: <mailman.1.1256983843.16513.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256676926.26541.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256717540.31777.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256848755.24851.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256882878.28334.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256926879.17945.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256935926.29184.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256943315.4704.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256983843.16513.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257115529.5888.typo3-project-typo3v4mvc@lists.typo3.org> I started to code on a script, which will compress and concatenate JS and CSS files into one file given the two hooks inside the new t3lib PageRenderer. Investigating the problem with headerData I'm wondering if it may be smart to implement another hook, just for the purpose of detecting JS and CSS inside the headerData and moving it into the JS and CSS arrays available inside the renderer class. (Or even implement it inside the renderer.) Because otherwise it would be neccessary to call a function like 'convertHeaderData()' inside both available hooks for now. The JS compressing and concatenating is done - the basic - CSS is my next step, which is a bit more complicated, as the different media types need to be taken care of. (Still there is the need of a correct implementation of concatenating/compressing to the right places like <head> or above </body>, seperatly.) For the JS compression I'm using the JSMinPlus Class used inside the minify project on code.google.com. Oppinions are welcome! Thanks! Steffen Kamper schrieb: > Hi, > > Thomas "Thasmo" Deinhamer schrieb: >> What is the correct way to add external CSS and JS files >> inside a hook and/or a frontend plugin/action controller? >> >> If files are added using 'additionalHeaderData()', the files >> won't be available inside the frontend renderer arrays. >> >> What's the solution? >> >> Thank you! >> > > the arrays are references. Add files in array or unset elements. > As this is a transition many users used headerData for JS/CSS what > should not be used in future for that. You have a reference of the > pageRenderer in Hook, so you can access this data with $pObj->headerData. > > vg Steffen From sebastian at typo3.org Mon Nov 2 08:32:42 2009 From: sebastian at typo3.org (=?ISO-8859-15?Q?Sebastian_Kurf=FCrst?=) Date: Mon, 02 Nov 2009 08:32:42 +0100 Subject: [TYPO3-mvc] Action and Controller from FlexForm Message-ID: <mailman.1.1257147185.11483.typo3-project-typo3v4mvc@lists.typo3.org> Hey everybody, Thanks to Sebastian Fischer I am again working on the above issue . http://forge.typo3.org/issues/show/3348 I just cleaned up things a lot, and it'd be great if you could test the patch Extbase_3348_v3.patch, in case you use flexform configuration. It is also non-backwards-compatible, as flexform settings have to be prefixed now. Beforehand, a flexform setting "name" has been merged with "settings.name". Now, the flexform setting is called "settings.name". Greets, Sebastian From info at sk-typo3.de Mon Nov 2 15:14:06 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 02 Nov 2009 15:14:06 +0100 Subject: [TYPO3-mvc] How to retrieve cObj->data ? In-Reply-To: <mailman.1.1256732067.19893.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1254308507.21066.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1256729878.16466.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256730819.18165.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256732067.19893.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> Hi, next reminder - would be cool if it's in beta3 released at friday vg Steffen From rikkert at buyways.nl Mon Nov 2 15:28:34 2009 From: rikkert at buyways.nl (Rikkert Steenbergen - Buyways B.V.) Date: Mon, 02 Nov 2009 15:28:34 +0100 Subject: [TYPO3-mvc] How to retrieve cObj->data ? In-Reply-To: <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1254308507.21066.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1256729878.16466.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256730819.18165.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256732067.19893.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.5043.1257172157.671.typo3-project-typo3v4mvc@lists.typo3.org> +1 for this feature! I also need to access the uid / header of a contentobject in a few occassions. Regards, Rikkert Steffen Kamper wrote: > Hi, > > next reminder - would be cool if it's in beta3 released at friday > > vg Steffen > _______________________________________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc at lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc > -- * Rikkert Steenbergen, Projectleider * Buyways B.V. Friesestraatweg 215c, 9743 AD Groningen * T. 050 853 66 33 M. 06 27 44 21 99 F. 050 853 66 01 KvK. 01074105 www.buyways.nl <http://www.buyways.nl> * ------------------------------------------------------------------------ * Disclaimer: deze e-mail is vertrouwelijk en uitsluitend bedoeld voor de geadresseerde. Als blijkt dat het bericht niet voor u bestemd is, verzoeken wij u de afzender hiervan op de hoogte te stellen. Het verstrekken van de informatie aan en gebruik door anderen is niet toegestaan. Buyways B.V. sluit iedere aansprakelijkheid uit die voortvloeit uit elektronische verzending. * ------------------------------------------------------------------------ From bastian at typo3.org Tue Nov 3 09:16:35 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Tue, 03 Nov 2009 09:16:35 +0100 Subject: [TYPO3-mvc] How to retrieve cObj->data ? In-Reply-To: <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1254308507.21066.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1256729878.16466.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256730819.18165.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256732067.19893.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257236218.23453.typo3-project-typo3v4mvc@lists.typo3.org> Steffen Kamper wrote: Hi Steffen, > next reminder Thanks for the reminder, let's put the cObj in the controller context. I'll upload a patch. Bastian From jochen.rau at typoplanet.de Tue Nov 3 10:36:40 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Tue, 03 Nov 2009 10:36:40 +0100 Subject: [TYPO3-mvc] How to retrieve cObj->data ? In-Reply-To: <mailman.1.1257236218.23453.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1254308507.21066.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1256729878.16466.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256730819.18165.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256732067.19893.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257236218.23453.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257241024.30038.typo3-project-typo3v4mvc@lists.typo3.org> Hi. I have just talked with Sebastian about that. We agreed to put it into the request. I think this is the better place as it is a kind of information about the environment of the extension. What's your opinion? Jochen Bastian Waidelich wrote: > Steffen Kamper wrote: > > Hi Steffen, > >> next reminder > > Thanks for the reminder, let's put the cObj in the controller context. > I'll upload a patch. > > Bastian -- Every nit picked is a bug fixed From info at sk-typo3.de Tue Nov 3 10:39:32 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Tue, 03 Nov 2009 10:39:32 +0100 Subject: [TYPO3-mvc] How to retrieve cObj->data ? In-Reply-To: <mailman.1.1257241024.30038.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1254308507.21066.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1256729878.16466.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256730819.18165.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256732067.19893.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257236218.23453.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257241024.30038.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257241190.30047.typo3-project-typo3v4mvc@lists.typo3.org> Hi, nice that my hardheadedness pays back :) Jochen Rau schrieb: > Hi. > > I have just talked with Sebastian about that. We agreed to put it into > the request. I think this is the better place as it is a kind of > information about the environment of the extension. > > What's your opinion? > sounds good. The important is that it's accessible in controller context which will be the case with the request object. vg Steffen From bastian at typo3.org Tue Nov 3 13:36:50 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Tue, 03 Nov 2009 13:36:50 +0100 Subject: [TYPO3-mvc] How to retrieve cObj->data ? In-Reply-To: <mailman.1.1257241024.30038.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1254308507.21066.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1256729878.16466.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256730819.18165.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256732067.19893.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257236218.23453.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257241024.30038.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257251836.12641.typo3-project-typo3v4mvc@lists.typo3.org> Jochen Rau wrote: Hi Jochen, > I have just talked with Sebastian about that. We agreed to put it into > the request. You're right, that's a better place for it! I'll add a get/setContentObjectData() to webrequest. greeez Bastian From bastian at typo3.org Tue Nov 3 14:41:22 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Tue, 03 Nov 2009 14:41:22 +0100 Subject: [TYPO3-mvc] How to retrieve cObj->data ? In-Reply-To: <mailman.1.1257241190.30047.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1254308507.21066.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1256729878.16466.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256730819.18165.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256732067.19893.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257236218.23453.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257241024.30038.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257241190.30047.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257255708.18062.typo3-project-typo3v4mvc@lists.typo3.org> Steffen Kamper wrote: Hi Steffen, > nice that my hardheadedness pays back :) Absolutely ;) It's done, now you can access the data of the current cObject like this: $this->request->getContentObjectData(); (controller) or $this->controllerContext->getRequest()->getContentObjectData() (viewhelper) Thanks for pushing us ;) Bastian From info at sk-typo3.de Tue Nov 3 15:18:30 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Tue, 03 Nov 2009 15:18:30 +0100 Subject: [TYPO3-mvc] How to retrieve cObj->data ? In-Reply-To: <mailman.1.1257255708.18062.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1254308507.21066.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1256729878.16466.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256730819.18165.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256732067.19893.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257236218.23453.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257241024.30038.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257241190.30047.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257255708.18062.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257257928.20785.typo3-project-typo3v4mvc@lists.typo3.org> Hi Bastian, Bastian Waidelich schrieb: > Steffen Kamper wrote: > > Hi Steffen, > >> nice that my hardheadedness pays back :) > > Absolutely ;) > It's done, now you can access the data of the current cObject like this: > $this->request->getContentObjectData(); (controller) > or > $this->controllerContext->getRequest()->getContentObjectData() (viewhelper) > > Thanks for pushing us ;) cool, 1000 thanks! vg Steffen From typo3-german-02 at oliverklee.de Tue Nov 3 16:30:10 2009 From: typo3-german-02 at oliverklee.de (Oliver Klee) Date: Tue, 03 Nov 2009 16:30:10 +0100 Subject: [TYPO3-mvc] Let's have some more domain models + data mappers Message-ID: <mailman.1.1257262235.27092.typo3-project-typo3v4mvc@lists.typo3.org> Dear all, my oelib extension currently already has quite a few domain models + data mappers. I'd like to port them (and their functions) to extbase, including the unit tests: - BE user - BE usergroup - country - FE user - FE usergroup - language Should I just go ahead, or is there anything special which I need to know? Oli From bastian at typo3.org Tue Nov 3 17:02:35 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Tue, 03 Nov 2009 17:02:35 +0100 Subject: [TYPO3-mvc] Action and Controller from FlexForm In-Reply-To: <mailman.1.1257147185.11483.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257147185.11483.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257264182.29674.typo3-project-typo3v4mvc@lists.typo3.org> Sebastian Kurf?rst wrote: Hi, Finally I found some time to check the changes. > I just cleaned up things a lot, and it'd be great if you could test the > patch Extbase_3348_v3.patch, in case you use flexform configuration. Great, I really like the approach! I've just pimped the viewhelpertest extension to demonstrate some of the new features (check out https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/viewhelpertest/) It even works to overwrite multi-level settings like: plugin.tx_myext.settings.someKey.someSubKey by naming the flexform node <settings.someKey.someSubKey> I came across two drawbacks though: 1. It's not possible to overwrite locallang keys. <_LOCAL_LANG.someKey> won't have an effect. (But I don't think, that you would need this anyways) 2. It's still not possible to easily overwrite the default action of a plugin. If you just want to overwrite the default action of some plugin (imagine a dropdown in your flexform with the options "default user list", "grouped user list" or something like that) you'll have to copy _all_ controller & action combinations to all options. If you add an action to your controller, you'll have to adjust setup.txt and all flexform options. IMO it would be nice to be able to somehow merge switchableControllerActions with the default setup - or to be able to specify the default controller/action combination separately. Not sure, what do you think? Bastian From helmut at typo3.org Tue Nov 3 18:24:47 2009 From: helmut at typo3.org (Helmut Hummel) Date: Tue, 03 Nov 2009 18:24:47 +0100 Subject: [TYPO3-mvc] Where to implement the business logic? Message-ID: <mailman.1.1257269111.3416.typo3-project-typo3v4mvc@lists.typo3.org> Hi, while reading Olis post about implementing domain models (BE users etc.) in his recent post, I thought about my typo3_webservice extension where I implemented a general "model class" for all tables defined in TCA. I thought about porting the typo3_webservice extension to make use of extbase, but I wonder where I can put my buisiness logic then. Currently I put it in the model class, so that I can access data of the objects (mainly the fields from a table row) but these objects do a lot more like returning a XML representation of the data and returning labels of the fields and so on. While porting to extbase I'd like to seperate these things, meaning having objects containig data but also objects implementing the business logic (XML transformation and the like in case of the webservice). Can anyone give me a hint where to generally put the business logic in case of an extbase extension. Thanks Regards Helmut From sebastian at typo3.org Tue Nov 3 21:23:07 2009 From: sebastian at typo3.org (=?ISO-8859-15?Q?Sebastian_Kurf=FCrst?=) Date: Tue, 03 Nov 2009 21:23:07 +0100 Subject: [TYPO3-mvc] Action and Controller from FlexForm In-Reply-To: <mailman.1.1257264182.29674.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257147185.11483.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257264182.29674.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257279813.15317.typo3-project-typo3v4mvc@lists.typo3.org> Hey, > 2. It's still not possible to easily overwrite the default action of a > plugin. > If you just want to overwrite the default action of some plugin (imagine > a dropdown in your flexform with the options "default user list", > "grouped user list" or something like that) you'll have to copy _all_ > controller & action combinations to all options. Try setting a field "controller" and "action". This should work. Greets, Sebastian From jochen.rau at typoplanet.de Tue Nov 3 21:25:34 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Tue, 03 Nov 2009 21:25:34 +0100 Subject: [TYPO3-mvc] How to retrieve cObj->data ? In-Reply-To: <mailman.1.1257251836.12641.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1254308507.21066.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1256729878.16466.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256730819.18165.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256732067.19893.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257236218.23453.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257241024.30038.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257251836.12641.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257279958.15642.typo3-project-typo3v4mvc@lists.typo3.org> Thanks a lot, Bastian! Bastian Waidelich wrote: > Jochen Rau wrote: > > Hi Jochen, > >> I have just talked with Sebastian about that. We agreed to put it into >> the request. > > You're right, that's a better place for it! > I'll add a get/setContentObjectData() to webrequest. > > greeez > Bastian -- Every nit picked is a bug fixed From joerg at schoppet.de Wed Nov 4 00:01:34 2009 From: joerg at schoppet.de (Joerg Schoppet) Date: Wed, 04 Nov 2009 00:01:34 +0100 Subject: [TYPO3-mvc] Where to implement the business logic? In-Reply-To: <mailman.1.1257269111.3416.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257269111.3416.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257289319.25262.typo3-project-typo3v4mvc@lists.typo3.org> Hi, Helmut Hummel schrieb: > > Can anyone give me a hint where to generally put the business logic in > case of an extbase extension. the webservices I implemented within my extensions worked the following way: - controller: holds the "business logic", meaning, that the controller knows, what to fetch depending on the given request-parameters. - view: created the xml-representation of the output (I used the "format"-parameter -xml-, so that I used a "simple" fluid-file to create the xml, but it is also possible to create a php-view, which creates a dom- or simplexml objects and return the generated xml. - model(s): rather simple, that it only returns the data I need, no real logic for output or something like that . Joerg From info at sk-typo3.de Wed Nov 4 01:10:37 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Wed, 04 Nov 2009 01:10:37 +0100 Subject: [TYPO3-mvc] extbase usage of MM_table_where Message-ID: <mailman.1.1257293454.30346.typo3-project-typo3v4mvc@lists.typo3.org> Hi, as i just investigated #11168 in core i want to inform you as i have seen that it'S used wrong in extbase too, here is a copy of my corelist post: Hi, i want to drop this RFC for following reason: MM_table_where isn't used in core, also not in DAM and their extensions which uses MM very much. The whole concept is a bit clouded. MM_table_where is a free configuration for TCA which is defined as "additional where clause for MM". So 1) naming is wrong, should be MM_table_andWhere 2) you should use it like 'MM_table_where' => ' AND tx_dam_mm_cat.uid_foreign!=###THIS_UID###' or simular. Adding AND here would break other extensions having this defined. 3) totally underdocumented, missing any "real" example. From the naming you may think, it's simular to "foreign_table_where" which doesn't use AND, but this is wrong. Looking to extbase, they also use it the wrong way, look to Datamp_testcase where they define 'MM_table_where' => 'WHERE 2=2', I will report it in extbase list. Joey, please have a look to your tagpack where you use it. Add the AND in your extension and everything should work fine. 4) Comparing loaddbgroup to the t3lib_beFunc::exec_foreign_table_where_query only replacing ###THIS_UID### might be too less, there you see also other placeholders like ###CURRENT_PID###, ###THIS_CID###, ###STORAGE_PID### etc. maybe we need real usecases to see what makes sense here, but for me it looks bit inconsistent. Sry for writing long story, but i think this shows how it works. As nobody else complaint i think this is used very seldom. Anybody who configured MM in TCA know the many hours of try&error until configuration works as expected. Don't misunderstand, for core cases it works, but core has no real MM defined, this is something for extensions, and of course extbase which has to deal with that in datamapper. I hope this helps understanding of the handling in loaddbgroup and helps fixing it in extbase (remember adding " AND") vg Steffen From jochen.rau at typoplanet.de Wed Nov 4 09:16:10 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Wed, 04 Nov 2009 09:16:10 +0100 Subject: [TYPO3-mvc] extbase usage of MM_table_where In-Reply-To: <mailman.1.1257293454.30346.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257293454.30346.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257322596.24383.typo3-project-typo3v4mvc@lists.typo3.org> Hi Steffen, Steffen Kamper wrote: > as i just investigated #11168 in core i want to inform you as i have > seen that it'S used wrong in extbase too, here is a copy of my corelist > post: [...] > MM_table_where isn't used in core, also not in DAM and their extensions > which uses MM very much. > > The whole concept is a bit clouded. MM_table_where is a free > configuration for TCA which is defined as "additional where clause for > MM". [...] Thanks for investigation this. I was a little bit confused about this option, too. I suggest to drop it for extbase as it is not fully implemented, yet. If we have real use-cases we can implement it in 4.4. What do you think? Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Wed Nov 4 09:29:46 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Wed, 04 Nov 2009 09:29:46 +0100 Subject: [TYPO3-mvc] Where to implement the business logic? In-Reply-To: <mailman.1.1257269111.3416.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257269111.3416.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257323411.25563.typo3-project-typo3v4mvc@lists.typo3.org> Hi Helmut. Helmut Hummel wrote: > while reading Olis post about implementing domain models (BE users etc.) > in his recent post, I thought about my typo3_webservice extension where > I implemented a general "model class" for all tables defined in TCA. In Extbase we use a flavour of models called Domain Models. They hold the business logic (and only the business logic). A generic class granting access to a database table (table data gateway) has IMO several disadvantages. > I thought about porting the typo3_webservice extension to make use of > extbase, but I wonder where I can put my buisiness logic then. > > Currently I put it in the model class, so that I can access data of the > objects (mainly the fields from a table row) but these objects do a lot > more like returning a XML representation of the data and returning > labels of the fields and so on. Returning a XML representation, and labeling should be handled by the View. > While porting to extbase I'd like to seperate these things, meaning > having objects containig data but also objects implementing the business > logic (XML transformation and the like in case of the webservice). The controller is responsible for selecting the "right" portion of data and handing it over to the view (but it is not responsible for fetching the data from the database). The process is "configured" by the Request. Finally, it passes the right Response to the client. > Can anyone give me a hint where to generally put the business logic in > case of an extbase extension. Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Wed Nov 4 09:36:59 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Wed, 04 Nov 2009 09:36:59 +0100 Subject: [TYPO3-mvc] Where to implement the business logic? In-Reply-To: <mailman.1.1257289319.25262.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257269111.3416.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257289319.25262.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257323844.25996.typo3-project-typo3v4mvc@lists.typo3.org> Hi. Joerg Schoppet wrote: > Helmut Hummel schrieb: >> >> Can anyone give me a hint where to generally put the business logic in >> case of an extbase extension. > the webservices I implemented within my extensions worked the following > way: > - controller: holds the "business logic", meaning, that the controller > knows, what to fetch depending on the given request-parameters. I disagree in one point. The controller does normally not hold any business logic. This will lead you to a so called "fat controller" and IMO bad design. Keep the controller as slim as possible. > - view: created the xml-representation of the output (I used the > "format"-parameter -xml-, so that I used a "simple" fluid-file to create > the xml, but it is also possible to create a php-view, which creates a > dom- or simplexml objects and return the generated xml. > - model(s): rather simple, that it only returns the data I need, no real > logic for output or something like that The model can be rather simple. But if there are business rules, it has to be implemented here. Lets have an Invoice as Domain Model. All the logic how to process Items and aggregate them is inside this Domain Model. In some cases it is useful to put the business logic at a different place. The logic how to build an Invoice Object can be delegated to an InvoiceFactory to keep the Invoice slim ;-). Or, if there has to be generated a Serial with complex rules, this can be done by a Domain Service like InvoiceNumberService residing in the Folder myext/Classes/Domain/Service/. Regards Jochen -- Every nit picked is a bug fixed From info at sk-typo3.de Wed Nov 4 09:50:40 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Wed, 04 Nov 2009 09:50:40 +0100 Subject: [TYPO3-mvc] extbase usage of MM_table_where In-Reply-To: <mailman.1.1257322596.24383.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257293454.30346.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257322596.24383.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257324655.26887.typo3-project-typo3v4mvc@lists.typo3.org> Hi Jochen, Jochen Rau schrieb: > > Thanks for investigation this. I was a little bit confused about this > option, too. I suggest to drop it for extbase as it is not fully > implemented, yet. If we have real use-cases we can implement it in 4.4. > > What do you think? > i would use it as it as - additionalWhere which is added to MM. But i wouldn't parse it. vg Steffen From jochen.rau at typoplanet.de Wed Nov 4 09:51:48 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Wed, 04 Nov 2009 09:51:48 +0100 Subject: [TYPO3-mvc] Let's have some more domain models + data mappers In-Reply-To: <mailman.1.1257262235.27092.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257262235.27092.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257324733.27091.typo3-project-typo3v4mvc@lists.typo3.org> Hi Oliver. Oliver Klee wrote: > my oelib extension currently already has quite a few domain models + > data mappers. I'd like to port them (and their functions) to extbase, > including the unit tests: > > - BE user > - BE usergroup > - country > - FE user > - FE usergroup > - language > > > Should I just go ahead, or is there anything special which I need to know? There are already generic models for FeUser FeUserGroup in Extbase available. Adding the other models should be no problem. Your models are a kind of a Table Row Gateway. In Extbase we have a different approach for this to keep the models plain and simple. I am currently elaboration on how to build generic domain models for Extbase (and FLOW3). My approach is top-down. That means we should implement good standards like OASIS CIQ for Person, Names, and Addresses. And to bind these models to an ontology resulting in a semantically tagged output (FOAF, RDFa, or any other Microformat). I already set up a Page on Forge to bring the people together. Right after Extbase is released, I will kick-start this project. I will be glad if we can join the forces. http://forge.typo3.org/projects/show/extension-semantics Regards Jochen -- Every nit picked is a bug fixed From thasmo at gmail.com Wed Nov 4 19:01:56 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Wed, 04 Nov 2009 19:01:56 +0100 Subject: [TYPO3-mvc] Forwarding action without loosing request parameters In-Reply-To: <mailman.1.1257107344.5888.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256939073.32037.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256975196.7668.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257107344.5888.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257357736.4949.typo3-project-typo3v4mvc@lists.typo3.org> Any ideas? I'm stuck with this - does anybody know where the problem is? Am I doing something wrong? Thanks a lot! Thomas "Thasmo" Deinhamer schrieb: > That's all a bit weird. > > I changed the method to 'redirect()', but now the following accours: > > If I use method="post" in the <f:form> tag, it will redirect me to > http://my-domain.tld//<title>.<id>.<type>.html?&tx_ext_plugin[action]=index&tx_ext_plugin[controller]=PluginController&cHash=<hash> > > > The weird is, that the two "//" won't be recognized by TYPO3 and the > homepage will be shown with no error-handling page defined in the > install-tool. (Also 'index' as controller is wrong, but should be > overwritten with the POST variable anyways.) > > If I use method="get" in the <f:form> tag, the form action attribute of > http://my-domain.tld/<title>.<id>.<type>.html?&tx_ext_plugin[action]=calculate&tx_ext_plugin[controller]=PluginController&cHash=<hash> > > won't be used as the destination uri, further more ONLY the valuepairs > which are in the form will be sent as querystring, which resulst in: > http://my-domain.tld//<title>.<id>.<type>.html?tx_ext_plugin[__referrer][extensionName]=ExtName&tx_ext_plugin[__referrer][controllerName]=PluginContro... > which completely skips the dstination controller 'calculate' which was > set in the action or the form. > > I'm using Firefox 3.5.4. > > Any ideas? Is this a bug? > > Thanks! > > > Jochen Rau schrieb: >> Hi Thomas. >> >>> The process looks like the following: >>> 1. Index action gets called, showing a form in index.html >>> 2. Form gets submitted with the action "calculate" >>> 3. Variable gets assigned, forwarding to index action >>> 4. {address} is not available in the view/template >>> >>> Is there a way to either forward the {address} to the index action, >>> or a way to use the same template/view for the calculate action also? >> >> Maybe you would like to invoke redirect() instead of forward(). This >> will persist your calculated address by finalizing the actual request >> and sending a new one. >> >> class MyController extends Tx_Extbase_MVC_Controller_ActionController { >> >> /** >> * The main action >> * @param string $newAddress >> * @dontvalidate $newAddress >> */ >> public function indexAction($newAddress = NULL) { >> // Display Form >> } >> >> /** >> * The calculate action >> * >> * @param string $address >> * @validate $address Alphanumeric >> */ >> public function calculateAction($address) { >> $this->view->assign('address', $address); >> $this->redirect('index'); >> } >> } >> >> The methods redirect() and forward() are defined in the >> ActionController of Extbase. >> >> Regards >> Jochen >> >> From thasmo at gmail.com Wed Nov 4 19:13:00 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Wed, 04 Nov 2009 19:13:00 +0100 Subject: [TYPO3-mvc] Create Dynamic CSS File via Fluid In-Reply-To: <mailman.1.1256544065.22409.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256544065.22409.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257358401.4949.typo3-project-typo3v4mvc@lists.typo3.org> Try this in your extension: $GLOBALS['TSFE']->getPageRenderer()->addCssFile('path/to/file.css'); You should - of course - first create the file with it's desired content. Steffen Ritter schrieb: > Hey folks, > i have a configurable colorset within my extbase extension. > > Currently im generating a inline style block out of this... > This is against the validation rules of xhtml. So, is there any > possibility to get parts of a template into head, or including it as > external file? > > regards > > Steffen From bastian at typo3.org Wed Nov 4 19:58:16 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Wed, 04 Nov 2009 19:58:16 +0100 Subject: [TYPO3-mvc] Forwarding action without loosing request parameters In-Reply-To: <mailman.1.1257014719.18080.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256983908.16731.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257014719.18080.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257361124.9403.typo3-project-typo3v4mvc@lists.typo3.org> Jochen Rau wrote: Hellau, >> It's the AbstractController ;) > > You are right. I have read AbstractController and wrote > ActionController. ;) Acutally.. Shouldn't it be in the ActionController? I know, it's like that in FLOW3 as well, but forward() and redirect() expect action and controller name as parameter - so it only makes sense for an action controller, no? Bastian From bastian at typo3.org Wed Nov 4 20:02:41 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Wed, 04 Nov 2009 20:02:41 +0100 Subject: [TYPO3-mvc] Forwarding action without loosing request parameters In-Reply-To: <mailman.1.1257107344.5888.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256939073.32037.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256975196.7668.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257107344.5888.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257361388.9955.typo3-project-typo3v4mvc@lists.typo3.org> Thomas "Thasmo" Deinhamer wrote: Hi Thomas, > I changed the method to 'redirect()', but now the following accours: > > If I use method="post" in the <f:form> tag, it will redirect me to > http://my-domain.tld//<title>.<id>.<type>.html?&tx_ext_plugin[action]=index&tx_ext_plugin[controller]=PluginController&cHash=<hash> > > The weird is, that the two "//" won't be recognized by TYPO3 It seems either your base URI contains two trailing slashes, or the UriBuilder somehow creates URIs with a leading slash.. Can you debug Tx_Extbase_MVC_Controller_AbstractController::redirectToURI() by inserting s.th. like debug($baseUri, 'baseUri'); debug($uri, 'uri); exit; before line 319 ($uri = $baseUri . (string)$uri;) and post your results? Bastian From thasmo at gmail.com Wed Nov 4 20:57:17 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Wed, 04 Nov 2009 20:57:17 +0100 Subject: [TYPO3-mvc] Forwarding action without loosing request parameters In-Reply-To: <mailman.1.1257361388.9955.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256939073.32037.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256975196.7668.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257107344.5888.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257361388.9955.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257364663.13232.typo3-project-typo3v4mvc@lists.typo3.org> Seems like the UriBuilder creates URIs with a leading slash; see: baseUri |http://domain.tld/| uri |/Page.18.0.html?&tx_ext_plugin[action]=index&tx_ext_plugin[controller]=PluginController&cHash=de963e26059cf1fcf9d803610e378213| Is this a bug or does the trailing slash needed to be cut off the $uri inside redirectToURI() before appended to $baseUri? Thank you for your help! Bastian Waidelich schrieb: > Thomas "Thasmo" Deinhamer wrote: > > Hi Thomas, > >> I changed the method to 'redirect()', but now the following accours: >> >> If I use method="post" in the <f:form> tag, it will redirect me to >> http://my-domain.tld//<title>.<id>.<type>.html?&tx_ext_plugin[action]=index&tx_ext_plugin[controller]=PluginController&cHash=<hash> >> >> The weird is, that the two "//" won't be recognized by TYPO3 > > It seems either your base URI contains two trailing slashes, or the > UriBuilder somehow creates URIs with a leading slash.. > > Can you debug > Tx_Extbase_MVC_Controller_AbstractController::redirectToURI() > by inserting s.th. like > debug($baseUri, 'baseUri'); > debug($uri, 'uri); > exit; > > before line 319 ($uri = $baseUri . (string)$uri;) > > and post your results? > > Bastian From thasmo at gmail.com Wed Nov 4 21:10:44 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Wed, 04 Nov 2009 21:10:44 +0100 Subject: [TYPO3-mvc] Instantiate extbase action controller inside tslib_fe hook In-Reply-To: <mailman.1.1256983843.16513.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256676926.26541.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256717540.31777.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256848755.24851.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256882878.28334.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256926879.17945.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256935926.29184.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256943315.4704.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256983843.16513.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257365470.14183.typo3-project-typo3v4mvc@lists.typo3.org> I just realized, that $renderer->headerData is a protected variable, so it's not accessible inside the hook. May there be a chance to extend the PageRenderer with public methods called 'getHeaderData()' which returns the headerData and 'setHeaderData($data)' which sets it again? Or even make $headerData public? Thanks for you oppinions/solutions! Steffen Kamper schrieb: > Hi, > > Thomas "Thasmo" Deinhamer schrieb: >> What is the correct way to add external CSS and JS files >> inside a hook and/or a frontend plugin/action controller? >> >> If files are added using 'additionalHeaderData()', the files >> won't be available inside the frontend renderer arrays. >> >> What's the solution? >> >> Thank you! >> > > the arrays are references. Add files in array or unset elements. > As this is a transition many users used headerData for JS/CSS what > should not be used in future for that. You have a reference of the > pageRenderer in Hook, so you can access this data with $pObj->headerData. > > vg Steffen From info at sk-typo3.de Wed Nov 4 22:18:21 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Wed, 04 Nov 2009 22:18:21 +0100 Subject: [TYPO3-mvc] Text in extbase report Message-ID: <mailman.1.1257369522.18915.typo3-project-typo3v4mvc@lists.typo3.org> Hi, there is a small text error in the report text of extbase: "please recompile it with the compile flag ..." compile flag is wrong, i would recommend to use only flag. As i introduced same test in install tool, see #12347 (also in core list). I will correct it there too, we should use the same wording. thx. vg Steffen From info at sk-typo3.de Wed Nov 4 23:18:15 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Wed, 04 Nov 2009 23:18:15 +0100 Subject: [TYPO3-mvc] Instantiate extbase action controller inside tslib_fe hook In-Reply-To: <mailman.1.1257365470.14183.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256676926.26541.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256717540.31777.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256848755.24851.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256882878.28334.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256926879.17945.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256935926.29184.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256943315.4704.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256983843.16513.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257365470.14183.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257373117.23520.typo3-project-typo3v4mvc@lists.typo3.org> Hi, Thomas "Thasmo" Deinhamer schrieb: > I just realized, that $renderer->headerData is a protected > variable, so it's not accessible inside the hook. > > May there be a chance to extend the PageRenderer with public > methods called 'getHeaderData()' which returns the headerData > and 'setHeaderData($data)' which sets it again? > > Or even make $headerData public? > > Thanks for you oppinions/solutions! > see #12469 which will be included in beta3. vg Steffen From thasmo at gmail.com Wed Nov 4 23:29:46 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Wed, 04 Nov 2009 23:29:46 +0100 Subject: [TYPO3-mvc] Instantiate extbase action controller inside tslib_fe hook In-Reply-To: <mailman.1.1257373117.23520.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256676926.26541.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256717540.31777.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256848755.24851.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256882878.28334.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256926879.17945.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256935926.29184.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256943315.4704.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256983843.16513.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257365470.14183.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257373117.23520.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257373813.14183.typo3-project-typo3v4mvc@lists.typo3.org> Thanks - wonderful! Steffen Kamper schrieb: > Hi, > > Thomas "Thasmo" Deinhamer schrieb: >> I just realized, that $renderer->headerData is a protected >> variable, so it's not accessible inside the hook. >> >> May there be a chance to extend the PageRenderer with public >> methods called 'getHeaderData()' which returns the headerData >> and 'setHeaderData($data)' which sets it again? >> >> Or even make $headerData public? >> >> Thanks for you oppinions/solutions! >> > > see #12469 which will be included in beta3. > > vg Steffen From sebastian at typo3.org Thu Nov 5 08:27:30 2009 From: sebastian at typo3.org (=?ISO-8859-15?Q?Sebastian_Kurf=FCrst?=) Date: Thu, 05 Nov 2009 08:27:30 +0100 Subject: [TYPO3-mvc] Text in extbase report In-Reply-To: <mailman.1.1257369522.18915.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257369522.18915.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257406077.21308.typo3-project-typo3v4mvc@lists.typo3.org> Hi Steffen, you have commit rights, so you are welcome to change this and commit it :-) Greets, Sebastian From sebastian at typo3.org Thu Nov 5 08:29:31 2009 From: sebastian at typo3.org (=?UTF-8?B?U2ViYXN0aWFuIEt1cmbDvHJzdA==?=) Date: Thu, 05 Nov 2009 08:29:31 +0100 Subject: [TYPO3-mvc] Forwarding action without loosing request parameters In-Reply-To: <mailman.1.1257361124.9403.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256983908.16731.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257014719.18080.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257361124.9403.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257406198.21308.typo3-project-typo3v4mvc@lists.typo3.org> Hi Bastian, I've been thinking about this also some time ago and I think it is correct the way it is. Reason: - Controllers and Actions are an abstract concept - thus every controller "knows" about actions (or at least can act on each of them differently). THat's why the Request has an "getControllerActionName" etc... However, the actionController provides you with the mapping of the abstract concept "action" to the implementation concept "actionMethod" - so I think it's perfectly OK :-) Greets, Sebastian Am 04.11.09 19:58, schrieb Bastian Waidelich: > Jochen Rau wrote: > > Hellau, > >>> It's the AbstractController ;) >> >> You are right. I have read AbstractController and wrote >> ActionController. ;) > > Acutally.. Shouldn't it be in the ActionController? > I know, it's like that in FLOW3 as well, but forward() and redirect() > expect action and controller name as parameter - so it only makes sense > for an action controller, no? > > Bastian From info at sk-typo3.de Thu Nov 5 09:33:32 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Thu, 05 Nov 2009 09:33:32 +0100 Subject: [TYPO3-mvc] Text in extbase report In-Reply-To: <mailman.1.1257406077.21308.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257369522.18915.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257406077.21308.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257410033.25731.typo3-project-typo3v4mvc@lists.typo3.org> Hi Sebastian, Sebastian Kurf?rst schrieb: > Hi Steffen, > > you have commit rights, so you are welcome to change this and commit it :-) > right, i only wanted your comment which wording is the best ;) And of course your vote in core list as the check informs users in install tool about this problem with eaccelerator and extbase, which is good if they don't install reports module. vg Steffen From bastian at typo3.org Thu Nov 5 11:41:41 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Thu, 05 Nov 2009 11:41:41 +0100 Subject: [TYPO3-mvc] Forwarding action without loosing request parameters In-Reply-To: <mailman.1.1257364663.13232.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256939073.32037.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256975196.7668.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257107344.5888.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257361388.9955.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257364663.13232.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257417725.3707.typo3-project-typo3v4mvc@lists.typo3.org> Thomas "Thasmo" Deinhamer wrote: Hi Thomas, > Seems like the UriBuilder creates URIs with a leading slash [...] > Is this a bug or does the trailing slash needed to be cut off > the $uri inside redirectToURI() before appended to $baseUri? It's a bug in the UriBuilder. Could you open-up an issue at http://forge.typo3.org/projects/typo3v4-mvc/issues - I'll take care of it! Thanks for the feedback, Bastian From info at rs-websystems.de Thu Nov 5 12:14:37 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Thu, 05 Nov 2009 12:14:37 +0100 Subject: [TYPO3-mvc] Create Dynamic CSS File via Fluid In-Reply-To: <mailman.1.1257358401.4949.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256544065.22409.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257358401.4949.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257419708.6671.typo3-project-typo3v4mvc@lists.typo3.org> Thomas "Thasmo" Deinhamer schrieb: > $GLOBALS['TSFE']->getPageRenderer()->addCssFile('path/to/file.css'); > :) Hey, thanks, but this is not what I aimed for :) I'm a kind of looking for automatic change of template dependend on pagetype. Since the content of the css should be rendered with fluid ... Currently im just including the block within the page. One Possibility would be to create a "save content as file" viewHelper which saves all rendered ChildContent to a defined File, and includes it at the page. But this might be a bit against the paradigma. regards Steffen From falcifer2001 at yahoo.es Sat Nov 7 12:32:06 2009 From: falcifer2001 at yahoo.es (Fernando Arconada) Date: Sat, 7 Nov 2009 11:32:06 +0000 (UTC) Subject: [TYPO3-mvc] just to argue a bit: what about Doctrine? Message-ID: <mailman.1.1257593526.15674.typo3-project-typo3v4mvc@lists.typo3.org> Hello TYPO3 it's a big project, FLOW3 looks really great as framework. But i'm a bit worried about reinventing the wheel. This days we could read that Zend Framework endorses Doctrine, of course Symfony do the same (Doctrine's author is working at Sensio) http://old.nabble.com/Discontinuing-Zend-Entity-in-favour-of-Doctrine- integration-td26117819.html I only want to know, Why the TYPO3/FLOW3 solution (of course i'm only talking about ORM) it is better than Doctrine? Why dont integrate Doctrine? Doctrine it's a big project, very well documented and spreaded in the open source comunity. Our babies are always the most beautiful and we are very proud of them. But really we are doing all better than other frameworks? are there something writen about this? Hope your answers Fernando Arconada From jochen.rau at typoplanet.de Sat Nov 7 13:38:45 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Sat, 07 Nov 2009 13:38:45 +0100 Subject: [TYPO3-mvc] just to argue a bit: what about Doctrine? In-Reply-To: <mailman.1.1257593526.15674.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257593526.15674.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257597555.20822.typo3-project-typo3v4mvc@lists.typo3.org> Hi Frenando. Please don't cross-post. Regards Jochen Fernando Arconada wrote: > Hello > > TYPO3 it's a big project, FLOW3 looks really great as framework. But i'm > a bit worried about reinventing the wheel. This days we could read that > Zend Framework endorses Doctrine, of course Symfony do the same > (Doctrine's author is working at Sensio) > http://old.nabble.com/Discontinuing-Zend-Entity-in-favour-of-Doctrine- > integration-td26117819.html > > I only want to know, Why the TYPO3/FLOW3 solution (of course i'm only > talking about ORM) it is better than Doctrine? > Why dont integrate Doctrine? > > Doctrine it's a big project, very well documented and spreaded in the > open source comunity. > > Our babies are always the most beautiful and we are very proud of them. > But really we are doing all better than other frameworks? are there > something writen about this? > > > Hope your answers > > > Fernando Arconada -- Every nit picked is a bug fixed From falcifer2001 at yahoo.es Sat Nov 7 15:09:00 2009 From: falcifer2001 at yahoo.es (Fernando Arconada) Date: Sat, 7 Nov 2009 14:09:00 +0000 (UTC) Subject: [TYPO3-mvc] just to argue a bit: what about Doctrine? References: <mailman.1.1257593526.15674.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257597555.20822.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257602940.25895.typo3-project-typo3v4mvc@lists.typo3.org> Ok Jochen, but I were waiting for your opinion :-( would i get it? El Sat, 07 Nov 2009 13:38:45 +0100, Jochen Rau escribi?: > Hi Frenando. > > Please don't cross-post. > > Regards > Jochen > > Fernando Arconada wrote: >> Hello >> >> TYPO3 it's a big project, FLOW3 looks really great as framework. But >> i'm a bit worried about reinventing the wheel. This days we could read >> that Zend Framework endorses Doctrine, of course Symfony do the same >> (Doctrine's author is working at Sensio) >> http://old.nabble.com/Discontinuing-Zend-Entity-in-favour-of-Doctrine- >> integration-td26117819.html >> >> I only want to know, Why the TYPO3/FLOW3 solution (of course i'm only >> talking about ORM) it is better than Doctrine? Why dont integrate >> Doctrine? >> >> Doctrine it's a big project, very well documented and spreaded in the >> open source comunity. >> >> Our babies are always the most beautiful and we are very proud of them. >> But really we are doing all better than other frameworks? are there >> something writen about this? >> >> >> Hope your answers >> >> >> Fernando Arconada From jochen.rau at typoplanet.de Sat Nov 7 15:52:13 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Sat, 07 Nov 2009 15:52:13 +0100 Subject: [TYPO3-mvc] Relation-Field of existing objects not updated In-Reply-To: <mailman.1.1256748211.8197.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1255047749.355.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1255087239.355.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1255095340.355.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1256286586.25717.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256481524.25322.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256720050.1794.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256748211.8197.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257605562.29153.typo3-project-typo3v4mvc@lists.typo3.org> Hi Joerg. Joerg Schoppet wrote: > I still get the error: > Tx_Extbase_Persistence_Exception_CleanStateNotMemorized > The clean state of the object "Tx_MyExample_Domain_Model_Invoice" has > not been memorized before asking _isDirty(). > > I think it is, because the positions are tried to saved first and at > this time, the invoice is not saved. Please give the latest rev. of Extbase a try. I have refactored the persistence layer to solve several issues. Sorry for the inconvenience. Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Sat Nov 7 16:24:12 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Sat, 07 Nov 2009 16:24:12 +0100 Subject: [TYPO3-mvc] [!!!] FYI: Changes of Extbase in TYPO3 beta3 Message-ID: <mailman.1.1257607481.31336.typo3-project-typo3v4mvc@lists.typo3.org> Hi. There are some changes introduced with v0.9.13 of Extbase (=beta3 of TYPO3 4.3). 1) Lazy Loading The configuration of the loading strategy has changed. The TCA option "loadingStrategy" was removed. You have to annotate your property with "@lazy" now (compatible with FLOW3). Extbase chooses the appropriate strategy depending on the property type: ObjectStorage ==> LazyObjectStorage Tx_MyExt_MyObject ==> LazyLoadingProxy 2) Cascading Deletions Related objects are not deleted with its parent by default. There are two ways to get them deleted with its parent: You can remove them "manually" from their repository (if any), or you can annotate the parent property with "@cascade remove". The relation information keeps intact if they are marked as deleted=1. This is only useful if we have a one-to-one-relation or one-to-many-relation. Many-to-many-relations are not touched. Keep in mind, that detaching an object from its parent will remove the relation but not the related object. 3) Reference Index and Cache Clearing The reference index is not updated by default anymore for performance reasons. You have to set: config.tx_extbase.persistence.updateReferenceIndex = 1 to enable this feature. There is also an option config.tx_extbase.persistence.enableAutomaticCacheClearing = 1 which is enabled by default. Setting this to 0 can increase the performance. We really appreciate your feedback. Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Sat Nov 7 16:28:40 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Sat, 07 Nov 2009 16:28:40 +0100 Subject: [TYPO3-mvc] [!!!] FYI: Changes of Extbase in TYPO3 beta3 In-Reply-To: <mailman.1.1257607481.31336.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257607481.31336.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257607749.31710.typo3-project-typo3v4mvc@lists.typo3.org> Ah, and 5) if you want the raw QueryResult object to be returned by $query->execute() or ->count() you can now specify $querySettings->setReturnRawQueryResult(TRUE); This might be useful for some rare cases and should not be used without knowing the backgrounds as it is incompatible with FLOW3. Regards Jochen -- Every nit picked is a bug fixed From thasmo at gmail.com Sat Nov 7 16:32:31 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Sat, 07 Nov 2009 16:32:31 +0100 Subject: [TYPO3-mvc] [!!!] FYI: Changes of Extbase in TYPO3 beta3 In-Reply-To: <mailman.1.1257607481.31336.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257607481.31336.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257607981.29520.typo3-project-typo3v4mvc@lists.typo3.org> Hoi! Refering to 3), what's the disadvantage then, if the performance increases? What exactly is the reference index for? Is there any description/documentation about it? Thank you! Jochen Rau schrieb: > Hi. > > There are some changes introduced with v0.9.13 of Extbase (=beta3 of > TYPO3 4.3). > > 1) Lazy Loading > The configuration of the loading strategy has changed. The TCA option > "loadingStrategy" was removed. You have to annotate your property with > "@lazy" now (compatible with FLOW3). Extbase chooses the appropriate > strategy depending on the property type: > ObjectStorage ==> LazyObjectStorage > Tx_MyExt_MyObject ==> LazyLoadingProxy > > 2) Cascading Deletions > Related objects are not deleted with its parent by default. There are > two ways to get them deleted with its parent: > You can remove them "manually" from their repository (if any), > or you can annotate the parent property with "@cascade remove". > The relation information keeps intact if they are marked as deleted=1. > This is only useful if we have a one-to-one-relation or > one-to-many-relation. Many-to-many-relations are not touched. > > Keep in mind, that detaching an object from its parent will remove the > relation but not the related object. > > 3) Reference Index and Cache Clearing > The reference index is not updated by default anymore for performance > reasons. You have to set: > config.tx_extbase.persistence.updateReferenceIndex = 1 > to enable this feature. > > There is also an option > config.tx_extbase.persistence.enableAutomaticCacheClearing = 1 > which is enabled by default. Setting this to 0 can increase the > performance. > > We really appreciate your feedback. > > Regards > Jochen > From jochen.rau at typoplanet.de Sat Nov 7 18:40:10 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Sat, 07 Nov 2009 18:40:10 +0100 Subject: [TYPO3-mvc] [!!!] FYI: Changes of Extbase in TYPO3 beta3 In-Reply-To: <mailman.1.1257607981.29520.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257607481.31336.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257607981.29520.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257615639.7117.typo3-project-typo3v4mvc@lists.typo3.org> Hi. This is the reference index of TYPO3 introduced in 4.2.0. In the List-Module there is a cloumn [Ref.] showing the number of references of the list item. Click on the number to get more information about the references. Sometimes it is useful (for extension developers) to kepp this index updated. But Sebastian and I think that it should not be set by default. Regards Jochen Thomas "Thasmo" Deinhamer wrote: > Hoi! > > Refering to 3), what's the disadvantage then, > if the performance increases? What exactly is > the reference index for? Is there any > description/documentation about it? > > Thank you! > > Jochen Rau schrieb: >> Hi. >> >> There are some changes introduced with v0.9.13 of Extbase (=beta3 of >> TYPO3 4.3). >> >> 1) Lazy Loading >> The configuration of the loading strategy has changed. The TCA option >> "loadingStrategy" was removed. You have to annotate your property with >> "@lazy" now (compatible with FLOW3). Extbase chooses the appropriate >> strategy depending on the property type: >> ObjectStorage ==> LazyObjectStorage >> Tx_MyExt_MyObject ==> LazyLoadingProxy >> >> 2) Cascading Deletions >> Related objects are not deleted with its parent by default. There are >> two ways to get them deleted with its parent: >> You can remove them "manually" from their repository (if any), >> or you can annotate the parent property with "@cascade remove". >> The relation information keeps intact if they are marked as deleted=1. >> This is only useful if we have a one-to-one-relation or >> one-to-many-relation. Many-to-many-relations are not touched. >> >> Keep in mind, that detaching an object from its parent will remove the >> relation but not the related object. >> >> 3) Reference Index and Cache Clearing >> The reference index is not updated by default anymore for performance >> reasons. You have to set: >> config.tx_extbase.persistence.updateReferenceIndex = 1 >> to enable this feature. >> >> There is also an option >> config.tx_extbase.persistence.enableAutomaticCacheClearing = 1 >> which is enabled by default. Setting this to 0 can increase the >> performance. >> >> We really appreciate your feedback. >> >> Regards >> Jochen >> -- Every nit picked is a bug fixed From thasmo at gmail.com Sat Nov 7 22:15:04 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Sat, 07 Nov 2009 22:15:04 +0100 Subject: [TYPO3-mvc] [!!!] FYI: Changes of Extbase in TYPO3 beta3 In-Reply-To: <mailman.1.1257615639.7117.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257607481.31336.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257607981.29520.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257615639.7117.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257628534.19758.typo3-project-typo3v4mvc@lists.typo3.org> I see - thanks for the clarification! =o) Jochen Rau schrieb: > Hi. > > This is the reference index of TYPO3 introduced in 4.2.0. > > In the List-Module there is a cloumn [Ref.] showing the number of > references of the list item. Click on the number to get more information > about the references. > > Sometimes it is useful (for extension developers) to kepp this index > updated. But Sebastian and I think that it should not be set by default. > > Regards > Jochen > > > Thomas "Thasmo" Deinhamer wrote: >> Hoi! >> >> Refering to 3), what's the disadvantage then, >> if the performance increases? What exactly is >> the reference index for? Is there any >> description/documentation about it? >> >> Thank you! >> >> Jochen Rau schrieb: >>> Hi. >>> >>> There are some changes introduced with v0.9.13 of Extbase (=beta3 of >>> TYPO3 4.3). >>> >>> 1) Lazy Loading >>> The configuration of the loading strategy has changed. The TCA option >>> "loadingStrategy" was removed. You have to annotate your property with >>> "@lazy" now (compatible with FLOW3). Extbase chooses the appropriate >>> strategy depending on the property type: >>> ObjectStorage ==> LazyObjectStorage >>> Tx_MyExt_MyObject ==> LazyLoadingProxy >>> >>> 2) Cascading Deletions >>> Related objects are not deleted with its parent by default. There are >>> two ways to get them deleted with its parent: >>> You can remove them "manually" from their repository (if any), >>> or you can annotate the parent property with "@cascade remove". >>> The relation information keeps intact if they are marked as deleted=1. >>> This is only useful if we have a one-to-one-relation or >>> one-to-many-relation. Many-to-many-relations are not touched. >>> >>> Keep in mind, that detaching an object from its parent will remove the >>> relation but not the related object. >>> >>> 3) Reference Index and Cache Clearing >>> The reference index is not updated by default anymore for performance >>> reasons. You have to set: >>> config.tx_extbase.persistence.updateReferenceIndex = 1 >>> to enable this feature. >>> >>> There is also an option >>> config.tx_extbase.persistence.enableAutomaticCacheClearing = 1 >>> which is enabled by default. Setting this to 0 can increase the >>> performance. >>> >>> We really appreciate your feedback. >>> >>> Regards >>> Jochen >>> > From info at rs-websystems.de Sun Nov 8 17:45:48 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Sun, 08 Nov 2009 17:45:48 +0100 Subject: [TYPO3-mvc] How To implement restrictions on "per Property" basis Message-ID: <mailman.1.1257698778.29221.typo3-project-typo3v4mvc@lists.typo3.org> Hey folks, im currently on two projects I want to realize "extbased" where I need, to show different fields, allow to edit different fields etc based upon the user which is logged in... What would would be "best practice" for that? I already thought about an "ACL viewhelper" wrapping each field in the templates, which "deletes" unallowed fields. This seems not quite handy to me... Any ideas? regards Steffen From eliasfernandez at gmail.com Sun Nov 8 19:43:52 2009 From: eliasfernandez at gmail.com (=?ISO-8859-1?Q?El=EDas_Fern=E1ndez?=) Date: Sun, 8 Nov 2009 19:43:52 +0100 Subject: [TYPO3-mvc] authentication with extbase Message-ID: <mailman.1349.1257705864.595.typo3-project-typo3v4mvc@lists.typo3.org> Hello list, I?m currently developing an extension that require authentication. I want to try extbase and fluid, but logically ( is beta ) it has today a lack of documentation, and the examples i could test don?t require authentication. ? Do you know how it can be solved ? I?m thinking like working in 4.2 and before versions. I will separate the views list, edit and insert in differents pages, so i can control the authentication logic with restricted pages. but in fluid, the only way i can do it is with additionalAttributes="{uid=2}" and this will generate 2 id attributes in the url. Thank you very much, and excuse my english -- El?as Fern?ndez Vel?zquez http://www.trevenque.es From info at sk-typo3.de Sun Nov 8 23:01:04 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Sun, 08 Nov 2009 23:01:04 +0100 Subject: [TYPO3-mvc] How to retrieve cObj->data ? In-Reply-To: <mailman.1.1257251836.12641.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1254308507.21066.typo3-project-typo3v4mvc@lists.netfielders.de> <mailman.1.1256729878.16466.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256730819.18165.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256732067.19893.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257171265.11073.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257236218.23453.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257241024.30038.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257251836.12641.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257717695.7602.typo3-project-typo3v4mvc@lists.typo3.org> Hi Bastian, sry for the delay, big thx! vg Steffen From sebastian at typo3.org Mon Nov 9 15:02:41 2009 From: sebastian at typo3.org (=?ISO-8859-15?Q?Sebastian_Kurf=FCrst?=) Date: Mon, 09 Nov 2009 15:02:41 +0100 Subject: [TYPO3-mvc] How To implement restrictions on "per Property" basis In-Reply-To: <mailman.1.1257698778.29221.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257698778.29221.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257775393.8202.typo3-project-typo3v4mvc@lists.typo3.org> Hi Steffen, > What would would be "best practice" for that? I already thought about an > "ACL viewhelper" wrapping each field in the templates, which "deletes" > unallowed fields. > > This seems not quite handy to me... Any ideas? Really? I think this is not bad actually... As you _only_ need to modify your template, and nothing else. In case your ACL ViewHelper (or however you call it) decides to render its children, the corresponding form element will be added to the HMAC generation, but in case it decides not to show it, the field will not be added to the HMAC. Thus, you won't need any additional checks on the server side. I'd think this is rather elegant... Greets, Sebastian From typo.removeformessage at fx-graefix.de Mon Nov 9 15:44:06 2009 From: typo.removeformessage at fx-graefix.de (Franz Koch) Date: Mon, 09 Nov 2009 15:44:06 +0100 Subject: [TYPO3-mvc] How To implement restrictions on "per Property" basis In-Reply-To: <mailman.1.1257775393.8202.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257698778.29221.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257775393.8202.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257778262.12460.typo3-project-typo3v4mvc@lists.typo3.org> Hi Sebastian, >> What would would be "best practice" for that? I already thought about an >> "ACL viewhelper" wrapping each field in the templates, which "deletes" >> unallowed fields. >> >> This seems not quite handy to me... Any ideas? > Really? I think this is not bad actually... As you _only_ need to modify > your template, and nothing else. > In case your ACL ViewHelper (or however you call it) decides to render > its children, the corresponding form element will be added to the HMAC > generation, but in case it decides not to show it, the field will not be > added to the HMAC. Thus, you won't need any additional checks on the > server side. > I'd think this is rather elegant... I'm not familiar with extbase yet, I only read the documentation of FLOW3 so far and that raised a question here. How do you ensure that only those values get stored that the user is actually allowed to fill? Well yes, the form only provides certain fields according to the users rights then, but that doesn't prevent hackers to send additional field values. So how do those get filtered out before they get stored, if storing is working simmilar to FLOW3 (object based)? Or is this traditional handmade code to interact with the DB and validate fields? I'm planning a extbase based extension in the next weeks where I need similar functionality. -- kind regards, Franz Koch --------------------------------------------------- PayPal-Account: 'paypal _at_ elements-net _dot_ de' --------------------------------------------------- From sebastian at typo3.org Mon Nov 9 17:44:38 2009 From: sebastian at typo3.org (=?ISO-8859-15?Q?Sebastian_Kurf=FCrst?=) Date: Mon, 09 Nov 2009 17:44:38 +0100 Subject: [TYPO3-mvc] How To implement restrictions on "per Property" basis In-Reply-To: <mailman.1.1257778262.12460.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257698778.29221.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257775393.8202.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257778262.12460.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257785109.22195.typo3-project-typo3v4mvc@lists.typo3.org> Hey, see http://forge.typo3.org/issues/show/4960 for more details ;) and if there are questions, feel free to ask :) Greets, Sebastian From mail at pascal-jungblut.com Mon Nov 9 18:38:17 2009 From: mail at pascal-jungblut.com (Pascal Jungblut) Date: Mon, 9 Nov 2009 18:38:17 +0100 Subject: [TYPO3-mvc] Platform for sharing Fluid viewhelpers Message-ID: <mailman.1755.1257788331.595.typo3-project-typo3v4mvc@lists.typo3.org> Hello, as Fluid viewhelpers are very reusable and we all love open source, I came up with an idea of a (small) platform where developers can share their viewhelpers easily. I'd like to start a website, write a suitable extension and maintain the whole thing, but before that I'm interested in your opinion. Do you have any recommendations or requests on how to organize the platform? Or do you think it's a bad idea in general? Please Comment! Regards, Pascal From info at rs-websystems.de Mon Nov 9 18:40:01 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Mon, 09 Nov 2009 18:40:01 +0100 Subject: [TYPO3-mvc] Platform for sharing Fluid viewhelpers In-Reply-To: <mailman.1755.1257788331.595.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1755.1257788331.595.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257788435.25958.typo3-project-typo3v4mvc@lists.typo3.org> Pascal Jungblut schrieb: > Hello, > > as Fluid viewhelpers are very reusable and we all love open source, I > came up with an idea of a (small) platform where developers can share > their viewhelpers easily. I'd like to start a website, write a suitable > extension and maintain the whole thing, but before that I'm interested > in your opinion. > > Do you have any recommendations or requests on how to organize the > platform? Or do you think it's a bad idea in general? Please Comment! > > Regards, > Pascal Connect with Steffen Kamper, afaik he's working on this already ... Some kind of ViewHelper - TER regards Steffen From benno_weinzierl at web.de Mon Nov 9 19:02:14 2009 From: benno_weinzierl at web.de (Benno Weinzierl) Date: Mon, 9 Nov 2009 19:02:14 +0100 Subject: [TYPO3-mvc] Flexform separated in settings, persistence, view? Message-ID: <mailman.1.1257789799.27769.typo3-project-typo3v4mvc@lists.typo3.org> Hi Guys, my extbase plugin (working just fine in beta1) is not working any more in beta3. Is is not working because the configuration from the flexform does not arrive in $this->settings in the controller. After debuging the FrontendConfigurationManager i found the following funktion is the problem. The flexform is parsed in parts that do not exist. How do i have to structure my flexform to get this working again? The blogexample flexform looks like the old format in svn - i did not test it - maybe it does not work either? /** * Overrides configuration settings from flexforms. * This merges the whole flexform data, and overrides switchable controller actions. * * @param array the framework configuration * @return array the framework configuration with overridden data from flexform */ protected function overrideConfigurationFromFlexform(array $frameworkConfiguration) { if (strlen($this->contentObject->data['pi_flexform']) > 0) { $flexformConfiguration = $this->convertFlexformContentToArray($this->contentObject->data['pi_flexform']); $frameworkConfiguration = $this->mergeConfigurationPartFromFlexformIntoFrameworkConfiguration($frameworkConfiguration, $flexformConfiguration, 'settings'); $frameworkConfiguration = $this->mergeConfigurationPartFromFlexformIntoFrameworkConfiguration($frameworkConfiguration, $flexformConfiguration, 'persistence'); $frameworkConfiguration = $this->mergeConfigurationPartFromFlexformIntoFrameworkConfiguration($frameworkConfiguration, $flexformConfiguration, 'view'); $frameworkConfiguration = $this->overrideSwitchableControllerActionsFromFlexform($frameworkConfiguration, $flexformConfiguration); } return $frameworkConfiguration; } From thasmo at gmail.com Mon Nov 9 19:19:15 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Mon, 09 Nov 2009 19:19:15 +0100 Subject: [TYPO3-mvc] Platform for sharing Fluid viewhelpers In-Reply-To: <mailman.1755.1257788331.595.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1755.1257788331.595.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257790786.28467.typo3-project-typo3v4mvc@lists.typo3.org> Imho the idea itself is kinda nice, categorizing the extensions into categories like it' already the case in ext_emconf.php. (fe, be, etc.) An extra category could be 'viewhelpers' or something. Generally I'd think typo3.org should be the place to host such a viewhelper repository, like all the other extensions, which are hostet on there. Maybe you can come up with some special feature or anything else, which would give such a platform an extra plus over the Rep of TYPO3. Any other oppinions? Pascal Jungblut schrieb: > Hello, > > as Fluid viewhelpers are very reusable and we all love open source, I > came up with an idea of a (small) platform where developers can share > their viewhelpers easily. I'd like to start a website, write a suitable > extension and maintain the whole thing, but before that I'm interested > in your opinion. > > Do you have any recommendations or requests on how to organize the > platform? Or do you think it's a bad idea in general? Please Comment! > > Regards, > Pascal From thasmo at gmail.com Mon Nov 9 19:22:27 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Mon, 09 Nov 2009 19:22:27 +0100 Subject: [TYPO3-mvc] CSS and JS files get included in the wrong order if using the page-renderer Message-ID: <mailman.1.1257790979.28467.typo3-project-typo3v4mvc@lists.typo3.org> Hello! I'm including JS and CSS files using $GLOBALS['TSFE']->getPageRenderer()->addJsFile($file); inside a user-function. For my surprise the order of the files in the source is the following: <head> <!-- $file is put at the top: --> <script src="$file" type="text/javascript"></script> <script src="reset.js" type="text/javascript"></script> <script src="common.js" type="text/javascript"></script> </head> The files 'reset.js' and 'common.js' were defined inside the TYPO3 page object using typoscript. Imho the files defined in the page object should be renderer BEFORE all other includes done by the API inside hooks etc. Since I don't know how the page object is called in the typoscript, I can't add my extension JS-files using typoscript. Is there any other solution to get a correct source-order for this? Thanks a lot! PS: Sorry for double post, but I think this fits here more, as I got no answers in "typo3_4-3.general" until now. From bastian at typo3.org Mon Nov 9 19:40:29 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Mon, 09 Nov 2009 19:40:29 +0100 Subject: [TYPO3-mvc] Flexform separated in settings, persistence, view? In-Reply-To: <mailman.1.1257789799.27769.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257789799.27769.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257792071.30363.typo3-project-typo3v4mvc@lists.typo3.org> Benno Weinzierl wrote: Hi Benno, > The flexform is parsed in parts that do not exist. How do i have to > structure my flexform to get this working again? It's not a bug, it's a feature ;) With revision 1600 it's possible to override all configuration options. To change settings, you have to prefix the respective flexform fields with "setting.". See https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/viewhelpertest/Configuration/FlexForms/flexform_test.xml for an example and http://forge.typo3.org/repositories/revision/typo3v4-mvc/1600 for the commit message. HTH, Bastian From thasmo at gmail.com Mon Nov 9 20:46:33 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Mon, 09 Nov 2009 20:46:33 +0100 Subject: [TYPO3-mvc] Repository->findByUid() throws error Message-ID: <mailman.1.1257796025.1563.typo3-project-typo3v4mvc@lists.typo3.org> Hello! This call troubles me: "$domain = $this->domainRepository->findByUid(3);" As for 'domain' I am referring to the sys_domain table of TYPO3. The error given is: Tx_Extbase_MVC_Exception_InvalidArgumentType Expected parameter 1 to be object, NULL given The error occurs in 'Repository.php" on line 230, as on line 227 no row was found. But there is a record in 'sys_domain' with the uid of 3. Also if there wouldn't, the error above should not be thrown?! If I put line 230 into the condition starting at line 227, the method returns NULL. What I'm doing wrong here? Thanks! From benno_weinzierl at web.de Mon Nov 9 20:52:14 2009 From: benno_weinzierl at web.de (Benno Weinzierl) Date: Mon, 9 Nov 2009 20:52:14 +0100 Subject: [TYPO3-mvc] Flexform separated in settings, persistence, view? References: <mailman.1.1257789799.27769.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257792071.30363.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257796398.2564.typo3-project-typo3v4mvc@lists.typo3.org> Hey Bastian, thanx for the reply! This is what i was looking for! This should be changed in the blog example to prevent confusion: http://forge.typo3.org/repositories/entry/typo3v4-mvc/blog_example/trunk/Configuration/FlexForms/flexform_list.xml Benno "Bastian Waidelich" <bastian at typo3.org> schrieb im Newsbeitrag news:mailman.1.1257792071.30363.typo3-project-typo3v4mvc at lists.typo3.org... > Benno Weinzierl wrote: > > Hi Benno, > >> The flexform is parsed in parts that do not exist. How do i have to >> structure my flexform to get this working again? > > It's not a bug, it's a feature ;) > With revision 1600 it's possible to override all configuration options. To > change settings, you have to prefix the respective flexform fields with > "setting.". > > See > https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/viewhelpertest/Configuration/FlexForms/flexform_test.xml > for an example > and > http://forge.typo3.org/repositories/revision/typo3v4-mvc/1600 > for the commit message. > > HTH, > Bastian > From typo.removeformessage at fx-graefix.de Mon Nov 9 21:55:35 2009 From: typo.removeformessage at fx-graefix.de (Franz Koch) Date: Mon, 09 Nov 2009 21:55:35 +0100 Subject: [TYPO3-mvc] How To implement restrictions on "per Property" basis In-Reply-To: <mailman.1.1257785109.22195.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257698778.29221.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257775393.8202.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257778262.12460.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257785109.22195.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257800246.6885.typo3-project-typo3v4mvc@lists.typo3.org> Hey Sebastian, > see http://forge.typo3.org/issues/show/4960 for more details ;) thanks for the link. I stumbled upon HMAC once or twice, but didn't know what it was. > and if there are questions, feel free to ask :) thanks - I will for sure when I start my first extension based on extbase or dig into FLOW3 :) -- kind regards, Franz Koch --------------------------------------------------- PayPal-Account: 'paypal _at_ elements-net _dot_ de' --------------------------------------------------- From info at sk-typo3.de Mon Nov 9 22:50:36 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 09 Nov 2009 22:50:36 +0100 Subject: [TYPO3-mvc] CSS and JS files get included in the wrong order if using the page-renderer In-Reply-To: <mailman.1.1257790979.28467.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257790979.28467.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257803464.10299.typo3-project-typo3v4mvc@lists.typo3.org> Hi, it's wrong here, let's continue in 4.3 general list And please be more patient if a post is not answered within one day. vg Steffen From info at sk-typo3.de Mon Nov 9 22:53:52 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 09 Nov 2009 22:53:52 +0100 Subject: [TYPO3-mvc] Platform for sharing Fluid viewhelpers In-Reply-To: <mailman.1.1257788435.25958.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1755.1257788331.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257788435.25958.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257803660.10299.typo3-project-typo3v4mvc@lists.typo3.org> Steffen Ritter schrieb: > Connect with Steffen Kamper, afaik he's working on this already ... > Some kind of ViewHelper - TER > -> beep ... beep ... beep : connection established! I talked to Bastian and he wanted to realize this with FLOW3. But understand that this won't happen before 4.3 release as we all concentrate on the release in the hot phase now. vg Steffen From bastian at typo3.org Tue Nov 10 00:11:54 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Tue, 10 Nov 2009 00:11:54 +0100 Subject: [TYPO3-mvc] Platform for sharing Fluid viewhelpers In-Reply-To: <mailman.1.1257803660.10299.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1755.1257788331.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257788435.25958.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257803660.10299.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257808348.16238.typo3-project-typo3v4mvc@lists.typo3.org> Steffen Kamper wrote: > -> beep ... beep ... beep : connection established! > I talked to Bastian and... ...beep ...beep ...grrzzssss#*?&#$?!Q?$... connection closed ;) In the meantime we were rather thinking of a micro site about fluid in general. That would contain documentation, Fluid ports and a view helper repository or "incubator" including comments, ratings and all that web 2.0 buzz. fluid.typo3.org with SSO would be nice... ;) It does not necessarily have to be FLOW3 based, but it would be a nice use case for it IMO. > But understand that this won't happen before 4.3 release as we all > concentrate on the release in the hot phase now. My plan was, to start with something easy but solid to be able to come up with a usable solution relatively quickly. But I haven't even found the time yet to write down my thoughts and to talk to the core team about the idea.. Furthermore I'm leaving to Australia in a few days and don't know yet, how much time I can invest from down there. But it's good to see that there is interest in this topic. So what about creating a page for it @ wiki.typo3.org and start collecting ideas and search for collaborators? I'm definitely keen to help where I can! Best, Bastian From sebastian at typo3.org Tue Nov 10 07:00:25 2009 From: sebastian at typo3.org (=?ISO-8859-15?Q?Sebastian_Kurf=FCrst?=) Date: Tue, 10 Nov 2009 07:00:25 +0100 Subject: [TYPO3-mvc] Flexform separated in settings, persistence, view? In-Reply-To: <mailman.1.1257796398.2564.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257789799.27769.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257792071.30363.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257796398.2564.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257832858.4739.typo3-project-typo3v4mvc@lists.typo3.org> Hey Benno, > This should be changed in the blog example to prevent confusion: > http://forge.typo3.org/repositories/entry/typo3v4-mvc/blog_example/trunk/Configuration/FlexForms/flexform_list.xml Definitely :-) Do you want to create a patch / a bug report on forge? This would be helpful for us! Greets, Sebastian From sebastian at typo3.org Tue Nov 10 07:02:44 2009 From: sebastian at typo3.org (=?UTF-8?B?U2ViYXN0aWFuIEt1cmbDvHJzdA==?=) Date: Tue, 10 Nov 2009 07:02:44 +0100 Subject: [TYPO3-mvc] Repository->findByUid() throws error In-Reply-To: <mailman.1.1257796025.1563.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257796025.1563.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257832998.4739.typo3-project-typo3v4mvc@lists.typo3.org> Hi, my first guess is that the storage PID settings are configured wrongly. Maybe you need to disable inside your query that the storage pages are respected. For that, create a custom method inside your repository, and do a: $query->getQuerySettings()->setRespectStoragePage(FALSE). Greets, Sebastian From sebastian at typo3.org Tue Nov 10 08:38:28 2009 From: sebastian at typo3.org (=?ISO-8859-1?Q?Sebastian_Kurf=FCrst?=) Date: Tue, 10 Nov 2009 08:38:28 +0100 Subject: [TYPO3-mvc] authentication with extbase In-Reply-To: <mailman.1349.1257705864.595.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1349.1257705864.595.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257838741.10787.typo3-project-typo3v4mvc@lists.typo3.org> Hi Eliaz, do I get it right that you want to make a list view available to everybody, but the edit forms only if the user has sufficent rights? Greets, Sebastian From eliasfernandez at gmail.com Tue Nov 10 09:06:25 2009 From: eliasfernandez at gmail.com (=?ISO-8859-1?Q?El=EDas_Fern=E1ndez?=) Date: Tue, 10 Nov 2009 09:06:25 +0100 Subject: [TYPO3-mvc] authentication with extbase In-Reply-To: <mailman.1.1257838741.10787.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1349.1257705864.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257838741.10787.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1952.1257840419.595.typo3-project-typo3v4mvc@lists.typo3.org> Exactly, Before "extbase" i did this with loginbox and page permissions. But i really don?t know how to start with "extbase". Maybe if i could see an existing extension that manage permissions. Thanks 2009/11/10 Sebastian Kurf?rst <sebastian at typo3.org> > Hi Eliaz, > > do I get it right that you want to make a list view available to > everybody, but the edit forms only if the user has sufficent rights? > > Greets, > Sebastian > _______________________________________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc at lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc > -- El?as Fern?ndez Vel?zquez Telefono : 627519816 ? 958 251733 http://www.recetae.com http://www.visae.es http://www.eliasfernandez.net http://www.trevenque.es From info at sk-typo3.de Tue Nov 10 09:49:22 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Tue, 10 Nov 2009 09:49:22 +0100 Subject: [TYPO3-mvc] authentication with extbase In-Reply-To: <mailman.1952.1257840419.595.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1349.1257705864.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257838741.10787.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1952.1257840419.595.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257842992.15999.typo3-project-typo3v4mvc@lists.typo3.org> Hi, El?as Fern?ndez schrieb: > Exactly, > Before "extbase" i did this with loginbox and page permissions. But i really > don?t know how to start with "extbase". Maybe if i could see an existing > extension that manage permissions. > this still exists. All you need to verify is the $GLOBALS['TSFE'] object holding all information about logged in user. vg Steffen From eliasfernandez at gmail.com Tue Nov 10 10:25:05 2009 From: eliasfernandez at gmail.com (=?ISO-8859-1?Q?El=EDas_Fern=E1ndez?=) Date: Tue, 10 Nov 2009 10:25:05 +0100 Subject: [TYPO3-mvc] authentication with extbase In-Reply-To: <mailman.1.1257842992.15999.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1349.1257705864.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257838741.10787.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1952.1257840419.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257842992.15999.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1989.1257845140.595.typo3-project-typo3v4mvc@lists.typo3.org> First of all, excuse my ignorance with extbase. I am sure that there is multiple ways to do this, but i don?t know because i?m absolutely newbie to extbase, but an experienced xclass programmer. I love the way the things will be with extbase + fluid, and i?m trying to make one project extension with it. But no matter if i develop this with my own old school mvc pattern. I have this Code: <f:if condition="{empresas}"> <f:then> <p class="bodytext">Here is a list of empresas:</p> <ul> <f:for each="{empresas}" as="empresa"> <li> <h3> <f:link.action action="index" controller="Empresa" arguments="{empresa : empresa}"> {empresa.name} </f:link.action> </h3> <p> <f:format.nl2br>{empresa.description}</f:format.nl2br> <f:link.action action="edit" controller="Empresa" arguments="{empresa : empresa}">Edit</f:link.action> <f:link.action action="delete" controller="Empresa" arguments="{empresa : empresa}">Delete</f:link.action> <p><strong><f:link.action action="add">Crear un nuevo blog</f:link.action></strong></p> </p> </li> </f:for> </ul> </f:then> <f:else> <p><strong><f:link.action action="add">Crear un nuevo blog</f:link.action></strong></p> </f:else> </f:if> and i don?t know how to link "edit" action to a different page id. I did it with additionalAttributes="{id:2}" . It works, but with two id in the url, i think it doesn?t work fine with realurl, or simulateStaticDocument. Probably it is not the better way, if it isn?t. How would you do ? Thanks 2009/11/10 Steffen Kamper <info at sk-typo3.de> > Hi, > > El?as Fern?ndez schrieb: > > Exactly, >> Before "extbase" i did this with loginbox and page permissions. But i >> really >> don?t know how to start with "extbase". Maybe if i could see an existing >> extension that manage permissions. >> >> > this still exists. All you need to verify is the $GLOBALS['TSFE'] object > holding all information about logged in user. > > vg Steffen > > _______________________________________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc at lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc > -- El?as Fern?ndez Vel?zquez http://www.recetae.com http://www.eliasfernandez.net http://www.trevenque.es From bastian at typo3.org Tue Nov 10 10:47:27 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Tue, 10 Nov 2009 10:47:27 +0100 Subject: [TYPO3-mvc] authentication with extbase In-Reply-To: <mailman.1989.1257845140.595.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1349.1257705864.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257838741.10787.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1952.1257840419.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257842992.15999.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1989.1257845140.595.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1257846477.20637.typo3-project-typo3v4mvc@lists.typo3.org> El?as Fern?ndez wrote: Hi El?as, let me give it a try: <f:if condition="{empresas}"> <f:then> <p class="bodytext">Here is a list of empresas:</p> <ul> <f:for each="{empresas}" as="empresa"> <li> <h3> <f:link.action action="index" controller="Empresa" arguments="{empresa: empresa}">{empresa.name}</f:link.action> </h3> <p> {empresa.description -> f:format.nl2br()} <f:link.action action="edit" controller="Empresa" arguments="{empresa: empresa}" pageUid="{settings.editPageUid}">Edit</f:link.action> <f:link.action action="delete" controller="Empresa" arguments="{empresa: empresa}">Delete</f:link.action> </p> <p> <strong><f:link.action action="add">Crear un nuevo blog</f:link.action></strong> </p> </li> </f:for> </ul> </f:then> <f:else> <p> <strong><f:link.action action="add">Crear un nuevo blog</f:link.action></strong> </p> </f:else> </f:if> (untested) > and i don?t know how to link "edit" action to a different page id. There are a lot of arguments for the action link/uri view helper (see https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/fluid/trunk/Classes/ViewHelpers/Link/ActionViewHelper.php). One of those is "pageUid". Best regards, Bastian From eliasfernandez at gmail.com Tue Nov 10 11:00:56 2009 From: eliasfernandez at gmail.com (=?ISO-8859-1?Q?El=EDas_Fern=E1ndez?=) Date: Tue, 10 Nov 2009 11:00:56 +0100 Subject: [TYPO3-mvc] authentication with extbase In-Reply-To: <mailman.1.1257846477.20637.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1349.1257705864.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257838741.10787.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1952.1257840419.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257842992.15999.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1989.1257845140.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257846477.20637.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1995.1257847291.595.typo3-project-typo3v4mvc@lists.typo3.org> Yes, it works ? Next time i?ll watch ActionViewHelper.php<https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/fluid/trunk/Classes/ViewHelpers/Link/ActionViewHelper.php> before ask. thank you 2009/11/10 Bastian Waidelich <bastian at typo3.org> > El?as Fern?ndez wrote: > > Hi El?as, > > let me give it a try: > > > <f:if condition="{empresas}"> > <f:then> > <p class="bodytext">Here is a list of empresas:</p> > <ul> > <f:for each="{empresas}" as="empresa"> > <li> > <h3> > <f:link.action action="index" controller="Empresa" > arguments="{empresa: empresa}">{empresa.name}</f:link.action> > </h3> > <p> > {empresa.description -> f:format.nl2br()} > <f:link.action action="edit" controller="Empresa" > arguments="{empresa: > empresa}" pageUid="{settings.editPageUid}">Edit</f:link.action> > > <f:link.action action="delete" controller="Empresa" > arguments="{empresa: empresa}">Delete</f:link.action> > </p> > <p> > <strong><f:link.action action="add">Crear un nuevo > blog</f:link.action></strong> > </p> > </li> > </f:for> > </ul> > </f:then> > <f:else> > <p> > <strong><f:link.action action="add">Crear un nuevo > blog</f:link.action></strong> > </p> > </f:else> > </f:if> > > (untested) > > > > and i don?t know how to link "edit" action to a different page id. >> > > There are a lot of arguments for the action link/uri view helper (see > https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/fluid/trunk/Classes/ViewHelpers/Link/ActionViewHelper.php). > One of those is "pageUid". > > Best regards, > Bastian > > _______________________________________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc at lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc > -- El?as Fern?ndez Vel?zquez http://www.recetae.com http://www.eliasfernandez.net http://www.trevenque.es From akushnarov at gmail.com Tue Nov 10 13:45:05 2009 From: akushnarov at gmail.com (Andriy Kushnarov) Date: Tue, 10 Nov 2009 14:45:05 +0200 Subject: [TYPO3-mvc] Usage of extbase from CLI scripts Message-ID: <mailman.2101.1257857140.595.typo3-project-typo3v4mvc@lists.typo3.org> Dear all, could you please tell me how can I use extbase from CLI script? I would like to: - work with my db model - get TypoScript settings Thanks -- Best Regards Andriy Kushnarov From benni at typo3.org Wed Nov 11 23:51:54 2009 From: benni at typo3.org (Benjamin Mack) Date: Wed, 11 Nov 2009 23:51:54 +0100 Subject: [TYPO3-mvc] Handling of translations? Message-ID: <mailman.1.1257979949.15831.typo3-project-typo3v4mvc@lists.typo3.org> Hey team, cool stuff going with extbase. One question though: How do I handle translations? Basically, I activated the translation for my records in the Backend, and it works as expected. But when I show it in the frontend, and I do a $myRepository->findAll() it literally returns all items, not differentiating between the currently selected language and its possibly fallback options. Does anybody have a similar situation? Thanks for any pointers. Running extbase off of beta3. All the best, Benni. From info at rs-websystems.de Thu Nov 12 11:13:16 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Thu, 12 Nov 2009 11:13:16 +0100 Subject: [TYPO3-mvc] Domain Model Event-Handlers Message-ID: <mailman.1.1258020837.14321.typo3-project-typo3v4mvc@lists.typo3.org> Hey folks, I'm searching for some kind of "event handler". I want to execute specific code "on save" of my objects. Where do I have to register those, or how to name the functions that they will be executed automatically. regards Steffen From lists at shr-now.de Thu Nov 12 14:14:25 2009 From: lists at shr-now.de (Nikolas Hagelstein) Date: Thu, 12 Nov 2009 14:14:25 +0100 Subject: [TYPO3-mvc] Usage of extbase from CLI scripts In-Reply-To: <mailman.2101.1257857140.595.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.2101.1257857140.595.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.3291.1258031706.595.typo3-project-typo3v4mvc@lists.typo3.org> Hi, > could you please tell me how can I use extbase from CLI script? I would > like to: > - work with my db model > - get TypoScript settings This isn't actually possible atm. We need a cli dispatcher for this but the cli dispatcher has been postpone. See: http://forge.typo3.org/issues/show/4739 If want to use that cli script for regular tasks like importing etc. I would suggest to create a regular controller, poll it via lynx, wget whatever and restrict the access to "Deny from all, allow from 127.0.0.1" within your webserver's configiguration. This is how I do it atm. If anyone else is aware of a better solution please enlight me :) Cheers, Nikolas From mail at pascal-jungblut.com Thu Nov 12 14:27:20 2009 From: mail at pascal-jungblut.com (Pascal Jungblut) Date: Thu, 12 Nov 2009 14:27:20 +0100 Subject: [TYPO3-mvc] Platform for sharing Fluid viewhelpers In-Reply-To: <mailman.1.1257808348.16238.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1755.1257788331.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257788435.25958.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257803660.10299.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257808348.16238.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.3327.1258032478.595.typo3-project-typo3v4mvc@lists.typo3.org> On 10.11.2009, at 00:11, Bastian Waidelich wrote: > But it's good to see that there is interest in this topic. So what about creating a page for it @ wiki.typo3.org and start collecting ideas and search for collaborators? I'm definitely keen to help where I can! I opened a page at the TYPO3 wiki [1] with some basic information. Please share your thoughts! Regards Pascal [1] <http://wiki.typo3.org/index.php/Fluid_Microsite> From info at sk-typo3.de Thu Nov 12 18:40:45 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Thu, 12 Nov 2009 18:40:45 +0100 Subject: [TYPO3-mvc] Handling of translations? In-Reply-To: <mailman.1.1257979949.15831.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257979949.15831.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258047675.31095.typo3-project-typo3v4mvc@lists.typo3.org> Hi Benni, Benjamin Mack schrieb: > > $myRepository->findAll() > > it literally returns all items, not differentiating between the > currently selected language and its possibly fallback options. > > Does anybody have a similar situation? Thanks for any pointers. > i don't think it's integrated yet. But you also find no help with pibase with language support. I think the only place where it's done correct is in BE using beFunc methods or tcemain. btw - same would be with versions. I didn't tested, but i expect to get also the versioned records within findAll. vg Steffen From typo3 at perseguers.ch Thu Nov 12 22:34:35 2009 From: typo3 at perseguers.ch (Xavier Perseguers) Date: Thu, 12 Nov 2009 22:34:35 +0100 Subject: [TYPO3-mvc] FlexForm configuration cannot be retrieved anymore Message-ID: <mailman.1.1258061713.15145.typo3-project-typo3v4mvc@lists.typo3.org> Hi, Since a few weeks (I did not have time to debug this before), I cannot access my plugin flexform configuration anymore from $this->settings (in an ActionController). Did something change that I am not aware of? Thanks for any hint -- Xavier Perseguers http://xavier.perseguers.ch/en One contribution a day keeps the fork away From thasmo at gmail.com Thu Nov 12 22:36:22 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Thu, 12 Nov 2009 22:36:22 +0100 Subject: [TYPO3-mvc] FlexForm configuration cannot be retrieved anymore In-Reply-To: <mailman.1.1258061713.15145.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258061713.15145.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258061818.14860.typo3-project-typo3v4mvc@lists.typo3.org> Hello! Quoting Bastian Waidelich: "It's not a bug, it's a feature ;) With revision 1600 it's possible to override all configuration options. To change settings, you have to prefix the respective flexform fields with "setting.". See https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/viewhelpertest/Configuration/FlexForms/flexform_test.xml for an example and http://forge.typo3.org/repositories/revision/typo3v4-mvc/1600 for the commit message. HTH, Bastian" Greetings, Thasmo Xavier Perseguers schrieb: > Hi, > > Since a few weeks (I did not have time to debug this before), I cannot > access my plugin flexform configuration anymore from $this->settings (in > an ActionController). > > Did something change that I am not aware of? > > Thanks for any hint > From typo3 at perseguers.ch Thu Nov 12 22:43:29 2009 From: typo3 at perseguers.ch (Xavier Perseguers) Date: Thu, 12 Nov 2009 22:43:29 +0100 Subject: [TYPO3-mvc] FlexForm configuration cannot be retrieved anymore In-Reply-To: <mailman.1.1258061818.14860.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258061713.15145.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258061818.14860.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258062244.30882.typo3-project-typo3v4mvc@lists.typo3.org> Hello Thomas, > "It's not a bug, it's a feature ;) Some feature are a bit weird... > With revision 1600 it's possible to override all configuration options. > To change settings, you have to prefix the respective flexform fields > with "setting.". Thanks for the pointer. It works again. -- Xavier Perseguers http://xavier.perseguers.ch/en One contribution a day keeps the fork away From info at sk-typo3.de Thu Nov 12 22:46:32 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Thu, 12 Nov 2009 22:46:32 +0100 Subject: [TYPO3-mvc] FlexForm configuration cannot be retrieved anymore In-Reply-To: <mailman.1.1258061818.14860.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258061713.15145.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258061818.14860.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258062422.15908.typo3-project-typo3v4mvc@lists.typo3.org> Hi, sry to say, but i don't like the solution. It's a good example that magic makes things complicate and unflexible. At the end i myself want to decide which setting as priority, and if setting has any influence a.s.o. i never had problems before with this, now, if i don't use right prefix in my flexform fields, i can't access anymore? vg Steffen From info at rs-websystems.de Fri Nov 13 12:46:33 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Fri, 13 Nov 2009 12:46:33 +0100 Subject: [TYPO3-mvc] Domain Model Event-Handlers In-Reply-To: <mailman.1.1258020837.14321.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258020837.14321.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258112837.8154.typo3-project-typo3v4mvc@lists.typo3.org> No one? From info at rs-websystems.de Fri Nov 13 13:33:44 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Fri, 13 Nov 2009 13:33:44 +0100 Subject: [TYPO3-mvc] Models not coming from Database Message-ID: <mailman.1.1258115668.8154.typo3-project-typo3v4mvc@lists.typo3.org> Hey folks, just another nice question. Am I able to define a Model where the Objects not really works on database? If I see this correctly, i should define the Model-CLass as every other to, and write my complete own Repository Just implementing the interface with my own "loadObject" and "saveObject" logic. I'm currently thinking about how using "cal" within extbase. I'm planning to have a PseudoObject which just calls the Service of Cal and provides the information I need. Is this going to work? regards Steffen From info at rs-websystems.de Fri Nov 13 14:21:16 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Fri, 13 Nov 2009 14:21:16 +0100 Subject: [TYPO3-mvc] Handling of translations? In-Reply-To: <mailman.1.1257979949.15831.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257979949.15831.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258118519.8154.typo3-project-typo3v4mvc@lists.typo3.org> Benjamin Mack schrieb: > Hey team, > > cool stuff going with extbase. One question though: How do I handle > translations? Basically, I activated the translation for my records in > the Backend, and it works as expected. But when I show it in the > frontend, and I do a > > $myRepository->findAll() > > it literally returns all items, not differentiating between the > currently selected language and its possibly fallback options. > > Does anybody have a similar situation? Thanks for any pointers. > > Running extbase off of beta3. > > All the best, > Benni. Hey, as I told you in Skype, it's easy to implement the "sys_language_mode= strict" in Extbase. Just add $languageMode = $GLOBALS['TSFE']->sys_language_mode == strict ? 'hideNonTranslated' : ''; after line 746 $languageMode = ''; after Line 757 and replace last Parameter ('') in line 768 with $languageMode But im wondering about ->sys_language_content in line 745. I think it should be ->sys_language_uid Can anyone tell the difference (since in TS i've never seen or set _content, but always _uid) regards Steffen From info at rs-websystems.de Fri Nov 13 14:21:55 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Fri, 13 Nov 2009 14:21:55 +0100 Subject: [TYPO3-mvc] Handling of translations? In-Reply-To: <mailman.1.1258118519.8154.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257979949.15831.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258118519.8154.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258118559.8154.typo3-project-typo3v4mvc@lists.typo3.org> Steffen Ritter schrieb: > > Hey, > as I told you in Skype, it's easy to implement the "sys_language_mode= > strict" in Extbase. > > Just add > $languageMode = $GLOBALS['TSFE']->sys_language_mode == strict ? > 'hideNonTranslated' : ''; > > after line 746 > > $languageMode = ''; > after Line 757 > > and replace last Parameter ('') in line 768 with $languageMode > important: in file Classes/Persistence/Storage/Typo3DbBackend.php > > But im wondering about ->sys_language_content in line 745. > I think it should be ->sys_language_uid > > Can anyone tell the difference (since in TS i've never seen or set > _content, but always _uid) > > regards > > Steffen From thasmo at gmail.com Fri Nov 13 20:55:15 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Fri, 13 Nov 2009 20:55:15 +0100 Subject: [TYPO3-mvc] Handling of translations? In-Reply-To: <mailman.1.1258118519.8154.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257979949.15831.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258118519.8154.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258142151.11353.typo3-project-typo3v4mvc@lists.typo3.org> Found something here in German: http://labs.zeroseven.de/development/typo3/typo3-unterschied-zwischen-sys_language_uid-und-sys_language_content/ Seems a bit weird tho, I can't figure out the purpose. Here is an old topic in the TYPO3 mailing list: http://lists.typo3.org/pipermail/typo3-dev/2006-February/015560.html (But it doesn't mention anything useful...) Anybody knows more about it? Thanks, Thasmo Steffen Ritter schrieb: > Benjamin Mack schrieb: >> Hey team, >> >> cool stuff going with extbase. One question though: How do I handle >> translations? Basically, I activated the translation for my records in >> the Backend, and it works as expected. But when I show it in the >> frontend, and I do a >> >> $myRepository->findAll() >> >> it literally returns all items, not differentiating between the >> currently selected language and its possibly fallback options. >> >> Does anybody have a similar situation? Thanks for any pointers. >> >> Running extbase off of beta3. >> >> All the best, >> Benni. > > Hey, > as I told you in Skype, it's easy to implement the "sys_language_mode= > strict" in Extbase. > > Just add > $languageMode = $GLOBALS['TSFE']->sys_language_mode == strict ? > 'hideNonTranslated' : ''; > > after line 746 > > $languageMode = ''; > after Line 757 > > and replace last Parameter ('') in line 768 with $languageMode > > > > But im wondering about ->sys_language_content in line 745. > I think it should be ->sys_language_uid > > Can anyone tell the difference (since in TS i've never seen or set > _content, but always _uid) > > regards > > Steffen From eliasfernandez at gmail.com Fri Nov 13 22:19:25 2009 From: eliasfernandez at gmail.com (=?ISO-8859-1?Q?El=EDas_Fern=E1ndez?=) Date: Fri, 13 Nov 2009 22:19:25 +0100 Subject: [TYPO3-mvc] $useStoragePageId in my inherited repository class Message-ID: <mailman.4064.1258147204.595.typo3-project-typo3v4mvc@lists.typo3.org> Hello, I don?t know how could i insert a new item in my repository that automatically take the pid of the insert form page. I tried to add protected $useStoragePageId = TRUE; in my repository class. I tried some other solutions that i?ve seen in various issues http://forge.typo3.org/issues/show/3698 but nothing happens, the pid when i create new items is "0". Then i was looking in other extensions, like blog extensions, but the same happens. So my question is. Is there something i can activate so the repository takes the pid field ? If yes Can i change this pid in the controller execution? ( before itemRepository->add( item )) Thanks and excuse my english ? <http://forge.typo3.org/issues/show/3698> From falcifer2001 at yahoo.es Sat Nov 14 01:29:51 2009 From: falcifer2001 at yahoo.es (Fernando Arconada) Date: Sat, 14 Nov 2009 00:29:51 +0000 (UTC) Subject: [TYPO3-mvc] Dispach controller from eID file Message-ID: <mailman.1.1258158591.20560.typo3-project-typo3v4mvc@lists.typo3.org> Hello How can i call a controller from a eID file? I've tried with $conf = array( 'pluginName' => 'icomunication', 'extensionName' => 'icomunication', 'controller' => 'Notes', 'action' => 'list' ); $d = new Tx_Extbase_Dispatcher; $d->cObj = t3lib_div::makeInstance('tslib_cObj'); $d->dispatch($content, $conf); but it doesnt work Is it possible? From info at rs-websystems.de Sat Nov 14 10:54:02 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Sat, 14 Nov 2009 10:54:02 +0100 Subject: [TYPO3-mvc] Dispach controller from eID file In-Reply-To: <mailman.1.1258158591.20560.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258158591.20560.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258192488.26999.typo3-project-typo3v4mvc@lists.typo3.org> Fernando Arconada schrieb: > Hello > > How can i call a controller from a eID file? I've tried with > $conf = array( > 'pluginName' => 'icomunication', > 'extensionName' => 'icomunication', > 'controller' => 'Notes', > 'action' => 'list' > ); > > > $d = new Tx_Extbase_Dispatcher; > $d->cObj = t3lib_div::makeInstance('tslib_cObj'); > $d->dispatch($content, $conf); > > > but it doesnt work > > > Is it possible? Have a look at "Usage of extbase from CLI" some days ago ... From falcifer2001 at yahoo.es Sat Nov 14 11:04:25 2009 From: falcifer2001 at yahoo.es (Fernando Arconada) Date: Sat, 14 Nov 2009 10:04:25 +0000 (UTC) Subject: [TYPO3-mvc] Dispach controller from eID file References: <mailman.1.1258158591.20560.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258192488.26999.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258193065.27309.typo3-project-typo3v4mvc@lists.typo3.org> Is it the same situation? So, If i develop an extension that uses AJAX or something that needs eID then i can't use MVC, Ohh it looks very ugly, CLI isn't as common as AJAX, Jochen, why is it postponed? El Sat, 14 Nov 2009 10:54:02 +0100, Steffen Ritter escribi?: > Fernando Arconada schrieb: >> Hello >> >> How can i call a controller from a eID file? I've tried with $conf = >> array( >> 'pluginName' => 'icomunication', >> 'extensionName' => 'icomunication', >> 'controller' => 'Notes', >> 'action' => 'list' >> ); >> >> >> $d = new Tx_Extbase_Dispatcher; >> $d->cObj = t3lib_div::makeInstance('tslib_cObj'); >> $d->dispatch($content, $conf); >> >> >> but it doesnt work >> >> >> Is it possible? > Have a look at "Usage of extbase from CLI" some days ago ... From info at rs-websystems.de Sat Nov 14 11:05:04 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Sat, 14 Nov 2009 11:05:04 +0100 Subject: [TYPO3-mvc] Dispach controller from eID file In-Reply-To: <mailman.1.1258193065.27309.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258158591.20560.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258192488.26999.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258193065.27309.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258193150.26999.typo3-project-typo3v4mvc@lists.typo3.org> Fernando Arconada schrieb: > Is it the same situation? > So, If i develop an extension that uses AJAX or something that needs eID > then i can't use MVC, Ohh it looks very ugly, CLI isn't as common as AJAX, > > Jochen, why is it postponed? > > El Sat, 14 Nov 2009 10:54:02 +0100, Steffen Ritter escribi?: > >> Fernando Arconada schrieb: >>> Hello >>> >>> How can i call a controller from a eID file? I've tried with $conf = >>> array( >>> 'pluginName' => 'icomunication', >>> 'extensionName' => 'icomunication', >>> 'controller' => 'Notes', >>> 'action' => 'list' >>> ); >>> >>> >>> $d = new Tx_Extbase_Dispatcher; >>> $d->cObj = t3lib_div::makeInstance('tslib_cObj'); >>> $d->dispatch($content, $conf); >>> >>> >>> but it doesnt work >>> >>> >>> Is it possible? >> Have a look at "Usage of extbase from CLI" some days ago ... > I'm using AJAX.... With another PageType... Works fine... I Have a AJAX controller... From typo3 at perseguers.ch Sat Nov 14 11:19:50 2009 From: typo3 at perseguers.ch (Xavier Perseguers) Date: Sat, 14 Nov 2009 11:19:50 +0100 Subject: [TYPO3-mvc] Dispach controller from eID file In-Reply-To: <mailman.1.1258193150.26999.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258158591.20560.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258192488.26999.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258193065.27309.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258193150.26999.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258194027.13366.typo3-project-typo3v4mvc@lists.typo3.org> Hi, > I'm using AJAX.... With another PageType... Works fine... I Have a AJAX > controller... Have a look at EXT:mvc_extjs_samples, we used Extbase with Ajax, just as Steffen described, with a dedicated pagetype. -- Xavier Perseguers http://xavier.perseguers.ch/en One contribution a day keeps the fork away From falcifer2001 at yahoo.es Sat Nov 14 11:41:27 2009 From: falcifer2001 at yahoo.es (Fernando Arconada) Date: Sat, 14 Nov 2009 10:41:27 +0000 (UTC) Subject: [TYPO3-mvc] Dispach controller from eID file References: <mailman.1.1258158591.20560.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258192488.26999.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258193065.27309.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258193150.26999.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258194027.13366.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258195287.27309.typo3-project-typo3v4mvc@lists.typo3.org> I don't really like the pageType solution, I preffer to use eID for AJAX and webservices. Reading the maillist seems that there are several persons waiting for that feature: CLI, eID, hooks... should it be prioritized? Thanks El Sat, 14 Nov 2009 11:19:50 +0100, Xavier Perseguers escribi?: > Hi, > >> I'm using AJAX.... With another PageType... Works fine... I Have a AJAX >> controller... > > Have a look at EXT:mvc_extjs_samples, we used Extbase with Ajax, just as > Steffen described, with a dedicated pagetype. From info at rs-websystems.de Sat Nov 14 11:59:05 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Sat, 14 Nov 2009 11:59:05 +0100 Subject: [TYPO3-mvc] Dispach controller from eID file In-Reply-To: <mailman.1.1258195287.27309.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258158591.20560.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258192488.26999.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258193065.27309.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258193150.26999.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258194027.13366.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258195287.27309.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258196391.26999.typo3-project-typo3v4mvc@lists.typo3.org> Fernando Arconada schrieb: > I don't really like the pageType solution, I preffer to use eID for AJAX > and webservices. Reading the maillist seems that there are several > persons waiting for that feature: CLI, eID, hooks... should it be > prioritized? > > Thanks > > El Sat, 14 Nov 2009 11:19:50 +0100, Xavier Perseguers escribi?: > >> Hi, >> >>> I'm using AJAX.... With another PageType... Works fine... I Have a AJAX >>> controller... >> Have a look at EXT:mvc_extjs_samples, we used Extbase with Ajax, just as >> Steffen described, with a dedicated pagetype. > If you need it, implement it :) I did with some features bugfixes too... But there's nothing against a PageType variant. It is much slower if you need such things as realURL etc (and if you initialize all by hand) If you are a "speed fanatist" replace the pagerender class in your page type with an "empty dummy" then you have nearly the same results if initializing all by hand. Probably Core should provide a pagerender-class for AJAX requests? I think there is more need to get all frontend features done, than extra variants using the current features :) regards Steffen From eliasfernandez at gmail.com Sat Nov 14 22:21:30 2009 From: eliasfernandez at gmail.com (=?ISO-8859-1?Q?El=EDas_Fern=E1ndez?=) Date: Sat, 14 Nov 2009 22:21:30 +0100 Subject: [TYPO3-mvc] $useStoragePageId in my inherited repository class In-Reply-To: <mailman.4064.1258147204.595.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.4064.1258147204.595.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.4486.1258233731.595.typo3-project-typo3v4mvc@lists.typo3.org> Finally i have find the solution to my first question. I was looking in the wrong place. Simply by selecting the StartingPoint in the backend, the repository will takes this parameter as pid of inserted records. Excuse the spam, the solution was out there. But now, i have a second problem, because i want to takes the pid from the previous page. So my second question is: Can i change this pid in the controller execution? ( before itemRepository->add( item )) changing the cObj starting point could be a solution, but i want to know if there is another less tricky way . thanks in advance El 13 de noviembre de 2009 22:19, El?as Fern?ndez <eliasfernandez at gmail.com>escribi?: > Hello, > I don?t know how could i insert a new item in my repository that > automatically take the pid of the insert form page. I tried to add > > protected $useStoragePageId = TRUE; > > in my repository class. I tried some other solutions that i?ve seen in > various issues > > http://forge.typo3.org/issues/show/3698 > > but nothing happens, the pid when i create new items is "0". > > Then i was looking in other extensions, like blog extensions, but the same > happens. > > So my question is. > Is there something i can activate so the repository takes the pid field ? > If yes > > Can i change this pid in the controller execution? ( before > itemRepository->add( item )) > > Thanks and excuse my english ? > > <http://forge.typo3.org/issues/show/3698> > _______________________________________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc at lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc > -- El?as Fern?ndez Vel?zquez http://www.recetae.com http://www.eliasfernandez.net http://www.trevenque.es From falcifer2001 at yahoo.es Sun Nov 15 16:37:52 2009 From: falcifer2001 at yahoo.es (Fernando Arconada) Date: Sun, 15 Nov 2009 15:37:52 +0000 (UTC) Subject: [TYPO3-mvc] pageRenderer->loadExtjs fails if cached action Message-ID: <mailman.1.1258299472.562.typo3-project-typo3v4mvc@lists.typo3.org> Hello For example taking the extension mvc_extjs_samples (http:// forge.typo3.org/projects/show/extension-mvc_extjs_samples) as reference. I have realized that: $GLOBALS['TSFE']->backPath = TYPO3_mainDir; $GLOBALS['TSFE']->getPageRenderer()->loadExtJS(); $GLOBALS['TSFE']->getPageRenderer()->enableExtJSQuickTips(); // Show a message box when the page is ready $GLOBALS['TSFE']->getPageRenderer()->addExtOnReadyCode( 'Ext.Msg.alert("My Title", "Hello World!");' ); fails if you are using cached actions Tx_Extbase_Utility_Extension::configurePlugin( 'MvcExtjsSamples', 'HelloWorld', array('HelloWorld' => 'index'), array('HelloWorld' => 'index') ); instead of Tx_Extbase_Utility_Extension::configurePlugin( 'MvcExtjsSamples', 'HelloWorld', array('HelloWorld' => 'index'), array() ); Anyone could verify it? is it a bug or a feature? Kind Regards Fernando Arconada From s.reuther at internet-chemnitz.de Mon Nov 16 12:27:00 2009 From: s.reuther at internet-chemnitz.de (Stephan Reuther - development.IT) Date: Mon, 16 Nov 2009 12:27:00 +0100 Subject: [TYPO3-mvc] Extbase Property Mapper doesn't handle DateTime yet Message-ID: <mailman.4977.1258370862.595.typo3-project-typo3v4mvc@lists.typo3.org> Hi, i just recognized that the Property/Mapper doesn't handle DateTime objects. setting a model's property via fluid form which is defined as DateTime will throw an exception: "Argument 1 passed to Tx_MyExt_Domain_Model_Order::setOrderDate() must be an instance of DateTime, string given" DateTime is a special data type. Not plain and no Domain Model (with at least one "_"). So it should get it's own handling. i checked the bug tracker at forge but didn't found this bug/missing_feature already reported. or am i on the wrong way and there is a much easier solution for dateTime objects set via fluid form data? greetings, stephan From jochen.rau at typoplanet.de Tue Nov 17 10:18:13 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Tue, 17 Nov 2009 10:18:13 +0100 Subject: [TYPO3-mvc] Domain Model Event-Handlers In-Reply-To: <mailman.1.1258020837.14321.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258020837.14321.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258449535.29424.typo3-project-typo3v4mvc@lists.typo3.org> Hi. Steffen Ritter wrote: > I'm searching for some kind of "event handler". > I want to execute specific code "on save" of my objects. > > Where do I have to register those, or how to name the functions that > they will be executed automatically. There is currently no support for event handling inside Extbase. You might want to open a feature request (for TYPO3 4.4). What are the use cases? Following the Domain-Driven Design way, there is no need to care about persistence. Regards Jochen -- Every nit picked is a bug fixed From robert at typo3.org Tue Nov 17 10:27:26 2009 From: robert at typo3.org (Robert Lemke) Date: Tue, 17 Nov 2009 10:27:26 +0100 Subject: [TYPO3-mvc] Domain Model Event-Handlers In-Reply-To: <mailman.1.1258449535.29424.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258020837.14321.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258449535.29424.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.5399.1258450090.595.typo3-project-typo3v4mvc@lists.typo3.org> Hi guys, note that we use "Signals and Slots" in FLOW3 for emulating events (http://en.wikipedia.org/wiki/Signals_and_slots). This mechanism could also be used to notify program parts whenever certain objects are persisted (if that really makes sense). Unfortunately I just saw that I didn't document this feature yet. Note self: write documentation. robert Am 17.11.2009 um 10:18 schrieb Jochen Rau: > Steffen Ritter wrote: >> I'm searching for some kind of "event handler". >> I want to execute specific code "on save" of my objects. >> >> Where do I have to register those, or how to name the functions that >> they will be executed automatically. > > There is currently no support for event handling inside Extbase. You might want to open a feature request (for TYPO3 4.4). > > What are the use cases? Following the Domain-Driven Design way, there is no need to care about persistence. From jochen.rau at typoplanet.de Tue Nov 17 10:43:53 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Tue, 17 Nov 2009 10:43:53 +0100 Subject: [TYPO3-mvc] Models not coming from Database In-Reply-To: <mailman.1.1258115668.8154.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258115668.8154.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258451075.31092.typo3-project-typo3v4mvc@lists.typo3.org> Hi Steffen. Steffen Ritter wrote: > Am I able to define a Model where the Objects not really works on database? > If I see this correctly, i should define the Model-CLass as every other > to, and write my complete own Repository Just implementing the interface > with my own "loadObject" and "saveObject" logic. Yes, that is possible. Just implement the interface Tx_Extbase_Persistence_RepositoryInterface and put your custom Repository into my_ext/Classes/Domain/Repository/EventRepository,php. > I'm currently thinking about how using "cal" within extbase. I'm > planning to have a PseudoObject which just calls the Service of Cal and > provides the information I need. What do you mean with "pseudo" object? It could be a full featured domain object "Event" for example. Another way is to map (some) database fields of tx_cal_event onto your domain object Event, like config.tx_myext { persistence{ classes { Tx_MyExt_Domain_Model_Event { mapping { tableName = tx_cal_event columns { foo.mapOnProperty = bar } } } } } } } The problem is the custom date format of cal. Maybe you find a solution for this. Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Tue Nov 17 10:50:22 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Tue, 17 Nov 2009 10:50:22 +0100 Subject: [TYPO3-mvc] Domain Model Event-Handlers In-Reply-To: <mailman.5399.1258450090.595.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258020837.14321.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258449535.29424.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.5399.1258450090.595.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258451464.31363.typo3-project-typo3v4mvc@lists.typo3.org> Hi. Robert Lemke wrote: > note that we use "Signals and Slots" in FLOW3 for emulating events (http://en.wikipedia.org/wiki/Signals_and_slots). This mechanism could also be used to notify program parts whenever certain objects are persisted (if that really makes sense). There should be something left to be introduced in TYPO3 4.4 (and 5.0) ;-) Regards Jochen -- Every nit picked is a bug fixed From robert at typo3.org Tue Nov 17 11:23:02 2009 From: robert at typo3.org (Robert Lemke) Date: Tue, 17 Nov 2009 11:23:02 +0100 Subject: [TYPO3-mvc] Domain Model Event-Handlers In-Reply-To: <mailman.1.1258451464.31363.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258020837.14321.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258449535.29424.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.5399.1258450090.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258451464.31363.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.5404.1258453428.595.typo3-project-typo3v4mvc@lists.typo3.org> Hi Jochen, Am 17.11.2009 um 10:50 schrieb Jochen Rau: > >> note that we use "Signals and Slots" in FLOW3 for emulating events (http://en.wikipedia.org/wiki/Signals_and_slots). This mechanism could also be used to notify program parts whenever certain objects are persisted (if that really makes sense). > > There should be something left to be introduced in TYPO3 4.4 (and 5.0) ;-) yes, would really too bad if I had worked for years on a new software and in the end had nothing new to show ... Cheers, robert From info at rs-websystems.de Tue Nov 17 13:00:51 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Tue, 17 Nov 2009 13:00:51 +0100 Subject: [TYPO3-mvc] Domain Model Event-Handlers In-Reply-To: <mailman.1.1258449535.29424.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258020837.14321.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258449535.29424.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258459295.16249.typo3-project-typo3v4mvc@lists.typo3.org> Jochen Rau schrieb: > Hi. > > Steffen Ritter wrote: >> I'm searching for some kind of "event handler". >> I want to execute specific code "on save" of my objects. >> >> Where do I have to register those, or how to name the functions that >> they will be executed automatically. > > There is currently no support for event handling inside Extbase. You > might want to open a feature request (for TYPO3 4.4). > > What are the use cases? Following the Domain-Driven Design way, there is > no need to care about persistence. > > Regards > Jochen > Hi Jochen, there's a simple use case. I'm currently on writing a Hosting-Server management with extbase. Im controlling postfix/dovecot apache-vhosts domains ftp-users and so on with my own datastructer i bound the appliciations on. My vhost configuration I "write" using a template via cron job. Since I'm working on a mgmt for this, i just want to have a "onSave open view apacheTemplate, renderView, put rendered content into file xyz". regards Steffen From jochen.rau at typoplanet.de Tue Nov 17 23:18:02 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Tue, 17 Nov 2009 23:18:02 +0100 Subject: [TYPO3-mvc] Extbase Property Mapper doesn't handle DateTime yet In-Reply-To: <mailman.4977.1258370862.595.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.4977.1258370862.595.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258496324.24830.typo3-project-typo3v4mvc@lists.typo3.org> Hi Stephan. Stephan Reuther - development.IT wrote: > i just recognized that the Property/Mapper doesn't handle DateTime objects. > setting a model's property via fluid form which is defined as DateTime > will throw an exception: "Argument 1 passed to > Tx_MyExt_Domain_Model_Order::setOrderDate() must be an instance of > DateTime, string given" > DateTime is a special data type. Not plain and no Domain Model (with at > least one "_"). So it should get it's own handling. > i checked the bug tracker at forge but didn't found this > bug/missing_feature already reported. > > or am i on the wrong way and there is a much easier solution for > dateTime objects set via fluid form data? You are right. That's because the property mapper was taken from FLOW3. And in FLOW3 there will be a more general concept of property editing available in the future (AFAIK). But it can also be a bug. I have implemented a simple string to DateTime mapping in Extbase now. It should also work, if you have your own DateTime class extending the one from PHP. The string entered in the form field is directly passed to the DateTime constructor. Thus, all of the following strings should work: 2.10.2009 2009-11-17 now +1 week today next Monday Regards Jochen -- Every nit picked is a bug fixed From thasmo at gmail.com Wed Nov 18 00:08:59 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Wed, 18 Nov 2009 00:08:59 +0100 Subject: [TYPO3-mvc] Repository->findByUid() throws error In-Reply-To: <mailman.1.1257832998.4739.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1257796025.1563.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257832998.4739.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258499381.29701.typo3-project-typo3v4mvc@lists.typo3.org> Hello! I'd prefer to configure the storage PID settings in first place, before I disable some function totally. Could you please explain this to me a bit more in detail? As I try to fetch records from the table 'sys_domain' which has no specific storage PID (or 0), how to enable this? Does extbase need an update here or is it configureable? Thanks a lot! Sebastian Kurf?rst schrieb: > Hi, > > my first guess is that the storage PID settings are configured wrongly. > > Maybe you need to disable inside your query that the storage pages are > respected. > > For that, create a custom method inside your repository, and do a: > $query->getQuerySettings()->setRespectStoragePage(FALSE). > > Greets, > Sebastian From typo3 at perseguers.ch Wed Nov 18 06:46:25 2009 From: typo3 at perseguers.ch (Xavier Perseguers) Date: Wed, 18 Nov 2009 06:46:25 +0100 Subject: [TYPO3-mvc] Extbase Property Mapper doesn't handle DateTime yet In-Reply-To: <mailman.1.1258496324.24830.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.4977.1258370862.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258496324.24830.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258523228.19164.typo3-project-typo3v4mvc@lists.typo3.org> Hi Jochen, >> or am i on the wrong way and there is a much easier solution for >> dateTime objects set via fluid form data? > > You are right. That's because the property mapper was taken from FLOW3. > And in FLOW3 there will be a more general concept of property editing > available in the future (AFAIK). But it can also be a bug. > > I have implemented a simple string to DateTime mapping in Extbase now. > It should also work, if you have your own DateTime class extending the > one from PHP. Sounds like you're talking from what I did ;-) I remember having had problems with my own subclass of DateTime. > The string entered in the form field is directly passed to the DateTime > constructor. Thus, all of the following strings should work: > > 2.10.2009 > 2009-11-17 > now +1 week > today > next Monday Thanks for this enhancement. -- Xavier Perseguers http://xavier.perseguers.ch/en One contribution a day keeps the fork away From eliasfernandez at gmail.com Thu Nov 19 10:09:13 2009 From: eliasfernandez at gmail.com (=?ISO-8859-1?Q?El=EDas_Fern=E1ndez?=) Date: Thu, 19 Nov 2009 10:09:13 +0100 Subject: [TYPO3-mvc] plugin.tx_myext.settings and _typoScriptNodeValue Message-ID: <mailman.6694.1258621798.595.typo3-project-typo3v4mvc@lists.typo3.org> Hello list, I?m trying to parse the typoscript object that i?ve had in my persistence configuration: ["storagePid"]=> array(2) { ["field"]=> string(3) "uid" ["_typoScriptNodeValue"]=> string(4) "TEXT" } But i really don?t know where i must call a method to proccess this typoscript. Can i extend the Tx_Extbase_Configuration_FrontendConfigurationManager in my own extension ? is there another better solution ? Thanks in advance -- El?as Fern?ndez Vel?zquez From jochen.rau at typoplanet.de Thu Nov 19 10:07:56 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Thu, 19 Nov 2009 10:07:56 +0100 Subject: [TYPO3-mvc] Domain Model Event-Handlers In-Reply-To: <mailman.1.1258459295.16249.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258020837.14321.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258449535.29424.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258459295.16249.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258621721.15051.typo3-project-typo3v4mvc@lists.typo3.org> Hi Steffen. Steffen Ritter wrote: > Jochen Rau schrieb: >> Steffen Ritter wrote: >>> I'm searching for some kind of "event handler". >>> I want to execute specific code "on save" of my objects. >>> >>> Where do I have to register those, or how to name the functions that >>> they will be executed automatically. >> >> There is currently no support for event handling inside Extbase. You >> might want to open a feature request (for TYPO3 4.4). >> >> What are the use cases? Following the Domain-Driven Design way, there >> is no need to care about persistence. > Hi Jochen, > there's a simple use case. > I'm currently on writing a Hosting-Server management with extbase. > Im controlling postfix/dovecot apache-vhosts domains ftp-users and so on > with my own datastructer i bound the appliciations on. > My vhost configuration I "write" using a template via cron job. > Since I'm working on a mgmt for this, i just want to have a "onSave open > view apacheTemplate, renderView, put rendered content into file xyz". That?s a simple use case? Wow! I don't want to see the more complicated ones. ;-) Isn't it possible to have a "master" controller action and forward the process to your ApacheController after updating? Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Thu Nov 19 10:16:18 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Thu, 19 Nov 2009 10:16:18 +0100 Subject: [TYPO3-mvc] Discussion: Storage Backend not compatible to DBAL Message-ID: <mailman.1.1258622222.15785.typo3-project-typo3v4mvc@lists.typo3.org> Hi. There is an open issue "Typo3DBBackend.php not compatible to DBAL" on forge. http://forge.typo3.org/issues/show/5374 I cite my comment on Steffen Ritters proposal here to get a broader discussion about how to solve that issue: -- snip 8< -------------- Extbase does not fully support DBAL features ATM. This is because there are two contrary ways to implement support for different storage backends: 1. providing a multi-purpose Typo3DbBackend taking DBAL as an other layer below. 2. implementing the differences in parsing the QueryObjectModel in a slim storage backend for each backend deriving common functionality from an abstract storage backend. I definitely prefer the latter way. In this case the hierarchy could be as follow: StorageBackendInterface - AbstractStorageBackend <- some common functionality - AbstractAnsiSqlBackend <- does most of the parsing - MySqlBackend - OracleBackend <- very slim - PostgresBackend - AbstractFileBackend - CsvBackend - XmlBackend IMHO the second way has several advantages: - small pieces of code to be optimized - separated responsibilities makes it easy to understand the functionality - easily plugged together (a different storage backend for each class) Of course, the easy and quick way would be to utilize exec_* (due to lack of time). It would be great, if you could provide a patch for this (or if you could dedicate your time to the second way). --- snap 8< ---------- What's your opinion about that? Any other ideas? Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Thu Nov 19 10:25:05 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Thu, 19 Nov 2009 10:25:05 +0100 Subject: [TYPO3-mvc] plugin.tx_myext.settings and _typoScriptNodeValue In-Reply-To: <mailman.6694.1258621798.595.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.6694.1258621798.595.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258622749.16305.typo3-project-typo3v4mvc@lists.typo3.org> Hi El?as. El?as Fern?ndez wrote: > Hello list, > I?m trying to parse the typoscript object that i?ve had in my persistence > configuration: > > ["storagePid"]=> array(2) { ["field"]=> string(3) "uid" > ["_typoScriptNodeValue"]=> string(4) "TEXT" } > > But i really don?t know where i must call a method to proccess this > typoscript. > > Can i extend the Tx_Extbase_Configuration_FrontendConfigurationManager in my > own extension ? That will not work ATM because we have no Dependecy Injection. We plan to implement DI in TYPO3 4.4. There are two static methods available to parse TypoScript Settings Tx_Extbase_Utility_TypoScript::convertPlainArrayToTypoScriptArray($plainArray) Tx_Extbase_Utility_TypoScript::convertTypoScriptArrayToPlainArray($tsArray) BTW The "strange" format of the plain array (_typoScriptNodeValue) is necessary for fluid to work. Regards Jochen -- Every nit picked is a bug fixed From info at rs-websystems.de Thu Nov 19 10:28:49 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Thu, 19 Nov 2009 10:28:49 +0100 Subject: [TYPO3-mvc] Domain Model Event-Handlers In-Reply-To: <mailman.1.1258621721.15051.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258020837.14321.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258449535.29424.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258459295.16249.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258621721.15051.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258622979.9522.typo3-project-typo3v4mvc@lists.typo3.org> Jochen Rau schrieb: > Hi Steffen. > > Steffen Ritter wrote: >> Jochen Rau schrieb: >>> Steffen Ritter wrote: >>>> I'm searching for some kind of "event handler". >>>> I want to execute specific code "on save" of my objects. >>>> >>>> Where do I have to register those, or how to name the functions that >>>> they will be executed automatically. >>> >>> There is currently no support for event handling inside Extbase. You >>> might want to open a feature request (for TYPO3 4.4). >>> >>> What are the use cases? Following the Domain-Driven Design way, there >>> is no need to care about persistence. >> Hi Jochen, >> there's a simple use case. >> I'm currently on writing a Hosting-Server management with extbase. >> Im controlling postfix/dovecot apache-vhosts domains ftp-users and so on >> with my own datastructer i bound the appliciations on. >> My vhost configuration I "write" using a template via cron job. >> Since I'm working on a mgmt for this, i just want to have a "onSave open >> view apacheTemplate, renderView, put rendered content into file xyz". > > That?s a simple use case? Wow! I don't want to see the more complicated > ones. ;-) > > Isn't it possible to have a "master" controller action and forward the > process to your ApacheController after updating? > > Regards > Jochen > > Hi Jochen, yes I see it as "simple usecase". I'm heading a bigger extbase project which will be a little bit more complicated. But "easier" would be: send email on entity update. Back to your solution: It is possible, i know how to put a view into a file and redirect to another controller/view. The point to me is "after updating" ;) Which would be an event... If you can tell me how to handle "after update" all would be fine. Furthermore i would need a "after create" :) regards Steffen From info at rs-websystems.de Thu Nov 19 10:35:23 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Thu, 19 Nov 2009 10:35:23 +0100 Subject: [TYPO3-mvc] Discussion: Storage Backend not compatible to DBAL In-Reply-To: <mailman.1.1258622222.15785.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258622222.15785.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258623374.9522.typo3-project-typo3v4mvc@lists.typo3.org> Jochen Rau schrieb: > Hi. > > There is an open issue "Typo3DBBackend.php not compatible to DBAL" on > forge. > > http://forge.typo3.org/issues/show/5374 > > I cite my comment on Steffen Ritters proposal here to get a broader > discussion about how to solve that issue: > > -- snip 8< -------------- > Extbase does not fully support DBAL features ATM. This is because there > are two contrary ways to implement support for different storage backends: > > 1. providing a multi-purpose Typo3DbBackend taking DBAL as an other > layer below. > 2. implementing the differences in parsing the QueryObjectModel in a > slim storage backend for each backend deriving common functionality from > an abstract storage backend. > > I definitely prefer the latter way. In this case the hierarchy could be > as follow: > > StorageBackendInterface > - AbstractStorageBackend <- some common functionality > - AbstractAnsiSqlBackend <- does most of the parsing > - MySqlBackend > - OracleBackend <- very slim > - PostgresBackend > - AbstractFileBackend > - CsvBackend > - XmlBackend > > IMHO the second way has several advantages: > - small pieces of code to be optimized > - separated responsibilities makes it easy to understand the functionality > - easily plugged together (a different storage backend for each class) > > Of course, the easy and quick way would be to utilize exec_* (due to > lack of time). It would be great, if you could provide a patch for this > (or if you could dedicate your time to the second way). > --- snap 8< ---------- > > What's your opinion about that? Any other ideas? > > Regards > Jochen > Hi, since the "fast Version" of rewriting did not get into 4.3 (sry i did not have the time for finishing patch due to an "clients emergency" (server break)) i would say for 4.4 we should provide a clean solution. BUT: providing backends for all instead of using DBAL is not a solution to me. Why? 1. mixed envirenments would not be supported (as of DBAL) 2. table Mappings would not be supported (mapping feature of extbase works only within one database) 3. reinvent the wheel? better join forces an optimize DBAL Xavier made a patch which makes Extbase basically supported in 4.3 which I'm currently using. I - for shure - did not test all extbase possibilities for failure by know, just "select" no update or inserts by know... So far. Steffen From eliasfernandez at gmail.com Thu Nov 19 11:00:32 2009 From: eliasfernandez at gmail.com (=?ISO-8859-1?Q?El=EDas_Fern=E1ndez?=) Date: Thu, 19 Nov 2009 11:00:32 +0100 Subject: [TYPO3-mvc] plugin.tx_myext.settings and _typoScriptNodeValue In-Reply-To: <mailman.1.1258622749.16305.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.6694.1258621798.595.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258622749.16305.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.6711.1258624878.595.typo3-project-typo3v4mvc@lists.typo3.org> No matter with the "strange format", sure it will be better this way. But i don?t know where can i transform my typoscript conf: plugin.tx_myext.persistence.storagePid = TEXT plugin. tx_myext.persistence.storagePid.field = uid in a real int From bogus@does.not.exist.com Thu Nov 5 11:13:25 2009 From: bogus@does.not.exist.com () Date: Thu, 05 Nov 2009 10:13:25 -0000 Subject: No subject Message-ID: <mailman.1.1258624879.592.typo3-project-typo3v4mvc@lists.typo3.org> From bogus@does.not.exist.com Thu Nov 5 11:13:25 2009 From: bogus@does.not.exist.com () Date: Thu, 05 Nov 2009 10:13:25 -0000 Subject: No subject Message-ID: <mailman.2.1258624879.592.typo3-project-typo3v4mvc@lists.typo3.org> Or there is no way to do it ? Thanx =A1 2009/11/19 Jochen Rau <jochen.rau at typoplanet.de> > Hi El=EDas. > > > El=EDas Fern=E1ndez wrote: > >> Hello list, >> I=B4m trying to parse the typoscript object that i=B4ve had in my persis= tence >> configuration: >> >> ["storagePid"]=3D> array(2) { ["field"]=3D> string(3) "uid" >> ["_typoScriptNodeValue"]=3D> string(4) "TEXT" } >> >> But i really don=B4t know where i must call a method to proccess this >> typoscript. >> >> Can i extend the Tx_Extbase_Configuration_FrontendConfigurationManager i= n >> my >> own extension ? >> > > That will not work ATM because we have no Dependecy Injection. We plan to > implement DI in TYPO3 4.4. > > There are two static methods available to parse TypoScript Settings > > > Tx_Extbase_Utility_TypoScript::convertPlainArrayToTypoScriptArray($plainA= rray) > Tx_Extbase_Utility_TypoScript::convertTypoScriptArrayToPlainArray($tsArra= y) > > BTW The "strange" format of the plain array (_typoScriptNodeValue) is > necessary for fluid to work. > > Regards > Jochen > > > -- > Every nit picked is a bug fixed > > > _______________________________________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc at lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc > --=20 El=EDas Fern=E1ndez Vel=E1zquez From typo3 at perseguers.ch Thu Nov 19 11:04:48 2009 From: typo3 at perseguers.ch (Xavier Perseguers) Date: Thu, 19 Nov 2009 11:04:48 +0100 Subject: [TYPO3-mvc] Discussion: Storage Backend not compatible to DBAL In-Reply-To: <mailman.1.1258623374.9522.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258622222.15785.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258623374.9522.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258625132.8359.typo3-project-typo3v4mvc@lists.typo3.org> Hi, > since the "fast Version" of rewriting did not get into 4.3 (sry i did > not have the time for finishing patch due to an "clients emergency" > (server break)) i would say for 4.4 we should provide a clean solution. > > BUT: providing backends for all instead of using DBAL is not a solution > to me. Neither to me. > Why? > 1. mixed envirenments would not be supported (as of DBAL) > 2. table Mappings would not be supported (mapping feature of extbase > works only within one database) This is a *must* when using Oracle as the identifier length limit is 32 characters. Problem already arises with TemplaVoil? which has a long table name: tx_templavoila_datastructure 28 chars. But as it contains auto-increment columns, sysext:adodb (which is the real DB layer to connect to another DBMS), creates a sequence for the counter (as auto-increment is not supported by Oracle) whose name is something like "<table>_<column>_seq" and this is longer than 32 characters. DBAL provides a way to remap table names: $TYPO3_CONF_VARS['EXTCONF']['dbal']['mapping'] = array( 'tx_templavoila_datastructure' => array( 'mapTableName' => 'tx_templavoila_ds', ), ); You may have a (quick) look at this: http://xavier.perseguers.ch/tutoriels/typo3/articles/oracle-database/configuring-typo3.html This feature works well in DBAL but it needs parsing the query, this is why there was (and for sure will still be) so problems with DBAL when using "special" queries. If a query cannot be parsed, DBAL breaks. This is very easy :-) > 3. reinvent the wheel? better join forces an optimize DBAL > > > Xavier made a patch which makes Extbase basically supported in 4.3 which > I'm currently using. I - for shure - did not test all extbase > possibilities for failure by know, just "select" no update or inserts by > know... Patch is this one: http://bugs.typo3.org/view.php?id=12603 I said there that this patch will be part of TYPO3 4.4 after more testing. It basically adds parsing to sql_query() method which normally does nothing else than sending the query to ADOdb to be executed on DBMS. However this does not include any remapping... I guess my solution of trying to parse the query is the best solution for Extbase but it needs a bit testing and Extbase should not start to issue complex queries unless it is supported by DBAL. Moreover, table name length implied by Extbase *will* be a problem and remapping will have to be done I would say for each and every "Extbase table" (I mean table from Extbase-based extensions). What would be very cool, would be to provide this mapping semi-automatically: - Have a tool in DBAL that detects potentially problematic table names and show a possible mapping configuration to be used (I would add that to TYPO3 4.4) - It may be done purely on DBAL-side but having a method in Extbase that would "shorten" a table name given an extension name (e.g., by special camel-case name of extension with only upper letter) would ease DBAL work -- Xavier Perseguers DBAL Leader http://forge.typo3.org/projects/show/extension-dbal From s.reuther at internet-chemnitz.de Thu Nov 19 11:27:25 2009 From: s.reuther at internet-chemnitz.de (Stephan Reuther - development.IT) Date: Thu, 19 Nov 2009 11:27:25 +0100 Subject: [TYPO3-mvc] Extbase Property Mapper doesn't handle DateTime yet Message-ID: <mailman.6719.1258626492.595.typo3-project-typo3v4mvc@lists.typo3.org> Jochen Rau wrote: > The string entered in the form field is directly passed to the > DateTime constructor. Thus, all > of the following strings should > work: > 2.10.2009 > 2009-11-17 > now +1 week > today > next Monday Just to add a note for possible DateTime-Constructor values: To create a DateTime from unix timestamp prepend the @-sign: http://bugs.php.net/bug.php?id=40171 so we can add to the should-work-strings list - @1190034628 greetings, stephan From info at sk-typo3.de Thu Nov 19 12:10:42 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Thu, 19 Nov 2009 12:10:42 +0100 Subject: [TYPO3-mvc] FlexForm configuration cannot be retrieved anymore In-Reply-To: <mailman.1.1258062422.15908.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258061713.15145.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258061818.14860.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258062422.15908.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258629080.24712.typo3-project-typo3v4mvc@lists.typo3.org> Hi, Steffen Kamper schrieb: > Hi, > > sry to say, but i don't like the solution. It's a good example that > magic makes things complicate and unflexible. > At the end i myself want to decide which setting as priority, and if > setting has any influence a.s.o. > > i never had problems before with this, now, if i don't use right prefix > in my flexform fields, i can't access anymore? > no comments? Would like to have :) vg Steffen From info at rs-websystems.de Thu Nov 19 17:10:49 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Thu, 19 Nov 2009 17:10:49 +0100 Subject: [TYPO3-mvc] Good Style to Store in Data Session? Message-ID: <mailman.1.1258647100.8413.typo3-project-typo3v4mvc@lists.typo3.org> Hey List, does it match to save "state" of the extenions into users session? Or does this work against any MVC pattern? regards Steffen From thasmo at gmail.com Thu Nov 19 22:55:16 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Thu, 19 Nov 2009 22:55:16 +0100 Subject: [TYPO3-mvc] FlexForm configuration cannot be retrieved anymore In-Reply-To: <mailman.1.1258629080.24712.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258061713.15145.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258061818.14860.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258062422.15908.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258629080.24712.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258667762.6698.typo3-project-typo3v4mvc@lists.typo3.org> What about some properties 'fallback' and 'override' which behave like containers for the extension settings. 'fallback' would be applied if nothing was given in flexform or even elsewhere (typoscript etc.) and 'override' would always override final settings from flexform etc. Just a tiny idea. Steffen Kamper schrieb: > Hi, > > Steffen Kamper schrieb: >> Hi, >> >> sry to say, but i don't like the solution. It's a good example that >> magic makes things complicate and unflexible. >> At the end i myself want to decide which setting as priority, and if >> setting has any influence a.s.o. >> >> i never had problems before with this, now, if i don't use right >> prefix in my flexform fields, i can't access anymore? >> > > no comments? Would like to have :) > > vg Steffen From typo3 at susannemoog.de Sun Nov 22 21:46:53 2009 From: typo3 at susannemoog.de (Susanne Moog) Date: Sun, 22 Nov 2009 21:46:53 +0100 Subject: [TYPO3-mvc] pageRenderer->loadExtjs fails if cached action In-Reply-To: <mailman.1.1258299472.562.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258299472.562.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258922862.6666.typo3-project-typo3v4mvc@lists.typo3.org> Hi, Fernando Arconada schrieb: > Hello > > For example taking the extension mvc_extjs_samples (http:// > forge.typo3.org/projects/show/extension-mvc_extjs_samples) as reference. > I have realized that: > > > $GLOBALS['TSFE']->backPath = TYPO3_mainDir; > $GLOBALS['TSFE']->getPageRenderer()->loadExtJS(); > $GLOBALS['TSFE']->getPageRenderer()->enableExtJSQuickTips(); > > // Show a message box when the page is ready > $GLOBALS['TSFE']->getPageRenderer()->addExtOnReadyCode( > 'Ext.Msg.alert("My Title", "Hello World!");' > ); > > > fails if you are using cached actions > > Tx_Extbase_Utility_Extension::configurePlugin( > 'MvcExtjsSamples', > 'HelloWorld', > array('HelloWorld' => 'index'), > array('HelloWorld' => 'index') > ); > > > instead of > > > Tx_Extbase_Utility_Extension::configurePlugin( > 'MvcExtjsSamples', > 'HelloWorld', > array('HelloWorld' => 'index'), > array() > ); > > Anyone could verify it? is it a bug or a feature? I can verify that, I have not yet tested it further but I also noticed that adding css files with the pagerenderer fails in an extbased extension depending on the cache settings. Will probably have a look into it tomorrow. Best regards, Susanne From bastian at typo3.org Mon Nov 23 12:18:59 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Mon, 23 Nov 2009 12:18:59 +0100 Subject: [TYPO3-mvc] FlexForm configuration cannot be retrieved anymore In-Reply-To: <mailman.1.1258062422.15908.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258061713.15145.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258061818.14860.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258062422.15908.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1258975184.26730.typo3-project-typo3v4mvc@lists.typo3.org> Steffen Kamper wrote: Hi Steffen & co, > sry to say, but i don't like the solution. It's a good example that > magic makes things complicate and unflexible. while I agree that the breaking change is unfortunate I wouldn't call it complicate and especially not inflexible. but maybe we didn't communicate it very well. So let me try to clarify this a bit: with the good old pi-base-way the configuration of an extension is one big array of keys and values. there are best practices, but you're free to setup your config TS tree like you want. than came the flexform and people started to merge flexform settings with the TS config (which is really convenient IMO cause it allows you to override settings per instance without the need to insert additional TS templates). now that we're heading in a "convention over configuration" kind of way, we decided to split up the configuration into different parts, namely: "persistence" for setting storage related options like storagePid. "view" for view related configurations like template paths "_LOCAL_LANG" to be able to overwrite localized labels and "settings" for (and that's a main difference) setting up configuration options that do not belong to extbase but to the very domain of your extension (like "postsPerPage", "skin", etc). Those settings will be available in your template automatically ({settings.postsPerPage}). i hope this far you're still with me, cause in my eyes this is just consequently going in the direction of FLOW3 where you have different configuration files per package. now we had to find a way on how to get this into your TS & flexform setup.. we started by merging the flexform values with the "settings" part of the TS config. that way you could easily override your plugin settings from flexforms. But what if you wanted to override e.g. the template root? i see three possible solutions to this scenario: 1. insert a new TS template to the page in question - cumbersome and only works per page not per plugin. 2. set the template path in the "settings" part of your extension and pre-process it in your controller - ouch. 3. add another "level" to the flexform. we went for #3 and i like this solution the best and actually i think, it's quite stringent: "old" way: #TS: plugin.tx_blogexample { foo = bar } #flexform: <foo> <TCEforms> ... </TCEforms> </foo> "new" way: #TS: plugin.tx_blogexample { prefix.foo = bar } #flexform: <prefix.foo> <TCEforms> ... </TCEforms> </prefix.foo> i know, the additional level is a bit unfamiliar - but there is more to get used to when you start working with extbase & fluid anyways. hopefully i could somehow convince you.. or do you have a better solution in mind? Best, Bastian From mkempe at seibert-media.net Tue Nov 24 00:49:06 2009 From: mkempe at seibert-media.net (Maik Kempe) Date: Tue, 24 Nov 2009 00:49:06 +0100 Subject: [TYPO3-mvc] Flexforms dont get merged in $this->settings Message-ID: <mailman.91.1259020199.615.typo3-project-typo3v4mvc@lists.typo3.org> Hi, i am currently writing my first frontend plugin with extbase. In my flex forms i have a select field which gets 'filled' with products via API call (via 'itemsProcFunc') . Then the user can select a product which gets 'published / assembled' on the current page. Today i checked out the current trunk. Now the selected product ('product') dont appear in '$this->settings'. I also added a text field via flex forms - the same behavior. FlexForm: <foo> <TCEforms> <label>Foo</label> <config> <type>input</type> <size>5</size> <max>5</max> <eval>int</eval> <default>0</default> </config> </TCEforms> </foo> <product> <TCEforms> <label>LLL:EXT:product_import_voila/Resources/Private/Language/FlexForms/ProductSimply.xml:product</label> <config> <type>select</type> <items type="array"> <numIndex index="0" type="array"> <numIndex index="0">LLL:EXT:product_import_voila/Resources/Private/Language/FlexForms/ProductSimply.xml:product.choice</numIndex> <numIndex index="1"></numIndex> </numIndex> </items> <itemsProcFunc>tx_productimportvoila_helper->productSelect</itemsProcFunc> </config> </TCEforms> </product> ext_tables.php: ... $TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform'; // 'pi_flexform' will be rendered when plugin is shown t3lib_extMgm::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/ProductSimply.xml'); // Add FlexForm XML config file Only 'settings' via TS appear: TS: plugin.tx_productimportvoila { settings { api { domain = api.gartentechnik.com username = foo password = bar methods { productList = /api/product_list?brand=Herkules } } } } Controller: error_log(print_r($this->settings)); -> Array ( [api] => Array ( [domain] => api.gartentechnik.com [username] => foo [password] => bar [methods] => Array ( [productList] => /api/product_list?brand=Herkules ) ) ) Any ideas? Some things changed? Is this a bug? Thanks! Maik Kempe //SEIBERT/MEDIA/TECHNOLOGIES -- //SEIBERT/MEDIA GmbH / Rheingau Palais S?hnleinstra?e 8 / 65201 Wiesbaden GF: J.Seibert und M.Seibert / AG Wiesbaden: HRB11502 T.+49-611-20570-49 / F.+49-611-20570-70 mkempe at seibert-media.net www.seibert-media.net / http://blog.seibert-media.net -- Consulting / Technologies / Design From info at rs-websystems.de Tue Nov 24 07:05:21 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Tue, 24 Nov 2009 07:05:21 +0100 Subject: [TYPO3-mvc] Flexforms dont get merged in $this->settings In-Reply-To: <mailman.91.1259020199.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.91.1259020199.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259042773.26842.typo3-project-typo3v4mvc@lists.typo3.org> Maik Kempe schrieb: > FlexForm: > > <foo> ... > </foo> > > <product> ... </product> > > ext_tables.php: > plugin.tx_productimportvoila { > settings { > api { > domain = api.gartentechnik.com > username = foo > password = bar > methods { > productList = /api/product_list?brand=Herkules > } > } > } > } if you name your settings in flexform "api.username" and your flexform-field "product" you'll see for shure there is a difference, and can't - for shure - be mergt to api.product ... You would have had named your flexfield: <settings.api.product> regards Steffen From typo3 at perseguers.ch Tue Nov 24 07:47:35 2009 From: typo3 at perseguers.ch (Xavier Perseguers) Date: Tue, 24 Nov 2009 07:47:35 +0100 Subject: [TYPO3-mvc] Flexforms dont get merged in $this->settings In-Reply-To: <mailman.91.1259020199.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.91.1259020199.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259045306.29104.typo3-project-typo3v4mvc@lists.typo3.org> Hi, This was asked in thread "FlexForm configuration cannot be retrieved anymore", a few days ago. > <foo> ^^ settings.foo > <TCEforms> > <label>Foo</label> > <config> > <type>input</type> > <size>5</size> > <max>5</max> > <eval>int</eval> > <default>0</default> > </config> > </TCEforms> > </foo> ^^ /settings.foo > <product> ^^ settings.product > <TCEforms> > <label>LLL:EXT:product_import_voila/Resources/Private/Language/FlexForms/ProductSimply.xml:product</label> > <config> > <type>select</type> > > <items type="array"> > <numIndex index="0" type="array"> > <numIndex index="0">LLL:EXT:product_import_voila/Resources/Private/Language/FlexForms/ProductSimply.xml:product.choice</numIndex> > <numIndex index="1"></numIndex> > </numIndex> > </items> > > <itemsProcFunc>tx_productimportvoila_helper->productSelect</itemsProcFunc> > </config> > </TCEforms> > </product> ^^ /settings.product > Any ideas? Some things changed? Is this a bug? A breaking change... Cheers -- Xavier Perseguers DBAL Leader http://forge.typo3.org/projects/show/extension-dbal From eliasfernandez at gmail.com Tue Nov 24 08:58:32 2009 From: eliasfernandez at gmail.com (=?ISO-8859-1?Q?El=EDas_Fern=E1ndez?=) Date: Tue, 24 Nov 2009 08:58:32 +0100 Subject: [TYPO3-mvc] storagePid and findObjectByUid Message-ID: <mailman.126.1259049565.615.typo3-project-typo3v4mvc@lists.typo3.org> Hello list. Is really amazing the development speed with extbase and fluid. Cool work?. I?m near to end my first extension, and it looks like i was programming all my life with extbase+fluid. Very intuitive. Now i have one suggestion. I think that the storagePid solution will give troubles, especially when you want to use the magic of property mapping. In my repository when i want to update an item, always throw Tx_Extbase_MVC_Exception_InvalidArgumentValue exception, because the mapper try to use findObjectByUid and it is storagePid dependant. ( The edit page is in another page than the list view ) I didn?t find a way of change setRespectStoragePage via pages. I think here is not very important the restriction of being in the same pid or not. Finally, i modify the Mapper class and insert the setRespectStoragePage to the findObjectByUid protected function findObjectByUid($dataType, $uid) { $query = $this->queryFactory->create($dataType); $query->getQuerySettings()->setRespectStoragePage(FALSE); $result = $query->matching($query->withUid($uid))->execute(); $object = NULL; if (count($result) > 0) { $object = current($result); } return $object; } This way my ext works ? But i know there must be a better solution. Thanx -- El?as Fern?ndez Vel?zquez From mkempe at seibert-media.net Tue Nov 24 12:43:12 2009 From: mkempe at seibert-media.net (Maik Kempe) Date: Tue, 24 Nov 2009 12:43:12 +0100 Subject: [TYPO3-mvc] Flexforms dont get merged in $this->settings In-Reply-To: <mailman.25.1259060406.16644.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.25.1259060406.16644.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.293.1259063045.615.typo3-project-typo3v4mvc@lists.typo3.org> Thanks for the hint. Have a great day. Maik Kempe //SEIBERT/MEDIA/TECHNOLOGIES -- //SEIBERT/MEDIA GmbH / Rheingau Palais S?hnleinstra?e 8 / 65201 Wiesbaden GF: J.Seibert und M.Seibert / AG Wiesbaden: HRB11502 T.+49-611-20570-49 / F.+49-611-20570-70 mkempe at seibert-media.net www.seibert-media.net / http://blog.seibert-media.net -- Consulting / Technologies / Design From info at sk-typo3.de Tue Nov 24 12:52:50 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Tue, 24 Nov 2009 12:52:50 +0100 Subject: [TYPO3-mvc] FlexForm configuration cannot be retrieved anymore In-Reply-To: <mailman.1.1258975184.26730.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258061713.15145.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258061818.14860.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258062422.15908.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258975184.26730.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259063616.20539.typo3-project-typo3v4mvc@lists.typo3.org> Hi Bastian, my "no answer yet" is caused by time problems, but i will look to this and you explanation later and comment it, thanks for it. vg Steffen From sebastian at typo3.org Wed Nov 25 06:36:43 2009 From: sebastian at typo3.org (=?ISO-8859-15?Q?Sebastian_Kurf=FCrst?=) Date: Wed, 25 Nov 2009 06:36:43 +0100 Subject: [TYPO3-mvc] Good Style to Store in Data Session? In-Reply-To: <mailman.1.1258647100.8413.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258647100.8413.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259127455.28810.typo3-project-typo3v4mvc@lists.typo3.org> Hey, this is perfectly fine. In FLOW3, we even have "@scope session" which means that an object will be automatically stored into a session. In 4.3, you need to do this by hand, right now. Greets, Sebastian From jigal at xs4all.nl Wed Nov 25 11:16:00 2009 From: jigal at xs4all.nl (Jigal van Hemert) Date: Wed, 25 Nov 2009 11:16:00 +0100 Subject: [TYPO3-mvc] Discussion: Storage Backend not compatible to DBAL In-Reply-To: <mailman.1.1258625132.8359.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258622222.15785.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258623374.9522.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258625132.8359.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259144214.14976.typo3-project-typo3v4mvc@lists.typo3.org> Hi, First of all, please don't be offended by anything in this message; it's merely my opinion. Xavier Perseguers wrote: >> BUT: providing backends for all instead of using DBAL is not a >> solution to me. > Neither to me. DBAL is by the way it works not a very good solution to me. Trying to convert queries made for one database system to another will give problems one way or another. This is clearly demonstrated by the wiki pages about how a developer should build queries to make them DBAL proof. The way t3lib_DB::listQuery() builds a list for checking fe_groups is very odd for someone who makes queries for recent versions of MySQL. The function FIND_IN_SET() [1] is a way simpler and more efficient way, but DBAL... A more efficient way is indeed to supply a basic layer which provides database specific implementations of various routines. The ideal way is that there are no database queries made at all anywhere in the code, except in the specific database layer. >> Why? >> 1. mixed envirenments would not be supported (as of DBAL) >> 2. table Mappings would not be supported (mapping feature of extbase >> works only within one database) Mixed environments would be a "cool feature", but I haven't heard of any company which wanted to store parts of the TYPO3 database in different DBMSs... For what I've understood of FLOW3 the implementation of a content repository eliminates the use/need of database queries in packages. Part of the purpose of extbase is to provide developers with a platform on which they can build extensions which can be ported relatively easy to FLOW3 packages for use with TYPO3 version 5. In this light a way to handle data with the least amount of SQL queries would be desirable and thus the way FLOW3 handles support for various DBMSs would also be the way to go (IMO). [1] http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_find-in-set Regards, Jigal. From jochen.rau at typoplanet.de Wed Nov 25 11:58:28 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Wed, 25 Nov 2009 11:58:28 +0100 Subject: [TYPO3-mvc] [!!!] Changes with the latest revision of Extbase Message-ID: <mailman.1.1259146760.18699.typo3-project-typo3v4mvc@lists.typo3.org> Hi. With revision 1705 the configuration option "foreign_class" in the $TCA became deprecated. There are no differences in the $TCA compared to traditional extensions anymore. The option is still available. So, existing Extbase extensions should still work. Please use the property annotation instead, as shown in the BlogExample: class Tx_BlogExample_Domain_Model_Blog extends Tx_Extbase_DomainObject_AbstractEntity { [...] /** * The posts contained in this blog * * @var Tx_Extbase_Persistence_ObjectStorage<Tx_BlogExample_Domain_Model_Post> * @lazy * @cascade remove */ protected $posts; [...] } For every ObjectStorage you have to specify the class of contained objects by adding "<Tx_MyExtension_MyClass>" right after "Tx_Extbase_Persistence_ObjectStorage". Please check your classes and update your annotations. Regards Jochen -- Every nit picked is a bug fixed From dennis.ahrens at googlemail.com Wed Nov 25 14:52:31 2009 From: dennis.ahrens at googlemail.com (dennis ahrens) Date: Wed, 25 Nov 2009 14:52:31 +0100 Subject: [TYPO3-mvc] UnitTests for Controller Message-ID: <mailman.1020.1259157204.615.typo3-project-typo3v4mvc@lists.typo3.org> Hi list, can anybody gimme a hint how to write a UnitTest for Controllers? When i try to make an instance of the controller i got the following error-msg: Error in test case exampleTest in file /home/dahrens/t3/TYPO3_core_svn/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.phpon line 115: Message: PHP Catchable Fatal Error: Argument 1 passed to Tx_Extbase_Persistence_Mapper_DataMapper::injectReflectionService() must be an instance of Tx_Extbase_Reflection_Service, null given, called in /home/dahrens/t3/TYPO3_core_svn/typo3/sysext/extbase/Classes/Dispatcher.php on line 257 and defined in /home/dahrens/t3/TYPO3_core_svn/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php line 115 The TestCode looks like this: <?php class Tx_BlogExample_Controller_BlogController_testcase extends Tx_Extbase_BaseTestCase { /** * @test */ public function exampleTest() { $controller = new Tx_BlogExample_Controller_BlogController(); } } ?> regards dennis From mailinglists at necroshine.de Wed Nov 25 17:23:10 2009 From: mailinglists at necroshine.de (Frederic Gaus) Date: Wed, 25 Nov 2009 17:23:10 +0100 Subject: [TYPO3-mvc] findByUid probably not working? Message-ID: <mailman.1121.1259166247.615.typo3-project-typo3v4mvc@lists.typo3.org> Hello, my fe_users looks mainly like this: uid / pid / name 1 / 0 / John Doe 2 / 4 / Bouche I wrote the following code: $userRepository = t3lib_div::makeInstance('Tx_Extbase_Domain_Repository_FrontendUserRepository'); $users = $userRepository->findAll(); This returns only the user "John Doe" on PID=0. A call of the method findByUid(1) also returns this fe_user The user Bouche is not fetched by "findAll" at all. Furthermore, findByUid(2) throws the following exception: Expected parameter 1 to be object, NULL given Tx_Extbase_MVC_Exception_InvalidArgumentType thrown in file /var/www/typo3/typo3_src-4.3.0RC1/typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php in line 134. Could someone help me, please? Thanks in advance! Best wishes Frederic -- Frederic Gaus pgp-key: 93E6903C fingerprint: 0C55 4517 CC1E 5F7F 9059 3535 AB54 D8E8 93E6 903C From typo3 at perseguers.ch Wed Nov 25 18:41:39 2009 From: typo3 at perseguers.ch (Xavier Perseguers) Date: Wed, 25 Nov 2009 18:41:39 +0100 Subject: [TYPO3-mvc] Discussion: Storage Backend not compatible to DBAL In-Reply-To: <mailman.1.1259144214.14976.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258622222.15785.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258623374.9522.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258625132.8359.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259144214.14976.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259170951.18660.typo3-project-typo3v4mvc@lists.typo3.org> Hi, > First of all, please don't be offended by anything in this message; it's > merely my opinion. np :-) > DBAL is by the way it works not a very good solution to me. Trying to > convert queries made for one database system to another will give > problems one way or another. > > This is clearly demonstrated by the wiki pages about how a developer > should build queries to make them DBAL proof. The way > t3lib_DB::listQuery() builds a list for checking fe_groups is very odd > for someone who makes queries for recent versions of MySQL. The function > FIND_IN_SET() [1] is a way simpler and more efficient way, but DBAL... ... has not yet implemented yet but will certainly (respectively "I will") if it becomes a should have. I'm about to add subquery support (yes, you read it!). I just hope it won't be that tricky :-) as it is needed to make EXT:crawler work and thus have indexed_search works. >>> Why? >>> 1. mixed envirenments would not be supported (as of DBAL) >>> 2. table Mappings would not be supported (mapping feature of extbase >>> works only within one database) > > Mixed environments would be a "cool feature", but I haven't heard of any > company which wanted to store parts of the TYPO3 database in different > DBMSs... Neither me except for personal project where I have "business" data in MSSQL but have the rest of TYPO3 in MySQL. I guess this configuration is quite common when using DBAL. > For what I've understood of FLOW3 the implementation of a content > repository eliminates the use/need of database queries in packages. Part > of the purpose of extbase is to provide developers with a platform on > which they can build extensions which can be ported relatively easy to > FLOW3 packages for use with TYPO3 version 5. Until TYPO3 v5 is not there, my opinion is to try to make DBAL (not Extbase) as compatible as possible with Extbase. I'm the first having fun with Extbase and as such I would like to be able to use it with something else than MySQL too. I already wrote my own persistence layer to use partly DBAL, partly rvt_adodb to access a MSSQL database and it just works well. If DBAL support can be added without too much of hassle and hopefully no change to Extbase, why not? Regards -- Xavier Perseguers http://xavier.perseguers.ch/en One contribution a day keeps the fork away From robert at boettner.it Wed Nov 25 19:13:51 2009 From: robert at boettner.it (=?iso-8859-1?Q?Robert_B=F6ttner?=) Date: Wed, 25 Nov 2009 19:13:51 +0100 Subject: [TYPO3-mvc] Configuration of checkbox groups Message-ID: <mailman.1188.1259172888.615.typo3-project-typo3v4mvc@lists.typo3.org> Hi, I?m wondering how I have to configure object attributes that get collected with checkbox groups. My frontend is based on Ext JS so I don?t use Fluid in these parts of the application. 'countries' is of type string in my Model and a varchar field in the DB. This is the part of TCA: 'countries' => array( 'exclude' => 0, 'label' => 'LLL:EXT:my_ext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_app.countries', 'config' => array( 'type' => 'input', 'size' => 30, 'eval' => 'trim' ) ), And this is how I name the fields in the form: {boxLabel: 'Australia', name: 'tx_myext_pi2[app][countries][]', inputValue: '1' }, {boxLabel: 'Austria', name: 'tx_myext_pi2[app][countries][]', inputValue: '2'}, {boxLabel: 'Belgium', name: 'tx_myext_pi2[app][countries][]', inputValue: '3'}, ... Currently nothing gets persisted for these attributes. Can anyone enlighten me? Cheers Robert. From info at rs-websystems.de Wed Nov 25 19:12:41 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Wed, 25 Nov 2009 19:12:41 +0100 Subject: [TYPO3-mvc] findByUid probably not working? In-Reply-To: <mailman.1121.1259166247.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1121.1259166247.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259172817.21312.typo3-project-typo3v4mvc@lists.typo3.org> Frederic Gaus schrieb: > Hello, > > my fe_users looks mainly like this: > uid / pid / name > 1 / 0 / John Doe > 2 / 4 / Bouche > > I wrote the following code: > $userRepository = > t3lib_div::makeInstance('Tx_Extbase_Domain_Repository_FrontendUserRepository'); > > $users = $userRepository->findAll(); > > This returns only the user "John Doe" on PID=0. A call of the method > findByUid(1) also returns this fe_user The user Bouche is not fetched by > "findAll" at all. Furthermore, findByUid(2) throws the following exception: > > Expected parameter 1 to be object, NULL given > > Tx_Extbase_MVC_Exception_InvalidArgumentType thrown in file > /var/www/typo3/typo3_src-4.3.0RC1/typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php > in line 134. > > Could someone help me, please? > Thanks in advance! Best wishes > > Frederic > > DId you set your storage pids correctly in TS? From thasmo at gmail.com Wed Nov 25 23:42:27 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Wed, 25 Nov 2009 23:42:27 +0100 Subject: [TYPO3-mvc] findByUid probably not working? In-Reply-To: <mailman.1.1259172817.21312.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1121.1259166247.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259172817.21312.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259189000.8980.typo3-project-typo3v4mvc@lists.typo3.org> I got the same problem, described in another e-mail. How to set the storage pid for a typo3-default table like sys_domain? Thanks a lot! Steffen Ritter schrieb: > Frederic Gaus schrieb: >> Hello, >> >> my fe_users looks mainly like this: >> uid / pid / name >> 1 / 0 / John Doe >> 2 / 4 / Bouche >> >> I wrote the following code: >> $userRepository = >> t3lib_div::makeInstance('Tx_Extbase_Domain_Repository_FrontendUserRepository'); >> >> $users = $userRepository->findAll(); >> >> This returns only the user "John Doe" on PID=0. A call of the method >> findByUid(1) also returns this fe_user The user Bouche is not fetched >> by "findAll" at all. Furthermore, findByUid(2) throws the following >> exception: >> >> Expected parameter 1 to be object, NULL given >> >> Tx_Extbase_MVC_Exception_InvalidArgumentType thrown in file >> /var/www/typo3/typo3_src-4.3.0RC1/typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php >> in line 134. >> >> Could someone help me, please? >> Thanks in advance! Best wishes >> >> Frederic >> >> > DId you set your storage pids correctly in TS? From sebastian at typo3.org Thu Nov 26 07:52:36 2009 From: sebastian at typo3.org (=?ISO-8859-1?Q?Sebastian_Kurf=FCrst?=) Date: Thu, 26 Nov 2009 07:52:36 +0100 Subject: [TYPO3-mvc] UnitTests for Controller In-Reply-To: <mailman.1020.1259157204.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1020.1259157204.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259218409.5327.typo3-project-typo3v4mvc@lists.typo3.org> Hey Dennis, Controllers are really hard to test because they have so many dependencies... What is your controller doing? In most cases, I'd rather suggest to put the difficult functionality to a Service, and keep the controller slim and lean. Greets, Sebastian From sebastian at typo3.org Thu Nov 26 07:54:10 2009 From: sebastian at typo3.org (=?ISO-8859-15?Q?Sebastian_Kurf=FCrst?=) Date: Thu, 26 Nov 2009 07:54:10 +0100 Subject: [TYPO3-mvc] findByUid probably not working? In-Reply-To: <mailman.1.1259189000.8980.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1121.1259166247.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259172817.21312.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259189000.8980.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259218503.5327.typo3-project-typo3v4mvc@lists.typo3.org> Hey, > I got the same problem, described in another e-mail. > How to set the storage pid for a typo3-default table > like sys_domain? For reading or creating? Or you'll disable the storage PID settings completely for that query. ($query->getQuerySettings()->setRespectStoragePage(FALSE)). Greets, Sebastian From sebastian at typo3.org Thu Nov 26 07:56:24 2009 From: sebastian at typo3.org (=?ISO-8859-1?Q?Sebastian_Kurf=FCrst?=) Date: Thu, 26 Nov 2009 07:56:24 +0100 Subject: [TYPO3-mvc] Configuration of checkbox groups In-Reply-To: <mailman.1188.1259172888.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1188.1259172888.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259218638.5327.typo3-project-typo3v4mvc@lists.typo3.org> Hi, do you get an exception? I could imagine that you'll get an "invalidRequestHash" exception. Maybe you need to add the @dontverifyrequesthash annotation? See http://forge.typo3.org/issues/show/4960 for more details! Greets, Sebastian From robert at boettner.it Thu Nov 26 08:11:33 2009 From: robert at boettner.it (=?iso-8859-1?Q?Robert_B=F6ttner?=) Date: Thu, 26 Nov 2009 08:11:33 +0100 Subject: [TYPO3-mvc] Configuration of checkbox groups In-Reply-To: <mailman.1.1259218638.5327.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1188.1259172888.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259218638.5327.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1366.1259219551.615.typo3-project-typo3v4mvc@lists.typo3.org> Hi Sebastian and thanks for your reply. > do you get an exception? I could imagine that you'll get an > "invalidRequestHash" exception. I added the @dontverifyrequesthash already. The request finishes with no exception and all other object attributes in the same request get persisted as expected. I?ll investigate that further today... Cheers Robert. From dennis.ahrens at googlemail.com Thu Nov 26 11:21:11 2009 From: dennis.ahrens at googlemail.com (dennis ahrens) Date: Thu, 26 Nov 2009 11:21:11 +0100 Subject: [TYPO3-mvc] UnitTests for Controller In-Reply-To: <mailman.1.1259218409.5327.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1020.1259157204.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259218409.5327.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1419.1259230926.615.typo3-project-typo3v4mvc@lists.typo3.org> Hi Sebastian, in my case the controller is just calling some methods on a parser which build up a object and adds it to the repository. Looks like this: public function importAction($xmlFile) { $this->parser->loadXMLFile($xmlFile,'documenttemplate.xsd'); if($this->parser->validate()) { $documentTemplate = $this->parser->convertIntoObject(); $this->documentTemplateRepository->add($documentTemplate); } } do you think it's best practice to write tests for all service methods and don't write tests for the controller at all? regards Dennis Am 26. November 2009 07:52 schrieb Sebastian Kurf?rst <sebastian at typo3.org>: > Hey Dennis, > > Controllers are really hard to test because they have so many > dependencies... What is your controller doing? > > In most cases, I'd rather suggest to put the difficult functionality to > a Service, and keep the controller slim and lean. > > Greets, > Sebastian > _______________________________________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc at lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc > From bastian at typo3.org Thu Nov 26 19:22:09 2009 From: bastian at typo3.org (Bastian Waidelich) Date: Thu, 26 Nov 2009 19:22:09 +0100 Subject: [TYPO3-mvc] Forwarding action without loosing request parameters In-Reply-To: <mailman.1.1257107344.5888.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256939073.32037.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256975196.7668.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257107344.5888.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259259779.29714.typo3-project-typo3v4mvc@lists.typo3.org> Thomas "Thasmo" Deinhamer wrote: Hi Thomas, > I changed the method to 'redirect()', but now the following accours: > > If I use method="post" in the <f:form> tag, it will redirect me to > http://my-domain.tld//<title>.<id>.<type>.html?&tx_ext_plugin[action]=index&tx_ext_plugin[controller]=PluginController&cHash=<hash> > The weird is, that the two "//" won't be recognized by TYPO3 and the > homepage will be shown with no error-handling page defined in the > install-tool. Could you please check whether the patch at http://forge.typo3.org/issues/show/5248 works for you? Thanks and please excuse the late reply! Bastian From robert at boettner.it Thu Nov 26 20:46:10 2009 From: robert at boettner.it (=?iso-8859-1?Q?Robert_B=F6ttner?=) Date: Thu, 26 Nov 2009 20:46:10 +0100 Subject: [TYPO3-mvc] Configuration of checkbox groups In-Reply-To: <mailman.1366.1259219551.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1188.1259172888.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259218638.5327.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1366.1259219551.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1767.1259264829.615.typo3-project-typo3v4mvc@lists.typo3.org> Hi all, > I added the @dontverifyrequesthash already. The request finishes with no exception and all other object attributes in the same request get persisted as expected. I?ll investigate that further today... The configuration was correct. The problem was related to another problem with a file upload field in the same form. But to get the POST array serialized and persistable I needed to add this line to my controller: $app->setCountries(json_encode($app->getCountries())); One could of course also serialize() or implode() whatever serves the individual model/purpose better. Have fun Robert. From thasmo at gmail.com Thu Nov 26 22:49:55 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Thu, 26 Nov 2009 22:49:55 +0100 Subject: [TYPO3-mvc] findByUid probably not working? In-Reply-To: <mailman.1.1259218503.5327.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1121.1259166247.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259172817.21312.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259189000.8980.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259218503.5327.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259272249.6803.typo3-project-typo3v4mvc@lists.typo3.org> This solution has already been proposed by someone, but I'd prefer to define the PID manually for the records. In case of the sys_domain table, which PID should be set? "Zero"? Thanks a lot! Sebastian Kurf?rst schrieb: > Hey, > >> I got the same problem, described in another e-mail. >> How to set the storage pid for a typo3-default table >> like sys_domain? > For reading or creating? Or you'll disable the storage PID settings > completely for that query. > ($query->getQuerySettings()->setRespectStoragePage(FALSE)). > > Greets, > Sebastian From axel.mueller at amit-services.de Fri Nov 27 10:49:34 2009 From: axel.mueller at amit-services.de (=?UTF-8?Q?Axel_M=C3=BCller?=) Date: Fri, 27 Nov 2009 10:49:34 +0100 Subject: [TYPO3-mvc] =?utf-8?q?Tx=5FFluid=5FViewHelpers=5FForm=5FRadioView?= =?utf-8?q?Helper_in_newAction_View?= Message-ID: <mailman.2068.1259315440.615.typo3-project-typo3v4mvc@lists.typo3.org> Hi, with the following lines in my Formtemplate new.html for a newAction: <f:form.radio property="barrierefreiheit" value="1" /> ja <f:form.radio property="barrierefreiheit" value="0" checked="checked" /> nein I get this error-message: RuntimeException No value found for key "Tx_Fluid_ViewHelpers_FormViewHelper->formObject" Without this line, the Form functions. Is there something wrong with my code? I digged into fluid and found in fluid/Class/ViewHelpers/Form/RadioViewHelper.php line 98: $propertyValue = $this->getPropertyValue(); $this->getPropertyValue() is defined in fluid/Class/ViewHelpers/Form/AbstractFormFieldViewHelper.php line 149 line 150 is the Problem: $formObject = $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObject'); Sorry, if I ask at the wrong place or ask a faq. greetings, Axel M?ller -- axel.mueller at amit-services.de http://www.amit-services.de tel (06322) 680 668 mobil 0160 973 483 27 jabber-id: axelm at jabber.ccc.de From axel.mueller at amit-services.de Fri Nov 27 10:56:04 2009 From: axel.mueller at amit-services.de (=?UTF-8?Q?Axel_M=C3=BCller?=) Date: Fri, 27 Nov 2009 10:56:04 +0100 Subject: [TYPO3-mvc] =?utf-8?q?Tx=5FFluid=5FViewHelpers=5FForm=5FRadioView?= =?utf-8?q?Helper_in_newAction_View?= In-Reply-To: <mailman.2068.1259315440.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.2068.1259315440.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.2072.1259315827.615.typo3-project-typo3v4mvc@lists.typo3.org> > with the following lines in my Formtemplate new.html for a newAction: > > <f:form.radio property="barrierefreiheit" value="1" /> ja > <f:form.radio property="barrierefreiheit" value="0" checked="checked" /> > nein same without checked="checked" > > greetings, > Axel M?ller -- axel.mueller at amit-services.de http://www.amit-services.de tel (06322) 680 668 mobil 0160 973 483 27 gpg-id: AADE7CDF jabber-id: axelm at jabber.ccc.de From thasmo at gmail.com Sat Nov 28 03:40:56 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Sat, 28 Nov 2009 03:40:56 +0100 Subject: [TYPO3-mvc] Forwarding action without loosing request parameters In-Reply-To: <mailman.1.1259259779.29714.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1256939073.32037.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1256975196.7668.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1257107344.5888.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259259779.29714.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259376112.31162.typo3-project-typo3v4mvc@lists.typo3.org> Seems it does it's job now, but somehow the assigned fluid property does not do it's job anymore - does not get displayed. Have a look here: http://gist.github.com/244349 Shouldn't "address" be available in the template view by then? Thanks for help! Bastian Waidelich schrieb: > Thomas "Thasmo" Deinhamer wrote: > > Hi Thomas, > >> I changed the method to 'redirect()', but now the following accours: >> >> If I use method="post" in the <f:form> tag, it will redirect me to >> http://my-domain.tld//<title>.<id>.<type>.html?&tx_ext_plugin[action]=index&tx_ext_plugin[controller]=PluginController&cHash=<hash> > > >> The weird is, that the two "//" won't be recognized by TYPO3 and the >> homepage will be shown with no error-handling page defined in the >> install-tool. > > Could you please check whether the patch at > http://forge.typo3.org/issues/show/5248 works for you? > > Thanks and please excuse the late reply! > Bastian From mam.violeng at yejj.com Sat Nov 28 04:14:00 2009 From: mam.violeng at yejj.com (Mam Violeng) Date: Sat, 28 Nov 2009 10:14:00 +0700 Subject: [TYPO3-mvc] How to send an email after createAction? Message-ID: <mailman.1.1259378099.1794.typo3-project-typo3v4mvc@lists.typo3.org> Hi All, I'm new with exbase, I have programmed one extension that have a form for user to register and after user click on submit I want to send an email to user (to email that user filled in the form), but I don't how can I do with extbase. Could anyone please help me? Thanks in advance. Violeng From sebastian at typo3.org Sun Nov 29 10:02:07 2009 From: sebastian at typo3.org (=?ISO-8859-1?Q?Sebastian_Kurf=FCrst?=) Date: Sun, 29 Nov 2009 10:02:07 +0100 Subject: [TYPO3-mvc] How to send an email after createAction? In-Reply-To: <mailman.1.1259378099.1794.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259378099.1794.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259485383.16247.typo3-project-typo3v4mvc@lists.typo3.org> Hey, why not just write your createAction like this: createAction(User $user) { $this->userRepository->add($user); $this->emailService->sendRegistrationEmail($user); } Greets, Sebastian From sebastian at typo3.org Sun Nov 29 10:07:28 2009 From: sebastian at typo3.org (=?ISO-8859-1?Q?Sebastian_Kurf=FCrst?=) Date: Sun, 29 Nov 2009 10:07:28 +0100 Subject: [TYPO3-mvc] UnitTests for Controller In-Reply-To: <mailman.1419.1259230926.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1020.1259157204.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259218409.5327.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1419.1259230926.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259485704.16463.typo3-project-typo3v4mvc@lists.typo3.org> Hi, > do you think it's best practice to write tests for all service methods > and don't write tests for the controller at all? It depends always, but I would not test the controller there. Don't have any references here, though. Greets, Sebastian From sebastian at typo3.org Sun Nov 29 10:08:22 2009 From: sebastian at typo3.org (=?ISO-8859-15?Q?Sebastian_Kurf=FCrst?=) Date: Sun, 29 Nov 2009 10:08:22 +0100 Subject: [TYPO3-mvc] findByUid probably not working? In-Reply-To: <mailman.1.1259272249.6803.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1121.1259166247.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259172817.21312.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259189000.8980.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259218503.5327.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259272249.6803.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259485759.16463.typo3-project-typo3v4mvc@lists.typo3.org> Hi, then just give your domain model a "pid" property with getters and setters :-) It will not be overridden. Greets, Sebastian From info at rs-websystems.de Sun Nov 29 11:23:22 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Sun, 29 Nov 2009 11:23:22 +0100 Subject: [TYPO3-mvc] Invoking fluid outside the automatic call in controllers Message-ID: <mailman.1.1259490259.13527.typo3-project-typo3v4mvc@lists.typo3.org> now to the right list... Hey list, for all who probably might need this, I'll provide a function which renders a template file with fluid and returns the rendered string. Me - for example - use this in may Repository. Wondering why: I extended the "update" function, so that "onUpdate" of every Object I can write it's representation to file system. In my special case im writing an apache vhost config file to the filesystem on saving the "vhost" object. I hope this might be useful to someone. I think this also could work from eId oder cli (not tested). regards Steffen /** * renders the given Template file via fluid rendering engine. * You might encounter problems with viewhelpers, since no controller context is set. * * @param string $templateFile absolute path to the template File * @param array $vars an array of all variables you want to assgin to the view f.e: array('blog'=> $blog, 'posts' => $posts) * * @return string of the rendered View. */ protected function renderFileTemplate($templateFile, array $vars) { $templateParser = Tx_Fluid_Compatibility_TemplateParserBuilder::build(); $objectFactory = t3lib_div::makeInstance('Tx_Fluid_Compatibility_ObjectFactory'); $templateContent = file_get_contents($templateFile); if ($templateContent !== false) { $content = $templateParser->parse($templateContent); $variableContainer = $objectFactory->create('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer', $vars); $renderingConfiguration = $objectFactory->create('Tx_Fluid_Core_Rendering_RenderingConfiguration'); $renderingContext = $objectFactory->create('Tx_Fluid_Core_Rendering_RenderingContext'); $renderingContext->setTemplateVariableContainer($variableContainer); $renderingContext->setRenderingConfiguration($renderingConfiguration); $data = $content->render($renderingContext); return $data; } } From sebastian at typo3.org Sun Nov 29 11:48:35 2009 From: sebastian at typo3.org (=?UTF-8?B?U2ViYXN0aWFuIEt1cmbDvHJzdA==?=) Date: Sun, 29 Nov 2009 11:48:35 +0100 Subject: [TYPO3-mvc] Tx_Fluid_ViewHelpers_Form_RadioViewHelper in newAction View In-Reply-To: <mailman.2072.1259315827.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.2068.1259315440.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.2072.1259315827.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259491772.22611.typo3-project-typo3v4mvc@lists.typo3.org> Hey, >> <f:form.radio property="barrierefreiheit" value="1" /> ja >> <f:form.radio property="barrierefreiheit" value="0" checked="checked" /> If you use the property attribute, Fluid expects an object which is bound to the form via object="...". If you do not want to bind an object to the form, then just use "name" instead of "property". Greets, Sebastian From sebastian at typo3.org Sun Nov 29 11:50:28 2009 From: sebastian at typo3.org (=?ISO-8859-15?Q?Sebastian_Kurf=FCrst?=) Date: Sun, 29 Nov 2009 11:50:28 +0100 Subject: [TYPO3-mvc] Invoking fluid outside the automatic call in controllers In-Reply-To: <mailman.1.1259490259.13527.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259490259.13527.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259491885.22611.typo3-project-typo3v4mvc@lists.typo3.org> Hey Steffen, could you please add this to the Fluid wiki on Forge? Thanks & Greets, Sebastian From info at rs-websystems.de Sun Nov 29 11:53:00 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Sun, 29 Nov 2009 11:53:00 +0100 Subject: [TYPO3-mvc] Invoking fluid outside the automatic call in controllers In-Reply-To: <mailman.1.1259491885.22611.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259490259.13527.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259491885.22611.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259492036.13527.typo3-project-typo3v4mvc@lists.typo3.org> Sebastian Kurf?rst schrieb: > Hey Steffen, > > could you please add this to the Fluid wiki on Forge? Fluid v4 or fluid overall? Since the function uses the "compatibilty" classes which I think only belong to v4, isn't it? regards Steffen From sebastian at typo3.org Sun Nov 29 11:56:57 2009 From: sebastian at typo3.org (=?ISO-8859-15?Q?Sebastian_Kurf=FCrst?=) Date: Sun, 29 Nov 2009 11:56:57 +0100 Subject: [TYPO3-mvc] Invoking fluid outside the automatic call in controllers In-Reply-To: <mailman.1.1259492036.13527.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259490259.13527.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259491885.22611.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259492036.13527.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259492274.23251.typo3-project-typo3v4mvc@lists.typo3.org> Hey, > Fluid v4 or fluid overall? > Since the function uses the "compatibilty" classes which I think only > belong to v4, isn't it? Good point! Then the "MVC Framework" wiki :) Probably I should close down the Fluid wiki for now, and link to the other wiki instead. Greets, Sebastian From info at rs-websystems.de Sun Nov 29 14:14:23 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Sun, 29 Nov 2009 14:14:23 +0100 Subject: [TYPO3-mvc] Invoking fluid outside the automatic call in controllers In-Reply-To: <mailman.1.1259492274.23251.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259490259.13527.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259491885.22611.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259492036.13527.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259492274.23251.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259500519.13527.typo3-project-typo3v4mvc@lists.typo3.org> Sebastian Kurf?rst schrieb: > Hey, > >> Fluid v4 or fluid overall? >> Since the function uses the "compatibilty" classes which I think only >> belong to v4, isn't it? > Good point! Then the "MVC Framework" wiki :) > > Probably I should close down the Fluid wiki for now, and link to the > other wiki instead. > > Greets, > Sebastian Done at: http://forge.typo3.org/wiki/typo3v4-mvc/How_to_userender_a_fluid_template_in_a_ServiceeIdCLI_Script Greets From info at rs-websystems.de Sun Nov 29 17:29:01 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Sun, 29 Nov 2009 17:29:01 +0100 Subject: [TYPO3-mvc] How to use f:form.checkbox Message-ID: <mailman.1.1259512198.13527.typo3-project-typo3v4mvc@lists.typo3.org> Hey folks, i do not get the viewhelper f:form.checkbox to work... I defined <f:form.checkbox property="active" /> in the Template The checkbox is always checked, no matter what the value of the object is. Unsetting the checkbox does not change anything at the object. <f:if condition="{object.active}">Active</f:if> shows,that de getter works as expected and the value ist defined differently in different objects. What I'm getting wrong? regards Steffen From axel.mueller at amit-services.de Sun Nov 29 18:13:51 2009 From: axel.mueller at amit-services.de (=?UTF-8?Q?Axel_M=C3=BCller?=) Date: Sun, 29 Nov 2009 18:13:51 +0100 Subject: [TYPO3-mvc] =?utf-8?q?Tx=5FFluid=5FViewHelpers=5FForm=5FRadioView?= =?utf-8?q?Helper_in_newAction_View?= In-Reply-To: <mailman.1.1259491772.22611.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.2068.1259315440.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.2072.1259315827.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259491772.22611.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.2785.1259514898.615.typo3-project-typo3v4mvc@lists.typo3.org> Hi, >>> <f:form.radio property="barrierefreiheit" value="1" /> ja >>> <f:form.radio property="barrierefreiheit" value="0" checked="checked" /> > If you use the property attribute, Fluid expects an object which is > bound to the form via object="...". > > If you do not want to bind an object to the form, then just use "name" > instead of "property". mh, but my action looks like the actions in blog_example: public function newAction(Tx_BneMannheim_Domain_Model_Adresse $newAdresse = NULL) { $this->view->assign('newAdresse', $newAdresse); } and the object $newAdresse ist bound to the form: <f:form method="post" controller="Adresse" action="create" name="newAdresse" object="{newAdresse}"> Of cource $newAdress is NULL, but the Form_ViewHelpers textbox and textarea take the property attribute without error. greetings, Axel -- axel.mueller at amit-services.de http://www.amit-services.de tel (06322) 680 668 mobil 0160 973 483 27 gpg-id: AADE7CDF jabber-id: axelm at jabber.ccc.de From thasmo at gmail.com Sun Nov 29 18:59:14 2009 From: thasmo at gmail.com (Thomas "Thasmo" Deinhamer) Date: Sun, 29 Nov 2009 18:59:14 +0100 Subject: [TYPO3-mvc] findByUid probably not working? In-Reply-To: <mailman.1.1259485759.16463.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1121.1259166247.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259172817.21312.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259189000.8980.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259218503.5327.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259272249.6803.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259485759.16463.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259517610.18936.typo3-project-typo3v4mvc@lists.typo3.org> Can I somehow define this in TS or even in another way? The DomainModels in 'blog_example' don't have a PID given. Thanks! Sebastian Kurf?rst schrieb: > Hi, > > then just give your domain model a "pid" property with getters and > setters :-) It will not be overridden. > > Greets, > Sebastian From axel.mueller at amit-services.de Sun Nov 29 20:49:40 2009 From: axel.mueller at amit-services.de (=?UTF-8?Q?Axel_M=C3=BCller?=) Date: Sun, 29 Nov 2009 20:49:40 +0100 Subject: [TYPO3-mvc] How to use f:form.checkbox In-Reply-To: <mailman.1.1259512198.13527.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259512198.13527.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.2813.1259524246.615.typo3-project-typo3v4mvc@lists.typo3.org> Hi, > i do not get the viewhelper f:form.checkbox to work... me too. Maybe there is a Problem with boolean Attributes in Models: in Tx_Exbase_Property_Mapper::transformToObject if I check the Checkbox I get via t3lib_div::debug($propertyValue) ------------------------- __identity | 38 raum | Raum 8 adresse | irgendwo ort | irgendwo erreichbarkeit | ja barrierefreiheit | 1 ------------------------- if I uncheck it I get: ------------------------- __identity | 38 raum | Raum 8 adresse | irgendwo ort | irgendwo erreichbarkeit | ja ------------------------- the boolean "barrierefreiheit", switched via the checkbox isn't in the array. some lines later Tx_Exbase_Property_Mapper::transformToObject: 258 } elseif (is_array($propertyValue)) { 259 if (isset($propertyValue['__identity'])) { 260 $existingObject = $this->findObjectByUid($targetType, $propertyValue['__identity']); 261 if ($existingObject === FALSE) throw new Tx_Extbase_Property_Exception_TargetNotFound('Querying the repository for the specified object was not successful.', 1 237305720); 262 unset($propertyValue['__identity']); 263 264 if (count($propertyValue) === 0) { 265 $propertyValue = $existingObject; 266 } elseif ($existingObject !== NULL) { 267 $newObject = clone $existingObject; in this line, the existing array_keys get mapped, but barrierefreiheit isn't a key in propertyValue and therefore isn't changed. Am I wrong? It's late... 268 if ($this->map(array_keys($propertyValue), $propertyValue, $newObject)) { 269 $propertyValue = $newObject; 270 } 271 } 272 greetings, Axel -- axel.mueller at amit-services.de http://www.amit-services.de tel (06322) 680 668 mobil 0160 973 483 27 gpg-id: AADE7CDF jabber-id: axelm at jabber.ccc.de From eat.dimanche at yjj.com Mon Nov 30 03:29:22 2009 From: eat.dimanche at yjj.com (Dimanche) Date: Mon, 30 Nov 2009 09:29:22 +0700 Subject: [TYPO3-mvc] How to send an email after createAction? In-Reply-To: <mailman.1.1259485383.16247.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259378099.1794.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259485383.16247.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259548241.18808.typo3-project-typo3v4mvc@lists.typo3.org> Sebastian Kurf?rst wrote: > Hey, > > why not just write your createAction like this: > > createAction(User $user) { > $this->userRepository->add($user); > $this->emailService->sendRegistrationEmail($user); > } > > Greets, > Sebastian Hi Sebastian, I have tested yours function, but it shown the error message "Call to a member function sendRegistrationEmail() on a non-object". I don't know which class I need to extend my new object, please writing down by detail, how can I use the function "sendRegistrationEmail($user)"? And one more could you explain an operation of sending email, I mean email: FROM ??? email: TO ??? Thanks very much. Regards, Dimanche From jochen.rau at typoplanet.de Mon Nov 30 03:53:30 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Mon, 30 Nov 2009 03:53:30 +0100 Subject: [TYPO3-mvc] UnitTests for Controller In-Reply-To: <mailman.1419.1259230926.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1020.1259157204.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259218409.5327.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1419.1259230926.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259549668.20032.typo3-project-typo3v4mvc@lists.typo3.org> Hi Dennis, dennis ahrens wrote: > in my case the controller is just calling some methods on a parser > which build up a object and adds it to the repository. > Looks like this: > > public function importAction($xmlFile) { > $this->parser->loadXMLFile($xmlFile,'documenttemplate.xsd'); > if($this->parser->validate()) { > $documentTemplate = $this->parser->convertIntoObject(); > $this->documentTemplateRepository->add($documentTemplate); > } > } > > do you think it's best practice to write tests for all service methods > and don't write tests for the controller at all? It's ok to write tests for the controller, although it contains very little logic. Here is an example of a test for an indexAction: public function indexAction() { $this->view->assign('organizations', $this->organizationRepository->findAll()); } class Tx_SjrOffers_Controller_OrganizationControllerTest extends Tx_Extbase_BaseTestCase { /** * @test */ public function indexActionWorks() { $mockOrganizationRepository = $this->getMock('Tx_SjrOffers_Domain_Repository_OrganizationRepository', array('findAll'), array(), '', FALSE); $mockOrganizationRepository->expects($this->once())->method('findAll')->will($this->returnValue(array('organization1', 'organization2'))); $mockView = $this->getMock('Tx_Fluid_Core_View_TemplateView', array('assign'), array(), '', FALSE); $mockView->expects($this->once())->method('assign')->with('organizations', array('organization1', 'organization2')); $mockController = $this->getMock($this->buildAccessibleProxy('Tx_SjrOffers_Controller_OrganizationController'), array('dummy'), array(), '', FALSE); $mockController->_set('organizationRepository', $mockOrganizationRepository); $mockController->_set('view', $mockView); $mockController->indexAction(); } } Because of the numerous dependencies of the controller, you have to make usage of mocks. The most important line here is $mockController=$this->getMock($this->buildAccessibleProxy ('Tx_SjrOffers_Controller_OrganizationController'), array('dummy'), array(), '', FALSE); The argument array('dummy') ensures that every method will be implemented and not mocked. That's a little bit confusing, but otherwise the indexAction will be replaced by a mock method and won't do anything. The argument FALSE ensures that the constructor will not be invoked. Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Mon Nov 30 04:10:42 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Mon, 30 Nov 2009 04:10:42 +0100 Subject: [TYPO3-mvc] How to send an email after createAction? In-Reply-To: <mailman.1.1259548241.18808.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259378099.1794.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259485383.16247.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259548241.18808.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259550700.20848.typo3-project-typo3v4mvc@lists.typo3.org> Hi Dimance. Dimanche wrote: >> why not just write your createAction like this: >> >> createAction(User $user) { >> $this->userRepository->add($user); >> $this->emailService->sendRegistrationEmail($user); >> } >> >> Greets, >> Sebastian > Hi Sebastian, > > I have tested yours function, but it shown the error message > > "Call to a member function sendRegistrationEmail() on a non-object". That's because there is no emailService shipped with Extbase. You have to implement your own. Put you class file in typo3conf/ext/my_ext/Classes/Domain/Service/EmailService.php. > I don't know which class I need to extend my new object, please writing > down by detail, how can I use the function "sendRegistrationEmail($user)"? The class EmailService.php could be something like class Tx_MxExt_Domain_Service_EmailService { public function sendRegistrationEmail(Tx_MxClass_Domain_Model_Client $client) { // implement your code to send an email here // tslib_cObj::sendNotifyEmail } } Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Mon Nov 30 04:36:10 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Mon, 30 Nov 2009 04:36:10 +0100 Subject: [TYPO3-mvc] Discussion: Storage Backend not compatible to DBAL In-Reply-To: <mailman.1.1258623374.9522.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258622222.15785.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258623374.9522.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259552228.22483.typo3-project-typo3v4mvc@lists.typo3.org> Hi Steffen, sorry for being absent in this discussion started by me. Steffen Ritter wrote: >> There is an open issue "Typo3DBBackend.php not compatible to DBAL" on >> forge. >> >> http://forge.typo3.org/issues/show/5374 [...] > since the "fast Version" of rewriting did not get into 4.3 (sry i did > not have the time for finishing patch due to an "clients emergency" > (server break)) i would say for 4.4 we should provide a clean solution. > > BUT: providing backends for all instead of using DBAL is not a solution > to me. > > Why? > 1. mixed envirenments would not be supported (as of DBAL) They could be easily supported, if we provide a solution to select the Storage Backend for each class. Dependency Injection comes in mind. > 2. table Mappings would not be supported (mapping feature of extbase > works only within one database) This is related to 1. and is only a matter of configuration. > 3. reinvent the wheel? better join forces an optimize DBAL No. I don't want to reinvent the wheel. There is a lot of knowledge inside DBAL. I suggest to reuse this knowledge and build it upon a clean architecture. Currently DBAL is structured like this (very simplified) function INSERT () { switch(type) { case 'native': // some stuff break; case 'adodb': // a lot of stuff break; case 'userdefined': //some stuff break; } } function UPDATE () { switch(type) { case 'native': // some stuff break; case 'adodb': // a lot of stuff break; case 'userdefined': //some stuff break; } } function SELECT () { switch(type) { case 'native': // some stuff break; case 'adodb': // a lot of stuff break; case 'userdefined': //some stuff break; } } And I still propose to have StorageBackendInterface - AbstractStorageBackend <- some common functionality - AbstractAnsiSqlBackend <- does most of the parsing - MySqlBackend - AdodbBackend - PostgresBackend - PdoBackend - [userdefinded] which is much cleaner IMO. Is it worth the effort? I think it is. Why? It's far more attractive for other developers to extend and improve the system because they only have to dig into a small classes (like PostgresBackend). It's clean and modular. Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Mon Nov 30 04:43:12 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Mon, 30 Nov 2009 04:43:12 +0100 Subject: [TYPO3-mvc] Discussion: Storage Backend not compatible to DBAL In-Reply-To: <mailman.1.1259144214.14976.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258622222.15785.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258623374.9522.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258625132.8359.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259144214.14976.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259552650.22889.typo3-project-typo3v4mvc@lists.typo3.org> Hi Jigal Jigal van Hemert wrote: > The ideal way is that there are no database queries made at all anywhere > in the code, except in the specific database layer. Full ack. In Extbase we don't have to use SQL statements to fetch objects from the repository. (Although you can still use $query->statement('SELECT * FROM foo')->execute() if you really really want it). >>> Why? >>> 1. mixed envirenments would not be supported (as of DBAL) >>> 2. table Mappings would not be supported (mapping feature of extbase >>> works only within one database) > > Mixed environments would be a "cool feature", but I haven't heard of any > company which wanted to store parts of the TYPO3 database in different > DBMSs... Don't restrict it to databases. You might want to fetch some objects via a web service. > For what I've understood of FLOW3 the implementation of a content > repository eliminates the use/need of database queries in packages. Part > of the purpose of extbase is to provide developers with a platform on > which they can build extensions which can be ported relatively easy to > FLOW3 packages for use with TYPO3 version 5. Yes. The Query object implements the same interface as in FLOW3. Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Mon Nov 30 04:45:45 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Mon, 30 Nov 2009 04:45:45 +0100 Subject: [TYPO3-mvc] Discussion: Storage Backend not compatible to DBAL In-Reply-To: <mailman.1.1259170951.18660.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1258622222.15785.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258623374.9522.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1258625132.8359.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259144214.14976.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259170951.18660.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259552803.22889.typo3-project-typo3v4mvc@lists.typo3.org> Hi Xavier, > Until TYPO3 v5 is not there, my opinion is to try to make DBAL (not > Extbase) as compatible as possible with Extbase. I'm the first having > fun with Extbase and as such I would like to be able to use it with > something else than MySQL too. I already wrote my own persistence layer > to use partly DBAL, partly rvt_adodb to access a MSSQL database and it > just works well. If DBAL support can be added without too much of hassle > and hopefully no change to Extbase, why not? We can make the Storage Backend of Extbase compatible to DBAL by invoking exec_* if needed. We can encapsulate this in an extra class DbalBackend. Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Mon Nov 30 04:52:37 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Mon, 30 Nov 2009 04:52:37 +0100 Subject: [TYPO3-mvc] storagePid and findObjectByUid In-Reply-To: <mailman.126.1259049565.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.126.1259049565.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259553215.23372.typo3-project-typo3v4mvc@lists.typo3.org> Hi El?as. El?as Fern?ndez wrote: > In my repository when i want to update an item, always throw > Tx_Extbase_MVC_Exception_InvalidArgumentValue exception, because the mapper > try to use findObjectByUid and it is storagePid dependant. > ( The edit page is in another page than the list view ) > > I didn?t find a way of change setRespectStoragePage via pages. > > I think here is not very important the restriction of being in the same pid > or not. Finally, i modify the Mapper class and insert the > setRespectStoragePage to the findObjectByUid > > protected function findObjectByUid($dataType, $uid) { > $query = $this->queryFactory->create($dataType); > $query->getQuerySettings()->setRespectStoragePage(FALSE); > $result = $query->matching($query->withUid($uid))->execute(); > $object = NULL; > if (count($result)> 0) { > $object = current($result); > } > return $object; > } Well, I fully agree with you. We have to provide a way to specify if the pid should be respected or not while fetching related objects. IMO we should setRespectStoragePage(FALSE) inside findObjectByUid by default. But maybe Sebastian K. has a contrary opinion ;-) Regards Jochen -- Every nit picked is a bug fixed From jochen.rau at typoplanet.de Mon Nov 30 04:55:08 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Mon, 30 Nov 2009 04:55:08 +0100 Subject: [TYPO3-mvc] findByUid probably not working? In-Reply-To: <mailman.1.1259485759.16463.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1121.1259166247.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259172817.21312.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259189000.8980.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259218503.5327.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259272249.6803.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259485759.16463.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259553365.23372.typo3-project-typo3v4mvc@lists.typo3.org> Hi Sebastian. Sebastian Kurf?rst wrote: > then just give your domain model a "pid" property with getters and > setters :-) It will not be overridden. A property "pid" in a domain model? I'd only implement that for Tx_MyBookExtension_Domain_Model_Book ;-) Regards Jochen -- Every nit picked is a bug fixed From sebastian at typo3.org Mon Nov 30 06:39:11 2009 From: sebastian at typo3.org (=?UTF-8?B?U2ViYXN0aWFuIEt1cmbDvHJzdA==?=) Date: Mon, 30 Nov 2009 06:39:11 +0100 Subject: [TYPO3-mvc] Tx_Fluid_ViewHelpers_Form_RadioViewHelper in newAction View In-Reply-To: <mailman.2785.1259514898.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.2068.1259315440.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.2072.1259315827.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259491772.22611.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.2785.1259514898.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259559609.29204.typo3-project-typo3v4mvc@lists.typo3.org> Hi, then it looks to me like a bug. Could you please file an error report on Forge? Greets, Sebastian From info at rs-websystems.de Mon Nov 30 06:48:13 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Mon, 30 Nov 2009 06:48:13 +0100 Subject: [TYPO3-mvc] Tx_Fluid_ViewHelpers_Form_RadioViewHelper in newAction View In-Reply-To: <mailman.2068.1259315440.615.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.2068.1259315440.615.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259560152.29686.typo3-project-typo3v4mvc@lists.typo3.org> Axel M?ller schrieb: > Hi, > > with the following lines in my Formtemplate new.html for a newAction: > > <f:form.radio property="barrierefreiheit" value="1" /> ja > <f:form.radio property="barrierefreiheit" value="0" checked="checked" /> > nein > > I get this error-message: > > RuntimeException > No value found for key "Tx_Fluid_ViewHelpers_FormViewHelper->formObject" > > Without this line, the Form functions. Is there something wrong with my > code? > > > I digged into fluid and found in > > fluid/Class/ViewHelpers/Form/RadioViewHelper.php line 98: > $propertyValue = $this->getPropertyValue(); > > $this->getPropertyValue() is defined in > fluid/Class/ViewHelpers/Form/AbstractFormFieldViewHelper.php line 149 > > line 150 is the Problem: > $formObject = > $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', > 'formObject'); > > Sorry, if I ask at the wrong place or ask a faq. > > greetings, > Axel M?ller > Same with checkboxes in "new"... From info at sk-typo3.de Mon Nov 30 09:51:12 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 30 Nov 2009 09:51:12 +0100 Subject: [TYPO3-mvc] vlog_example floods the error_log Message-ID: <mailman.1.1259571129.10525.typo3-project-typo3v4mvc@lists.typo3.org> Hi, using blog_example floods error_log because of autoloader, you'll find tons of messages like this: Core: Unable to autoload class "string" Core: Unable to autoload class "Tx_BlogExample_Domain_Model_Blog" Core: Unable to autoload class "Tx_BlogExample_Domain_Repository_AdministratorRepository" Core: Unable to autoload class "Tx_Extbase_Security_Cryptography_HashService" a.s.o. This happens direct after one click to BE module or one call in FE. vg Steffen From dennis.ahrens at googlemail.com Mon Nov 30 13:00:38 2009 From: dennis.ahrens at googlemail.com (dennis ahrens) Date: Mon, 30 Nov 2009 13:00:38 +0100 Subject: [TYPO3-mvc] UnitTests for Controller In-Reply-To: <mailman.1.1259549668.20032.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1020.1259157204.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259218409.5327.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1419.1259230926.615.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259549668.20032.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.3037.1259582499.615.typo3-project-typo3v4mvc@lists.typo3.org> Hi, thanks a lot - getting a Mock with real implemented methods is something i'd like to use in several cases. very great advice :) regards Dennis 2009/11/30 Jochen Rau <jochen.rau at typoplanet.de>: > Hi Dennis, > > dennis ahrens wrote: >> >> in my case the controller is just calling some methods on a parser >> which build up a object and adds it to the repository. >> Looks like this: >> >> public function importAction($xmlFile) { >> >> ?$this->parser->loadXMLFile($xmlFile,'documenttemplate.xsd'); >> ? ? ? ? ? ? ? ?if($this->parser->validate()) { >> ? ? ? ? ? ? ? ? ? ? ? ?$documentTemplate = >> $this->parser->convertIntoObject(); >> >> ?$this->documentTemplateRepository->add($documentTemplate); >> ? ? ? ? ? ? ? ?} >> ? ? ? ?} >> >> do you think it's best practice to write tests for all service methods >> and don't write tests for the controller at all? > > It's ok to write tests for the controller, although it contains very little > logic. Here is an example of a test for an indexAction: > > public function indexAction() { > ? ? ? ?$this->view->assign('organizations', > ? ? ? ? ? ? ? ?$this->organizationRepository->findAll()); > } > > > class Tx_SjrOffers_Controller_OrganizationControllerTest extends > Tx_Extbase_BaseTestCase { > > ? ? ? ?/** > ? ? ? ? * @test > ? ? ? ? */ > ? ? ? ?public function indexActionWorks() { > ? ? ? ? ? ? ? ?$mockOrganizationRepository = > $this->getMock('Tx_SjrOffers_Domain_Repository_OrganizationRepository', > array('findAll'), array(), '', FALSE); > > $mockOrganizationRepository->expects($this->once())->method('findAll')->will($this->returnValue(array('organization1', > 'organization2'))); > > ? ? ? ? ? ? ? ?$mockView = $this->getMock('Tx_Fluid_Core_View_TemplateView', > array('assign'), array(), '', FALSE); > > $mockView->expects($this->once())->method('assign')->with('organizations', > array('organization1', 'organization2')); > > ? ? ? ? ? ? ? ?$mockController = > $this->getMock($this->buildAccessibleProxy('Tx_SjrOffers_Controller_OrganizationController'), > array('dummy'), array(), '', FALSE); > ? ? ? ? ? ? ? ?$mockController->_set('organizationRepository', > $mockOrganizationRepository); > ? ? ? ? ? ? ? ?$mockController->_set('view', $mockView); > ? ? ? ? ? ? ? ?$mockController->indexAction(); > ? ? ? ?} > > } > > Because of the numerous dependencies of the controller, you have to make > usage of mocks. The most important line here is > > $mockController=$this->getMock($this->buildAccessibleProxy > ?('Tx_SjrOffers_Controller_OrganizationController'), array('dummy'), > ?array(), '', FALSE); > > The argument array('dummy') ensures that every method will be implemented > and not mocked. That's a little bit confusing, but otherwise the indexAction > will be replaced by a mock method and won't do anything. The argument FALSE > ensures that the constructor will not be invoked. > > Regards > Jochen > > -- > Every nit picked is a bug fixed > > _______________________________________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc at lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc > From admin at v1le.de Mon Nov 30 13:10:57 2009 From: admin at v1le.de (Alex Bailey) Date: Mon, 30 Nov 2009 13:10:57 +0100 Subject: [TYPO3-mvc] berechnungen in fluid template Message-ID: <mailman.1.1259583112.28132.typo3-project-typo3v4mvc@lists.typo3.org> Guten tag :), Ich bin seit l?ngerem dran mit der neuen Extbase eine Extension zu programmieren und stehe jetzt vor folgendem Problem: Ich h?tte gerne die M?glichkeit in meinem Fluid template innerhalb eines Link arguments berechnungen vorzunehmen falls das umsetzbar ist. Mein Link ist folgenderma?en aufgebaut: <f:link.action action="index" controller="Customer" arguments="{page : page}"> Im idealfall soll die variable page um +1 erh?ht werden wenn ich diesen speziellen Link aktiviere. Gibt es irgendeine M?glichkeit das im template festzulegen? Mfg Alex From info at rs-websystems.de Mon Nov 30 13:15:33 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Mon, 30 Nov 2009 13:15:33 +0100 Subject: [TYPO3-mvc] berechnungen in fluid template In-Reply-To: <mailman.1.1259583112.28132.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259583112.28132.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259583392.29686.typo3-project-typo3v4mvc@lists.typo3.org> Alex Bailey schrieb: > Guten tag :), > > Ich bin seit l?ngerem dran mit der neuen Extbase eine Extension zu > programmieren und stehe jetzt vor folgendem Problem: > > Ich h?tte gerne die M?glichkeit in meinem Fluid template innerhalb eines > Link arguments berechnungen vorzunehmen falls das umsetzbar ist. > Mein Link ist folgenderma?en aufgebaut: > > <f:link.action action="index" controller="Customer" arguments="{page : > page}"> > > Im idealfall soll die variable page um +1 erh?ht werden wenn ich diesen > speziellen Link aktiviere. Gibt es irgendeine M?glichkeit das im > template festzulegen? > > Mfg > > Alex Kleinen Math ViewHelper bauen :) From admin at v1le.de Mon Nov 30 13:17:55 2009 From: admin at v1le.de (Alex Bailey) Date: Mon, 30 Nov 2009 13:17:55 +0100 Subject: [TYPO3-mvc] berechnungen in fluid template In-Reply-To: <mailman.1.1259583392.29686.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259583112.28132.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259583392.29686.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259583531.28938.typo3-project-typo3v4mvc@lists.typo3.org> Steffen Ritter schrieb: > Alex Bailey schrieb: >> Guten tag :), >> >> Ich bin seit l?ngerem dran mit der neuen Extbase eine Extension zu >> programmieren und stehe jetzt vor folgendem Problem: >> >> Ich h?tte gerne die M?glichkeit in meinem Fluid template innerhalb >> eines Link arguments berechnungen vorzunehmen falls das umsetzbar ist. >> Mein Link ist folgenderma?en aufgebaut: >> >> <f:link.action action="index" controller="Customer" arguments="{page : >> page}"> >> >> Im idealfall soll die variable page um +1 erh?ht werden wenn ich >> diesen speziellen Link aktiviere. Gibt es irgendeine M?glichkeit das >> im template festzulegen? >> >> Mfg >> >> Alex > Kleinen Math ViewHelper bauen :) Werds damit probieren vielen dank :) From info at sk-typo3.de Mon Nov 30 13:45:54 2009 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 30 Nov 2009 13:45:54 +0100 Subject: [TYPO3-mvc] berechnungen in fluid template In-Reply-To: <mailman.1.1259583531.28938.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259583112.28132.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259583392.29686.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259583531.28938.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259585211.30892.typo3-project-typo3v4mvc@lists.typo3.org> Alex Bailey schrieb: > > Werds damit probieren vielen dank :) and next time in english please vg Steffen From info at rs-websystems.de Mon Nov 30 13:53:42 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Mon, 30 Nov 2009 13:53:42 +0100 Subject: [TYPO3-mvc] berechnungen in fluid template In-Reply-To: <mailman.1.1259585211.30892.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259583112.28132.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259583392.29686.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259583531.28938.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259585211.30892.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259585681.29686.typo3-project-typo3v4mvc@lists.typo3.org> Steffen Kamper schrieb: > Alex Bailey schrieb: >> >> Werds damit probieren vielen dank :) > > and next time in english please > > vg Steffen ups, sry, as I sometimes do not recognize answering in english, this time I did not get it the other way around :) Steffen 2nd From jochen.rau at typoplanet.de Mon Nov 30 15:42:30 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Mon, 30 Nov 2009 15:42:30 +0100 Subject: [TYPO3-mvc] Thank You! Message-ID: <mailman.1.1259592209.9165.typo3-project-typo3v4mvc@lists.typo3.org> Hi all. TYPO3 4.3 is out. And so is Extbase and Fluid. I remember the time back in October 2008 where the core developers met in Berlin. There was a great spirit of community. Then, in late December 2008 we kick-started Extbase. The first line was committed at the end of January. In April we decided to backport also Fluid. And here we are now. First of all I want to say thank you to the FLOW3/TYPO3 5.0 development team for their inspiring and clean code. It's better than every book about development on the market. Extbase and Fluid is a direct outcome of your development. A lot of people were involved the last few months by contributing code, ideas, knowledge, coffee, spare time, bug reports, and complicated questions. Thank you all. Ok. Some things are missing. There are for sure some issues to be solved. But we can start developing extensions and packages for TYPO3 way faster and cleaner now! Have fun and keep up the good work. Jochen -- Inspire people to share! From info at rs-websystems.de Mon Nov 30 16:57:41 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Mon, 30 Nov 2009 16:57:41 +0100 Subject: [TYPO3-mvc] @validate in Domain Object Message-ID: <mailman.1.1259596720.29686.typo3-project-typo3v4mvc@lists.typo3.org> Hey, whats the right syntax for using validators with the @ validate annotation in the DomainObject. As example i would like to check the following Alphanumeric and StringLength(5-10) regards Steffen From jochen.rau at typoplanet.de Mon Nov 30 17:15:00 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Mon, 30 Nov 2009 17:15:00 +0100 Subject: [TYPO3-mvc] @validate in Domain Object In-Reply-To: <mailman.1.1259596720.29686.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259596720.29686.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259597758.17486.typo3-project-typo3v4mvc@lists.typo3.org> Hi. Steffen Ritter wrote: > Hey, > whats the right syntax for using validators with the @ validate > annotation in the DomainObject. > As example i would like to check the following > > Alphanumeric and StringLength(5-10) * @validate Alphanumeric, StringLength(minimum=5, maximum=10) Regards Jochen -- Every nit picked is a bug fixed From info at rs-websystems.de Mon Nov 30 17:19:50 2009 From: info at rs-websystems.de (Steffen Ritter) Date: Mon, 30 Nov 2009 17:19:50 +0100 Subject: [TYPO3-mvc] @validate in Domain Object In-Reply-To: <mailman.1.1259597758.17486.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259596720.29686.typo3-project-typo3v4mvc@lists.typo3.org> <mailman.1.1259597758.17486.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259598050.29686.typo3-project-typo3v4mvc@lists.typo3.org> Jochen Rau schrieb: > Hi. > > Steffen Ritter wrote: >> Hey, >> whats the right syntax for using validators with the @ validate >> annotation in the DomainObject. >> As example i would like to check the following >> >> Alphanumeric and StringLength(5-10) > > * @validate Alphanumeric, StringLength(minimum=5, maximum=10) > > Regards > Jochen > > thanks Steffen From typo3 at kj187.de Mon Nov 30 22:27:17 2009 From: typo3 at kj187.de (Julian Kleinhans) Date: Mon, 30 Nov 2009 22:27:17 +0100 Subject: [TYPO3-mvc] Cache Problem: No automatic cache clearing Message-ID: <mailman.1.1259616495.7977.typo3-project-typo3v4mvc@lists.typo3.org> Hi list, i build a new package for my tutorials I have a Category Controller, Model and Repository and a Tutorial Controller, Model and Repository. The same like the blog_example Blog and Post files. To give you an overview what actions i use, here is a copy of my configuration Tx_Extbase_Utility_Extension::configurePlugin( $_EXTKEY, 'Pi1', array( 'Category' => 'index,new,create,edit,update,delete,deleteAll', 'Tutorial' => 'index,show,new,create,delete,edit,update', ), array( 'Category' => 'new,edit', 'Tutorial' => 'new,create,edit', ) ); The problem is, whatever i do, i must clear the cache manually in backend. The action new, edit, create, update, delete, deleteAll... no automatic cache clean works... create, update, delete, deleteAll are actions in background, with no frontend output, thats the reason i dont add this in the second array part. enableAutomaticCacheClearing is enabled.. I cant find any difference between my package and the blog_example, and the blog_example works perfect! Its a bug, a missing configuration ? i dont know.. I hope someone can help me ;-) cheers julian -- Julian Kleinhans Certified TYPO3 Integrator email: typo3 at kj187.de web: http://www.typo3-tutorials.org Xing: http://www.xing.com/profile/Julian_Kleinhans Twitter: http://twitter.com/kj187 From jochen.rau at typoplanet.de Mon Nov 30 23:09:57 2009 From: jochen.rau at typoplanet.de (Jochen Rau) Date: Mon, 30 Nov 2009 23:09:57 +0100 Subject: [TYPO3-mvc] Cache Problem: No automatic cache clearing In-Reply-To: <mailman.1.1259616495.7977.typo3-project-typo3v4mvc@lists.typo3.org> References: <mailman.1.1259616495.7977.typo3-project-typo3v4mvc@lists.typo3.org> Message-ID: <mailman.1.1259619180.11644.typo3-project-typo3v4mvc@lists.typo3.org> Hi Julian, did you configure clearCacheCmd ? Jochen Julian Kleinhans wrote: > i build a new package for my tutorials > I have a Category Controller, Model and Repository and a Tutorial > Controller, Model and Repository. The same like the blog_example Blog > and Post files. > > To give you an overview what actions i use, here is a copy of my > configuration > > Tx_Extbase_Utility_Extension::configurePlugin( > $_EXTKEY, 'Pi1', array( 'Category' => > 'index,new,create,edit,update,delete,deleteAll', 'Tutorial' => > 'index,show,new,create,delete,edit,update', > ), > array( 'Category' => 'new,edit', > 'Tutorial' => 'new,create,edit', > ) > ); > > > The problem is, whatever i do, i must clear the cache manually in > backend. The action new, edit, create, update, delete, deleteAll... no > automatic cache clean works... > > create, update, delete, deleteAll are actions in background, with no > frontend output, thats the reason i dont add this in the second array part. > > enableAutomaticCacheClearing is enabled.. > > I cant find any difference between my package and the blog_example, and > the blog_example works perfect! -- Every nit picked is a bug fixed From bogus@does.not.exist.com Mon Nov 23 20:10:05 2009 From: bogus@does.not.exist.com () Date: Mon, 23 Nov 2009 19:10:05 -0000 Subject: No subject Message-ID: <mailman.9.1261659603.607.typo3-project-typo3v4mvc@lists.typo3.org> recipe stays the same, even if some properties change (like if a rating or review is added). Additionally your recipes _need_ some kind of external identity (even if this is just the UID in the database), as you need to link to them I guess :) Furthermore, you are _not_ allowed to change a ValueObject after its creation. This is +1 for _entity_. Additionally, only _entities_ are findable by Repositories, as only Entities have an Aggregate Root. > 2. Can Value Objects without real identities get ratings, reviews, > etc... on the website? If someone rates a recipe for "Chocolate Cakee" > "4 stars" and then I fix the name, I have created a new Recipe. Would > the rating be transferred? See above ;-) > 3. What is the best practice for modeling Unit? Units are standard > things that shouldn't change. I'd like the User Interface for choosing > a measure to limit it to a defined list. I see two options: > > A. Create a Unit Model, Repository, etc.. Build CRUD forms for Units. > Make one of the views return all Units in a format that creates a select > box. Then when creating the form for creating new Recipes, it would > call the "all units" view to build the form. My problems with this one: > It seems way complex just to build a drop down that lists "cups, > tablespoons, teaspoons, ounces, etc.." If there isn't any semantics associated with these units for now, you could f.e. just use a simple list of named integer constants. For me, the _Measure_ is a Value Object. This has a quantity and a unit. As the unit is a fixed list, I'd use a fixed list here as well. > B. Yet to be implemented Single table inheritance. Ala > "static_info_tables" Only problem with this one is that it's not > implemented yet. :) I'm not sure how you want to apply this to your use case, but maybe I'm overlooking something ;-) Jochen already has some prototypical code working for that, so I'd expect this to come to trunk in the coming months :) > 4. Where should non-Recipe domain fields go? Currently our recipe > editor can assign each recipe to a handful of websites using a "Web > Instance" multi-select that is build based on a query of our sys_domains > table. A real recipe doesn't have any concept of different websites. Is the website an information of the recipe, or is it rather a meta-data which f.e. decides on which website the recipe will be shown? If it's for the former case, I'd include the website into your recipe, because the websites of the recipe are a concept of _your_ domain I'd say... Or if you want to separate this somehow, then move the "website" property to a subclass of "recipe" (f.e. OnlineRecipe or the like) - and make the "Website" a part of your domain model. Hope this helps! Merry Christmas :-) Greets, Sebastian