From daniel at lienert.cc Wed May 1 08:50:45 2013 From: daniel at lienert.cc (Daniel Lienert) Date: Wed, 01 May 2013 08:50:45 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Extbase_6=2E1_FlashMessageContainer_replac?= =?utf-8?q?ement?= Message-ID: Hey, i just saw the flashMessageContainer is deprecated in 6.1 and will be removed in ~6.3, but i haven't found a hint for a replacement. Would someone of you give me a hint? Thanks, Daniel -- TYPO3 related: http://daniel.lienert.cc | http://yag-gallery.de From typo3 at thomasnu.ch Wed May 1 10:30:09 2013 From: typo3 at thomasnu.ch (Thomas Nussbaumer) Date: Wed, 01 May 2013 10:30:09 +0200 Subject: [TYPO3-mvc] Extbase 6.1 FlashMessageContainer replacement In-Reply-To: References: Message-ID: http://typo3.org/fileadmin/t3org/images/FM-news/2013/releases/TYPO3-v6-1-whats-new.pdf Am 01.05.2013 08:50, schrieb Daniel Lienert: > Hey, > > i just saw the flashMessageContainer is deprecated in 6.1 and will be > removed in ~6.3, but i haven't found a hint for a replacement. > Would someone of you give me a hint? > > Thanks, Daniel From webdesign at webtekk.ch Wed May 1 18:56:23 2013 From: webdesign at webtekk.ch (Heinz Schilling) Date: Wed, 01 May 2013 18:56:23 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_HowTo_output_usergroup_from_fe=5Fuser?= Message-ID: Hi I tried several tips from the internet but nothing works. I extend fe_user in my Extbase 6.0 / Fluid 6.0 Extension and want to output usergroup. File: Vendor/Myextension/Classes/Domain/Model/User.php class User extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUser { } File: Vendor/Myextension/Classes/Domain/Repository/UserRepository.php class UserRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { } File: Vendor/Myextension/Classes/Controller/UserController.php class UserController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { /** * userRepository * * @var \Vendor\Myextension\Domain\Repository\UserRepository * @inject */ protected $userRepository; /** * action list * * @return void */ public function listAction() { $users = $this->userRepository->findAll(); $this->view->assign('users', $users); } } File: Vendor/Myextension/Configuration/TypoScript/setup.txt plugin.tx_myextension { persistence { classes { Vendor\Myextension\Domain\Model\User { mapping { tableName = fe_users recordType = Tx_Extbase_Domain_Model_FrontendUser } } } } } File: Vendor/Myextension/Resources/Private/Templates/User/list.html
{user.username} {user.password} {user.usergroup.title} {user.usergroup.description}
Result: Works: {user.username}, {user.password} No output: {user.usergroup.title}, {user.usergroup.description} What did I miss? I hope, someone can help. Greetings, Heinz From me at schreibersebastian.de Thu May 2 09:38:37 2013 From: me at schreibersebastian.de (Sebastian Schreiber) Date: Thu, 02 May 2013 09:38:37 +0200 Subject: [TYPO3-mvc] Linebreak in Fluid E-Mail Template Message-ID: Hi, how can i add a line break in a standalone fluid template view send via email? If i put \r\n in the .txt file i get plain output of \r\n. Do i have to wrap this in a special viewhelper? Any ideas? -- Sebastian Schreiber (Medieninformatiker B.Sc.) (TYPO3 Certified Integrator) Schanzenstra?e 27, Schlosserei 4 D-51063 K?ln T 0221 677 88 541 M 0176 431 05 790 Skype schreibersebastian.de me at schreibersebastian.de www.schreibersebastian.de Steuernummer: 217 / 5269 / 4675 From philippwrann at gmx.at Thu May 2 13:11:56 2013 From: philippwrann at gmx.at (Philipp) Date: Thu, 02 May 2013 13:11:56 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Cloning_an_objectStorage?= Message-ID: Hey When cloning an objectStorage the object instances are not cloned also, how would you realize a deep clone at that point? I have a transient Model holding an ObjectStorage which holds Transient Models which - again - holds an ObjectStorage. That is a pretty complex and dynamic search form with multiple filters. So one solution would be to NOT use objects here and render everything into simple properties, eg use an array instead of ObjectStorage. An other solution would be a deep clone. I dont really know of such a technique... unsearialize(serialize()) is not possible with an ObjectStorage as i understood. Suggestions? From philipp.thiele at whitemouse.de Thu May 2 13:43:52 2013 From: philipp.thiele at whitemouse.de (Philipp Thiele) Date: Thu, 2 May 2013 13:43:52 +0200 Subject: [TYPO3-mvc] Cloning an objectStorage In-Reply-To: References: Message-ID: Hi Philipp, maybe you want to try ext:tool from Claus Due ( http://typo3.org/extensions/repository/view/tool) and its Tx_Tool_Service_CloneService Good luck :o) Philipp 2013/5/2 Philipp > Hey > > When cloning an objectStorage the object instances are not cloned also, > how would you realize a deep clone at that point? > I have a transient Model holding an ObjectStorage which holds Transient > Models which - again - holds an ObjectStorage. That is a pretty complex and > dynamic search form with multiple filters. > > So one solution would be to NOT use objects here and render everything > into simple properties, eg use an array instead of ObjectStorage. An other > solution would be a deep clone. I dont really know of such a technique... > unsearialize(serialize()) is not possible with an ObjectStorage as i > understood. > > Suggestions? > ______________________________**_________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc@**lists.typo3.org > http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-** > project-typo3v4mvc > > From philippwrann at gmx.at Thu May 2 14:22:56 2013 From: philippwrann at gmx.at (Philipp) Date: Thu, 02 May 2013 14:22:56 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_Cloning_an_objectStorage?= References: Message-ID: Thanks. In the meantime i wrote my own ObjectStorage Cloner, not that functional but for my case it works. From g4-lisz at tonarchiv.ch Thu May 2 16:05:36 2013 From: g4-lisz at tonarchiv.ch (g4-lisz at tonarchiv.ch) Date: Thu, 02 May 2013 16:05:36 +0200 Subject: [TYPO3-mvc] Ralation between User Session and Language Setting when using RealURL Message-ID: Hello It seems to me that user sessions are stored per language setting? For example: I use $GLOBALS["TSFE"]->fe_user->setKey("ses", "demand", serialize($demand)); to store input data for a search form when displaying the results. When the user decides to change the language setting, the results page reloads with the translated URL (same PID, but different speaking URL): URL=page-daccueil/recherche/resultats-de-votre-recherche/ gets URL= startseite/suche/suchergebnisse If this happens, the search demand gets lost, or the search demand is restored from an older session in the according language. Is there a way to tell T3 (realURL?) to use the same session, independent of the language setting? I.e. if the user switches the language, he will get the same results (German session = French session)? Cheers, Till From jan.kornblum at gmx.de Thu May 2 17:27:00 2013 From: jan.kornblum at gmx.de (Jan Kornblum) Date: Thu, 02 May 2013 17:27:00 +0200 Subject: [TYPO3-mvc] Extensionbuilder relation question References: Message-ID: Hi all, i think i've found the solution to get a n:1 relation work from the opposite side: > 1. Adding the missing "int(11) not null default 0" field to > "tx_domain_model_category" > > 2. Adding $this->products, SetProducts(), GetProducts(), AddProduct(), > RemoveProduct() methods in the CategoryModel.php > > 3. Adding a field (config->type = passthrough) to the "Category"-TCA "config->type" must be "inline" or "select". > I've recognized that when the additional TCA field > "products" inside the TCA of "Category" is changed to "inline" instead of > "passthrough", and Product-records are created inside the category-record > using the IRRE form, they can be accessed by $category->getProducts() > correctly. But when i just create a "Product" record and choose a "Category" > by the selectbox, this Product cannot be accessed by > $category->getProducts()... Both "foreign_table" AND "foreign_field" must be set inside the config-section of the "Category" model TCA. Regards, Jan From typo3 at thomasnu.ch Thu May 2 18:42:46 2013 From: typo3 at thomasnu.ch (Thomas Nussbaumer) Date: Thu, 02 May 2013 18:42:46 +0200 Subject: [TYPO3-mvc] HowTo output usergroup from fe_user In-Reply-To: References: Message-ID: > Result: Works: {user.username}, {user.password} > No output: {user.usergroup.title}, {user.usergroup.description} Hi, see http://api.typo3.org/extbase/60/ public getUsergroup() Returns the usergroups. Keep in mind that the property is called "usergroup" although it can hold several usergroups. You need something like: ...{group.title} ...{group.description} Greetings, Thomas Am 01.05.2013 18:56, schrieb Heinz Schilling: > Hi > > I tried several tips from the internet but nothing works. I extend > fe_user in my Extbase 6.0 / Fluid 6.0 Extension and want to output > usergroup. > > File: Vendor/Myextension/Classes/Domain/Model/User.php > class User extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUser { > }> Result: Works: {user.username}, {user.password} > No output: {user.usergroup.title}, {user.usergroup.description} > > File: Vendor/Myextension/Classes/Domain/Repository/UserRepository.php > class UserRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { > } > > File: Vendor/Myextension/Classes/Controller/UserController.php > class UserController extends > \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { > /** > * userRepository > * > * @var \Vendor\Myextension\Domain\Repository\UserRepository > * @inject > */ > protected $userRepository; > > /** > * action list > * > * @return void > */ > public function listAction() { > $users = $this->userRepository->findAll(); > $this->view->assign('users', $users); > } > } > > > File: Vendor/Myextension/Configuration/TypoScript/setup.txt > plugin.tx_myextension { > persistence { > classes { > Vendor\Myextension\Domain\Model\User { > mapping { > tableName = fe_users > recordType = Tx_Extbase_Domain_Model_FrontendUser > } > } > } > } > } > > File: Vendor/Myextension/Resources/Private/Templates/User/list.html > > > > > > > > > >
{user.username}{user.password}{user.usergroup.title}{user.usergroup.description}
> > Result: Works: {user.username}, {user.password} > No output: {user.usergroup.title}, {user.usergroup.description} > > What did I miss? I hope, someone can help. > > Greetings, Heinz From g4-lisz at tonarchiv.ch Thu May 2 20:20:36 2013 From: g4-lisz at tonarchiv.ch (g4-lisz at tonarchiv.ch) Date: Thu, 02 May 2013 20:20:36 +0200 Subject: [TYPO3-mvc] Ralation between User Session and Language Setting when using RealURL In-Reply-To: References: Message-ID: On 05/02/2013 04:05 PM, g4-lisz at tonarchiv.ch wrote: > Hello > > It seems to me that user sessions are stored per language setting? > > For example: I use > $GLOBALS["TSFE"]->fe_user->setKey("ses", "demand", > serialize($demand)); > to store input data for a search form when displaying the results. > > When the user decides to change the language setting, the results page > reloads with the translated URL (same PID, but different speaking URL): > URL=page-daccueil/recherche/resultats-de-votre-recherche/ gets > URL= startseite/suche/suchergebnisse > If this happens, the search demand gets lost, or the search demand is > restored from an older session in the according language. > > Is there a way to tell T3 (realURL?) to use the same session, > independent of the language setting? > I.e. if the user switches the language, he will get the same results > (German session = French session)? > I found the actual issue: We're using different domain names for each language. Then, of course, the browser saves different cookies... So the question is: How can we share a user session between two different domains (single tree multi language / domain setup)? Till From philippwrann at gmx.at Fri May 3 11:09:26 2013 From: philippwrann at gmx.at (Philipp) Date: Fri, 03 May 2013 11:09:26 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_desperation_with_f=3Aform=2Echeckbox?= Message-ID: Hi I really thought i finally managed to work with fluid. Having to write a viewhelper for each and every babyshit requirement seems okay to me.... But what really makes me freak out is the f:form.checkbox viewhelper No matter how i want to use it, everytime it throws me some other error. This time a assign an array to the view set it as object for my form-viewhelper. Just like: Okay, then i need this checkbox and place it like In my controller i assign the filtergroups-property as array to search. For each filtergroup i have set in my plugin i additionally assign one array to the filtergroups array, makes my search-property looks like: search [array] - filtergroups [array] -- 0 [array] -- 1 [array] -- 2 [array] so search.filtergroups.2 is definitly an array, if i do a f:debug i get array (empty) But anyway...... the checkbox viewhelper tells me: Checkbox viewhelpers can only be bound to properties of type boolean or array. Property "filtergroups.2" is of type "NULL" I really have to say: I dont have time for those fluid problems anymore. Can someone tell me why this happens at that point? # i mean, a template engine is supposed to make templating easier... i really appreciate the work you put into the typo3 project but why didnt you just use Twig or something really approved? Fluid is completely underpowered and also pretty slow. From philippwrann at gmx.at Fri May 3 11:31:51 2013 From: philippwrann at gmx.at (Philipp) Date: Fri, 03 May 2013 11:31:51 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_desperation_with_f=3Aform=2Echeckbox?= References: Message-ID: Okay i found the problem.... and yes - in my opinnion - it is a bug: If a form object is a array, the ViewHelper tries to get the property this way $formObject[$propertyName] and not using return \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyPath($formObject, $propertyName); So, whats the solution? Can i use an Object of Type \StdClass Here, would the ObjectAccess Utility then understand the path? I dont really think so, because there is no Reflection of StdClass. So do i have to create a model for this? Thats not what i want to do because this is a basic routine, that should be extended by other controllers, i cant handle one model and therefore wanted to use a simple array. There has to be made an addition in the ViewHelper AbstractFormFieldViewHelper On line 183 a string containing "." should be exploded something like this does the job: /** * Get the current property of the object bound to this form. * * @return mixed Value */ protected function getPropertyValue() { $formObject = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject'); $propertyName = $this->arguments['property']; if (is_array($formObject)) { if (strpos($propertyName,'.')!==FALSE) { $parts = explode('.',$propertyName); $return = $formObject; while (sizeof($parts)>0) { $return = $return[array_shift($parts)]; if ($return===NULL) return NULL; } return $return; } return isset($formObject: NULL; } return \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyPath($formObject, $propertyName); } From webdesign at webtekk.ch Fri May 3 18:48:34 2013 From: webdesign at webtekk.ch (Heinz Schilling) Date: Fri, 03 May 2013 18:48:34 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_HowTo_output_usergroup_from_fe=5Fuse?= =?utf-8?q?r?= References: Message-ID: Quote: Thomas Nussbaumer wrote on Thu, 02 May 2013 18:42 ---------------------------------------------------- > Hi, see http://api.typo3.org/extbase/60/ > > public getUsergroup() > > Returns the usergroups. Keep in mind that the property is called > "usergroup" although it can hold several usergroups. > > You need something like: > ....{group.title} ...{group.description} Hi Thomas Thank you. After some trial an error I think I understood. I have to change the fluid template like this: File: Vendor/Myextension/Resources/Private/Templates/User/list.html
{user.username} {user.password} {usergroup.title}
Now it works. Greetings, Heinz From einarsvan at gmail.com Sun May 5 15:48:55 2013 From: einarsvan at gmail.com (Einar Gislason) Date: Sun, 05 May 2013 15:48:55 +0200 Subject: [TYPO3-mvc] Fluid format.date and AJAX with eID References: Message-ID: Nobody? On Tue, 30 Apr 2013 15:00:31 +0200, Einar Gislason wrote: > Hi > > I'm having trouble getting Fluid to format dates correctly when fetching > data via AJAX. > Everything works fine when I load the template normally but when I get > the data dynamically the {day.date} will return the date formatted in english > and not in danish. > > I'm using eID and my Dispatcher looks like this: > require_once(t3lib_extMgm::extPath('realurl').'class.tx_realurl.php'); > $GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe', > $GLOBALS['TYPO3_CONF_VARS'], 0, 0); > tslib_eidtools::connectDB(); > tslib_eidtools::initLanguage(); > $GLOBALS['TSFE']->initFEuser(); > $GLOBALS['TSFE']->set_no_cache(); > $GLOBALS['TSFE']->checkAlternativeIdMethods(); > $GLOBALS['TSFE']->determineId(); > $GLOBALS['TSFE']->initTemplate(); > $GLOBALS['TSFE']->getConfigArray(); > $GLOBALS['TSFE']->includeTCA(); > $GLOBALS['TSFE']->config['config']['tx_realurl_enable'] = 1; > $GLOBALS['TSFE']->cObj = t3lib_div::makeInstance('tslib_cObj'); > $GLOBALS['TSFE']->settingLanguage(); > > TSpagegen::pagegenInit(); > > $configuration = array( > 'extensionName' => 'FtfEvents', > 'pluginName' => t3lib_div::_GP('pluginName'), > 'vendorName' => 'FTF', > 'switchableControllerActions' => array( > 'Event' => array('calendar') > ) > ); > > $bootstrap = t3lib_div::makeInstance('Tx_Extbase_Core_Bootstrap'); > $bootstrap->cObj = $GLOBALS['TSFE']->cObj; > > echo $bootstrap->run('', $configuration); > > $GLOBALS['TSFE']->fe_user->storeSessionData(); > ?> > > Any help, tips or pointers would be greatly appreciated. > > I'm using TYPO3 4.5.25, Extbase 1.3.4 and Fluid 1.3.1 > > Kind regards, Einar > -- Using Opera's mail client: http://www.opera.com/mail/ From karsten at k20.dk Mon May 6 07:55:11 2013 From: karsten at k20.dk (Karsten Madsen) Date: Mon, 6 May 2013 07:55:11 +0200 Subject: [TYPO3-mvc] Fluid format.date and AJAX with eID In-Reply-To: References: Message-ID: I Think it is the global language setting config.language = da or dk depends on TYPO3 version Mvh. Karsten Madsen Den 05/05/2013 15.48 skrev "Einar Gislason" : > Nobody? > > On Tue, 30 Apr 2013 15:00:31 +0200, Einar Gislason > wrote: > > Hi >> >> I'm having trouble getting Fluid to format dates correctly when fetching >> data via AJAX. >> Everything works fine when I load the template normally but when I get >> the data dynamically the {day.date} will return the date formatted in english >> and not in danish. >> >> I'm using eID and my Dispatcher looks like this: >> > require_once(t3lib_extMgm::**extPath('realurl').'class.tx_** >> realurl.php'); >> $GLOBALS['TSFE'] = t3lib_div::makeInstance('**tslib_fe', >> $GLOBALS['TYPO3_CONF_VARS'], 0, 0); >> tslib_eidtools::connectDB(); >> tslib_eidtools::initLanguage()**; >> $GLOBALS['TSFE']->initFEuser()**; >> $GLOBALS['TSFE']->set_no_**cache(); >> $GLOBALS['TSFE']->**checkAlternativeIdMethods(); >> $GLOBALS['TSFE']->determineId(**); >> $GLOBALS['TSFE']->**initTemplate(); >> $GLOBALS['TSFE']->**getConfigArray(); >> $GLOBALS['TSFE']->includeTCA()**; >> $GLOBALS['TSFE']->config['**config']['tx_realurl_enable'] = 1; >> $GLOBALS['TSFE']->cObj = t3lib_div::makeInstance('**tslib_cObj'); >> $GLOBALS['TSFE']->**settingLanguage(); >> >> TSpagegen::pagegenInit(); >> >> $configuration = array( >> 'extensionName' => 'FtfEvents', >> 'pluginName' => t3lib_div::_GP('pluginName'), >> 'vendorName' => 'FTF', >> 'switchableControllerActions' => array( >> 'Event' => array('calendar') >> ) >> ); >> >> $bootstrap = t3lib_div::makeInstance('Tx_**Extbase_Core_Bootstrap'); >> $bootstrap->cObj = $GLOBALS['TSFE']->cObj; >> >> echo $bootstrap->run('', $configuration); >> >> $GLOBALS['TSFE']->fe_user->**storeSessionData(); >> ?> >> >> Any help, tips or pointers would be greatly appreciated. >> >> I'm using TYPO3 4.5.25, Extbase 1.3.4 and Fluid 1.3.1 >> >> Kind regards, Einar >> >> > > -- > Using Opera's mail client: http://www.opera.com/mail/ > ______________________________**_________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc@**lists.typo3.org > http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-** > project-typo3v4mvc > From karsten at k20.dk Mon May 6 07:56:48 2013 From: karsten at k20.dk (Karsten Madsen) Date: Mon, 6 May 2013 07:56:48 +0200 Subject: [TYPO3-mvc] Fluid format.date and AJAX with eID In-Reply-To: References: Message-ID: And the locale setting, must be the same as installed on the server. Mvh. Karsten Madsen Den 05/05/2013 15.48 skrev "Einar Gislason" : > Nobody? > > On Tue, 30 Apr 2013 15:00:31 +0200, Einar Gislason > wrote: > > Hi >> >> I'm having trouble getting Fluid to format dates correctly when fetching >> data via AJAX. >> Everything works fine when I load the template normally but when I get >> the data dynamically the {day.date} will return the date formatted in english >> and not in danish. >> >> I'm using eID and my Dispatcher looks like this: >> > require_once(t3lib_extMgm::**extPath('realurl').'class.tx_** >> realurl.php'); >> $GLOBALS['TSFE'] = t3lib_div::makeInstance('**tslib_fe', >> $GLOBALS['TYPO3_CONF_VARS'], 0, 0); >> tslib_eidtools::connectDB(); >> tslib_eidtools::initLanguage()**; >> $GLOBALS['TSFE']->initFEuser()**; >> $GLOBALS['TSFE']->set_no_**cache(); >> $GLOBALS['TSFE']->**checkAlternativeIdMethods(); >> $GLOBALS['TSFE']->determineId(**); >> $GLOBALS['TSFE']->**initTemplate(); >> $GLOBALS['TSFE']->**getConfigArray(); >> $GLOBALS['TSFE']->includeTCA()**; >> $GLOBALS['TSFE']->config['**config']['tx_realurl_enable'] = 1; >> $GLOBALS['TSFE']->cObj = t3lib_div::makeInstance('**tslib_cObj'); >> $GLOBALS['TSFE']->**settingLanguage(); >> >> TSpagegen::pagegenInit(); >> >> $configuration = array( >> 'extensionName' => 'FtfEvents', >> 'pluginName' => t3lib_div::_GP('pluginName'), >> 'vendorName' => 'FTF', >> 'switchableControllerActions' => array( >> 'Event' => array('calendar') >> ) >> ); >> >> $bootstrap = t3lib_div::makeInstance('Tx_**Extbase_Core_Bootstrap'); >> $bootstrap->cObj = $GLOBALS['TSFE']->cObj; >> >> echo $bootstrap->run('', $configuration); >> >> $GLOBALS['TSFE']->fe_user->**storeSessionData(); >> ?> >> >> Any help, tips or pointers would be greatly appreciated. >> >> I'm using TYPO3 4.5.25, Extbase 1.3.4 and Fluid 1.3.1 >> >> Kind regards, Einar >> >> > > -- > Using Opera's mail client: http://www.opera.com/mail/ > ______________________________**_________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc@**lists.typo3.org > http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-** > project-typo3v4mvc > From philippwrann at gmx.at Mon May 6 12:15:03 2013 From: philippwrann at gmx.at (Philipp) Date: Mon, 06 May 2013 12:15:03 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_Fluid_format=2Edate_and_AJAX_with_eI?= =?utf-8?q?D?= References: Message-ID: f:form.at.date uses the PHP DateTime Object, it is not translated, and maybe will never be. You have to use strftime for locale date outputs. From josiah.moen at gmail.com Tue May 7 01:37:39 2013 From: josiah.moen at gmail.com (Sy Moen) Date: Tue, 07 May 2013 01:37:39 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_Re=3A_Re=3A_FLUID_cannot_find_my_wid?= =?utf-8?q?get?= References: Message-ID: Yes, adding the "VendorName." to the configuration was the missing piece. I had no idea... thanks! From josiah.moen at gmail.com Tue May 7 01:58:43 2013 From: josiah.moen at gmail.com (Sy Moen) Date: Tue, 07 May 2013 01:58:43 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_Extension_Builder_lost_contact_to_my?= =?utf-8?q?_extension?= References: Message-ID: I too am interested in the answer to this question... I would like to load the https://github.com/castiron/cicregister extension to get a quick overview in the modeler, however the extension_builder (v2.5.2 in typo3 v6.1) does not seem to recognize it as being 'native'. Ideas? From ch at typoconsult.dk Tue May 7 12:43:42 2013 From: ch at typoconsult.dk (Claus Harup) Date: Tue, 7 May 2013 12:43:42 +0200 Subject: [TYPO3-mvc] Extbase, mapOnProperty pi_flexform settings Message-ID: Hi all I have configured my extension through flexforms and everything works in my datastructure (pi_flexform in database) 1 LLL:EXT:tc_shop/Resources/Private/Language/locallang_db.xlf:tx_tcshop_domain_model_shop.view array reload select LLL:EXT:tc_shop/Resources/Private/Language/locallang_db.xlf:tx_tcshop_domain_model_shop.showproducts Shop->list;Shop->single LLL:EXT:tc_shop/Resources/Private/Language/locallang_db.xlf:tx_tcshop_domain_model_shop.showminibasket Shop->minibasket 0 1 1 FIELD:switchableControllerActions:=:Shop->list;Shop->single group db tx_tcshop_domain_model_product tx_tcshop_domain_model_product 0 10 30 9999 0 tx_tcshop_content_txtcshopproduct_product_mm suggest 1 FIELD:switchableControllerActions:=:Shop->list;Shop->single select user tx_tccategories_treeview->displayCategoryTree 1 txchtreeviewexample 999 10 20 width:250px 1 1 0 100 misc_tx_tccategories_categories_mm tt_content tx_tc_shop_categories pages pid top ..... but how do I map the fields (products & categories) to my objects through: plugin.tx_tcshop{ persistence{ classes{ TYPOCONSULT\TcShop\Domain\Model\Shop{ mapping{ tableName = tt_content recordType = columns{ *?????????????*.mapOnProperty = categories *?????????????*.mapOnProperty = products } } } } } } -- Claus Harup Teknisk ansvarlig, partner TypoConsult A/S Rathsacksvej 1 1862 Frederiksberg C Danmark Tel: -45 70207036 Direkte: -45 88276075 Web: www.typoconsult.dk Mail: ch at typoconsult.dk From typo3 at t3node.com Tue May 7 18:43:24 2013 From: typo3 at t3node.com (=?UTF-8?B?U3RlZmZlbiBNw7xsbGVy?=) Date: Tue, 07 May 2013 18:43:24 +0200 Subject: [TYPO3-mvc] Extension Builder lost contact to my extension In-Reply-To: References: Message-ID: Hi. There's a low-traffic Mailinglist [TYPO3-extbase-kickstarter] which deals with particular questions and support for the Extension Builder. -- cheers, Steffen TYPO3 Blog: http://www.t3node.com/ Twitter: @t3node - http://twitter.com/t3node From typo3 at t3node.com Tue May 7 18:46:57 2013 From: typo3 at t3node.com (=?UTF-8?B?U3RlZmZlbiBNw7xsbGVy?=) Date: Tue, 07 May 2013 18:46:57 +0200 Subject: [TYPO3-mvc] Ralation between User Session and Language Setting when using RealURL In-Reply-To: References: Message-ID: Hi. On 02.05.2013 20:20 g4-lisz at tonarchiv.ch wrote: > > So the question is: How can we share a user session between two > different domains (single tree multi language / domain setup)? > you can configure this in $GLOBALS['TYPO3_CONF_VARS']['SYS']['cookieDomain'] e.g. via install tool. From gianluca.strafella at webformat.com Wed May 8 09:03:06 2013 From: gianluca.strafella at webformat.com (Gianluca Strafella) Date: Wed, 08 May 2013 09:03:06 +0200 Subject: [TYPO3-mvc] Extbase, mapOnProperty pi_flexform settings In-Reply-To: References: Message-ID: Hi, if you have followed the Extbase "Convention over Configuration", the framework configures all correctly. Otherwise you have to map tt_content columns in TypoScript configuration. You can see http://docs.typo3.org/typo3cms/ExtbaseFluidBook/b-ExtbaseReference/Index.html for details. Regards, Gianluca Il 07/05/2013 12:43, Claus Harup ha scritto: > Hi all > > I have configured my extension through flexforms and everything works in my > datastructure (pi_flexform in database) > > > > 1 > > > > > > LLL:EXT:tc_shop/Resources/Private/Language/locallang_db.xlf:tx_tcshop_domain_model_shop.view > > array > > > > reload > > select > > > index="0">LLL:EXT:tc_shop/Resources/Private/Language/locallang_db.xlf:tx_tcshop_domain_model_shop.showproducts > Shop->list;Shop->single > > > index="0">LLL:EXT:tc_shop/Resources/Private/Language/locallang_db.xlf:tx_tcshop_domain_model_shop.showminibasket > Shop->minibasket > > > 0 > 1 > 1 > > > > > > > FIELD:switchableControllerActions:=:Shop->list;Shop->single > > group > db > tx_tcshop_domain_model_product > tx_tcshop_domain_model_product > 0 > 10 > 30 > 9999 > 0 > tx_tcshop_content_txtcshopproduct_product_mm > > > suggest > > 1 > > > > > > > > > > FIELD:switchableControllerActions:=:Shop->list;Shop->single > > select > user > tx_tccategories_treeview->displayCategoryTree > 1 > txchtreeviewexample > 999 > 10 > 20 > width:250px > 1 > 1 > 0 > 100 > misc_tx_tccategories_categories_mm > > tt_content > tx_tc_shop_categories > > pages > pid > top > > > > > > > > > > ..... but how do I map the fields (products & categories) to my objects > through: > > plugin.tx_tcshop{ > persistence{ > classes{ > TYPOCONSULT\TcShop\Domain\Model\Shop{ > mapping{ > tableName = tt_content > recordType = > columns{ > *?????????????*.mapOnProperty = categories > *?????????????*.mapOnProperty = products > } > } > } > } > } > } > > -- Gianluca Strafella Software Developer gianluca.strafella at webformat.com Tel. +39-0427-926.389 WEBFORMAT srl ? www.webformat.com Via S. Francesco d'Assisi, 6 ? 20122 MILANO Corte Europa, 12 - 33097 SPILIMBERGO (PN) From ch at typoconsult.dk Wed May 8 12:41:13 2013 From: ch at typoconsult.dk (Claus Harup) Date: Wed, 8 May 2013 12:41:13 +0200 Subject: [TYPO3-mvc] Extbase, mapOnProperty pi_flexform settings In-Reply-To: References: Message-ID: Hi Gianluca The link has nothing on flexforms in the documentation?? Perhabs you can point to an example where flexforms is used in mapOnProperty like: plugin.tx_tcshop{ persistence{ classes{ TYPOCONSULT\TcShop\Domain\Model\Shop{ mapping{ tableName = tt_content recordType = columns{ *?????????????*.mapOnProperty = categories *?????????????*.mapOnProperty = products } } } } } } 2013/5/8 Gianluca Strafella > Hi, > if you have followed the Extbase "Convention over Configuration", the > framework configures all correctly. Otherwise you have to map tt_content > columns in TypoScript configuration. You can see http://docs.typo3.org/** > typo3cms/ExtbaseFluidBook/b-**ExtbaseReference/Index.htmlfor details. > > Regards, > Gianluca > > Il 07/05/2013 12:43, Claus Harup ha scritto: > > Hi all >> >> I have configured my extension through flexforms and everything works in >> my >> datastructure (pi_flexform in database) >> >> >> >> 1 >> >> >> >> >> >> LLL:EXT:tc_shop/**Resources/Private/Language/** >> locallang_db.xlf:tx_tcshop_**domain_model_shop.view >> >> array >> >> >> >> reload >> >> select >> >> >> > index="0">LLL:EXT:tc_shop/**Resources/Private/Language/** >> locallang_db.xlf:tx_tcshop_**domain_model_shop.**showproducts >> Shop->list;Shop->**single >> >> >> > index="0">LLL:EXT:tc_shop/**Resources/Private/Language/** >> locallang_db.xlf:tx_tcshop_**domain_model_shop.** >> showminibasket >> Shop->minibasket >> >> >> 0 >> 1 >> 1 >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> ..... but how do I map the fields (products & categories) to my objects >> through: >> >> plugin.tx_tcshop{ >> persistence{ >> classes{ >> TYPOCONSULT\TcShop\Domain\**Model\Shop{ >> mapping{ >> tableName = tt_content >> recordType = >> columns{ >> *?????????????*.mapOnProperty = categories >> *?????????????*.mapOnProperty = products >> } >> } >> } >> } >> } >> } >> >> >> > -- > Gianluca Strafella > > Software Developer > gianluca.strafella at webformat.**com > Tel. +39-0427-926.389 > > WEBFORMAT srl ? www.webformat.com > Via S. Francesco d'Assisi, 6 ? 20122 MILANO > Corte Europa, 12 - 33097 SPILIMBERGO (PN) > > > ______________________________**_________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc@**lists.typo3.org > http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-** > project-typo3v4mvc > -- Claus Harup Teknisk ansvarlig, partner TypoConsult A/S Rathsacksvej 1 1862 Frederiksberg C Danmark Tel: -45 70207036 Direkte: -45 88276075 Web: www.typoconsult.dk Mail: ch at typoconsult.dk From gianluca.strafella at webformat.com Fri May 10 09:16:48 2013 From: gianluca.strafella at webformat.com (Gianluca Strafella) Date: Fri, 10 May 2013 09:16:48 +0200 Subject: [TYPO3-mvc] Extbase, mapOnProperty pi_flexform settings In-Reply-To: References: Message-ID: Hi, I have not yet encountered your case, but in the paragraph "TypoScript Configuration" there is a reference to section "Using external data sources" and "map class hierarchies", that may be useful. Regards, Gianluca Il 08/05/2013 12:41, Claus Harup ha scritto: > Hi Gianluca > > The link has nothing on flexforms in the documentation?? > > Perhabs you can point to an example where flexforms is used in > mapOnProperty like: > > plugin.tx_tcshop{ > persistence{ > classes{ > TYPOCONSULT\TcShop\Domain\Model\Shop{ > mapping{ > tableName = tt_content > recordType = > columns{ > *?????????????*.mapOnProperty = categories > *?????????????*.mapOnProperty = products > } > } > } > } > } > } > > > 2013/5/8 Gianluca Strafella > >> Hi, >> if you have followed the Extbase "Convention over Configuration", the >> framework configures all correctly. Otherwise you have to map tt_content >> columns in TypoScript configuration. You can see http://docs.typo3.org/** >> typo3cms/ExtbaseFluidBook/b-**ExtbaseReference/Index.htmlfor details. >> >> Regards, >> Gianluca >> >> Il 07/05/2013 12:43, Claus Harup ha scritto: >> >> Hi all >>> >>> I have configured my extension through flexforms and everything works in >>> my >>> datastructure (pi_flexform in database) >>> >>> >>> >>> 1 >>> >>> >>> >>> >>> >>> LLL:EXT:tc_shop/**Resources/Private/Language/** >>> locallang_db.xlf:tx_tcshop_**domain_model_shop.view >>> >>> array >>> >>> >>> >>> reload >>> >>> select >>> >>> >>> >> index="0">LLL:EXT:tc_shop/**Resources/Private/Language/** >>> locallang_db.xlf:tx_tcshop_**domain_model_shop.**showproducts >>> Shop->list;Shop->**single >>> >>> >>> >> index="0">LLL:EXT:tc_shop/**Resources/Private/Language/** >>> locallang_db.xlf:tx_tcshop_**domain_model_shop.** >>> showminibasket >>> Shop->minibasket >>> >>> >>> 0 >>> 1 >>> 1 >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> ..... but how do I map the fields (products & categories) to my objects >>> through: >>> >>> plugin.tx_tcshop{ >>> persistence{ >>> classes{ >>> TYPOCONSULT\TcShop\Domain\**Model\Shop{ >>> mapping{ >>> tableName = tt_content >>> recordType = >>> columns{ >>> *?????????????*.mapOnProperty = categories >>> *?????????????*.mapOnProperty = products >>> } >>> } >>> } >>> } >>> } >>> } >>> >>> >>> >> -- >> Gianluca Strafella >> >> Software Developer >> gianluca.strafella at webformat.**com >> Tel. +39-0427-926.389 >> >> WEBFORMAT srl ? www.webformat.com >> Via S. Francesco d'Assisi, 6 ? 20122 MILANO >> Corte Europa, 12 - 33097 SPILIMBERGO (PN) >> >> >> ______________________________**_________________ >> TYPO3-project-typo3v4mvc mailing list >> TYPO3-project-typo3v4mvc@**lists.typo3.org >> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-** >> project-typo3v4mvc >> > > > -- Gianluca Strafella Software Developer gianluca.strafella at webformat.com Tel. +39-0427-926.389 WEBFORMAT srl ? www.webformat.com Via S. Francesco d'Assisi, 6 ? 20122 MILANO Corte Europa, 12 - 33097 SPILIMBERGO (PN) From ernst at cron-it.de Fri May 10 20:30:26 2013 From: ernst at cron-it.de (Ernesto Baschny [cron IT]) Date: Fri, 10 May 2013 20:30:26 +0200 Subject: [TYPO3-mvc] Ralation between User Session and Language Setting when using RealURL In-Reply-To: References: Message-ID: Steffen M?ller schrieb am 07.05.2013 18:46: > Hi. > > On 02.05.2013 20:20 g4-lisz at tonarchiv.ch wrote: >> >> So the question is: How can we share a user session between two >> different domains (single tree multi language / domain setup)? >> > > you can configure this in $GLOBALS['TYPO3_CONF_VARS']['SYS']['cookieDomain'] > > e.g. via install tool. > > From the configuration description: > > // Restricts the domain name for FE and BE session cookies. When setting > the value to ".domain.com" (replace domain.com with your domain!), login > sessions will be shared across subdomains. Alternatively, if you have > more than one domain with sub-domains, you can set the value to a > regular expression to match against the domain of the HTTP request. The > result of the match is used as the domain for the cookie. eg. > /\.(example1|example2)\.com$/ or /\.(example1\.com)|(example2\.net)$/. > Separate domains for FE and BE can be set using href="#FE-cookieDomain">$TYPO3_CONF_VARS['FE']['cookieDomain'] and > $TYPO3_CONF_VARS['BE']['cookieDomain'] > respectively. Please note that sharing a cookie between different top-level-domains is not possible at all. When switching languages I assume you are also switching top level domains (i.e. from the .de to the .fr TLD). You will have to manipulate the language switching links to add some information in order to transfer the session from one domain to the other. I am not aware of any extension that does that, but it seems possible to do and might be an useful asset to the TYPO3 Community if you manage to get it done (or sponsor someone to do it), as this problem pops up from time to time. :) Regards, Ernesto From typo3 at ndh-websolutions.de Sat May 11 01:07:20 2013 From: typo3 at ndh-websolutions.de (Nicolas de Haen) Date: Sat, 11 May 2013 01:07:20 +0200 Subject: [TYPO3-mvc] Extension Builder lost contact to my extension In-Reply-To: References: Message-ID: Hi Soren, since TYPO3 v. 6.0 the ExtensionBuilder creates namespaced classes and there is no compatibility mode implemented. It is possible to migrate the extension if you follow these steps: 1. rename all classes to namespaced classes (you have to add a Vendor name also). Don't forget to rename also parameter, typehints etc. 2. change the TYPO3 version in the existing ExtensionBuilder.json to 2.5 or the current version of the extension builder (search for "extension_builder_version" 3. Load the extension in the extension builder and add the Vendor Name you used in the namespace 4. Use a versioning system like git to detect the differences and fix issues... If you renamed the classes correct, the methods etc. should be preserved in rondtrip mode regards, Nico -- Nico de Haen ndh websolutions Webprogrammierung, OpenSource, Typo3 http://www.ndh-websolutions.de From g4-lisz at tonarchiv.ch Sat May 11 14:22:24 2013 From: g4-lisz at tonarchiv.ch (g4-lisz at tonarchiv.ch) Date: Sat, 11 May 2013 14:22:24 +0200 Subject: [TYPO3-mvc] Ralation between User Session and Language Setting when using RealURL In-Reply-To: References: Message-ID: On 05/10/2013 08:30 PM, Ernesto Baschny [cron IT] wrote: > Steffen M?ller schrieb am 07.05.2013 18:46: >> Hi. >> >> On 02.05.2013 20:20 g4-lisz at tonarchiv.ch wrote: >>> So the question is: How can we share a user session between two >>> different domains (single tree multi language / domain setup)? >>> >> you can configure this in $GLOBALS['TYPO3_CONF_VARS']['SYS']['cookieDomain'] >> >> e.g. via install tool. >> >> From the configuration description: >> >> // Restricts the domain name for FE and BE session cookies. When setting >> the value to ".domain.com" (replace domain.com with your domain!), login >> sessions will be shared across subdomains. Alternatively, if you have >> more than one domain with sub-domains, you can set the value to a >> regular expression to match against the domain of the HTTP request. The >> result of the match is used as the domain for the cookie. eg. >> /\.(example1|example2)\.com$/ or /\.(example1\.com)|(example2\.net)$/. >> Separate domains for FE and BE can be set using > href="#FE-cookieDomain">$TYPO3_CONF_VARS['FE']['cookieDomain'] and >> $TYPO3_CONF_VARS['BE']['cookieDomain'] >> respectively. > Please note that sharing a cookie between different top-level-domains is > not possible at all. When switching languages I assume you are also > switching top level domains (i.e. from the .de to the .fr TLD). You will > have to manipulate the language switching links to add some information > in order to transfer the session from one domain to the other. > > I am not aware of any extension that does that, but it seems possible to > do and might be an useful asset to the TYPO3 Community if you manage to > get it done (or sponsor someone to do it), as this problem pops up from > time to time. :) > > Regards, > Ernesto Thank you all for you answers! Still didn't find a handy solution. There was the idea of including one iFrame per each other domain to store cookies for all domains at the same time with the same session parameters. (See here http://stackoverflow.com/questions/16345398/) - I didn't check this approach yet. Regards, Till From onlinebiswajit at gmail.com Sat May 11 14:52:24 2013 From: onlinebiswajit at gmail.com (Biswajit) Date: Sat, 11 May 2013 14:52:24 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_rte_field_in_flexform_of_extbase__ext?= Message-ID: Hi, I am quite new in extbase programming , i am trying to add description field into rte field in flexfrom but still for no no luck.. From militarutomita at gmail.com Sat May 11 15:27:12 2013 From: militarutomita at gmail.com (Tomita Militaru) Date: Sat, 11 May 2013 16:27:12 +0300 Subject: [TYPO3-mvc] initializeAction with getArguments triggers fatal error Message-ID: Hello, I have the following code in initializeAction: http://pastebin.com/PNg8wEmM But I get the following error: Fatal error: Call to a member function getArgumentNames() on a non-object I read that the arguments are ready in initializeAction: http://docs.typo3.org/typo3cms/ExtbaseFluidBook/b-ExtbaseReference/Index.html#id23 Can someone help me, what am I doing wrong? Thanks. From h.henning at ovan.de Mon May 13 13:25:17 2013 From: h.henning at ovan.de (Hans Henning) Date: Mon, 13 May 2013 13:25:17 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_ExtBase_and_RealURL_Links?= Message-ID: Hey, I'm new to this forum (and fairly new to Typo3). At the moment I am trying learn more about extension programming, especcially how to integrate nice RealURL Links. Using the Extension Builder, I have build a little online shop extension. You can add products into a backend folder and one of the content pages contains a frontend plugin that lists, shows, etc. the products. Using some fixedPostVars in the realurl_conf.php I have managed to get Links such as {URL of content page}/list.html or {URL of content page}/show/{id of product}.html What I have not managed so far are URLs like: {URL of content page}/show/{product name}.html Can anyone help me there? Is that a config thing or do I have to rewrite the showAction function in my products controller so that it can fetch from a name instead of an ID? Have a nice day, and thank you very much in advance, Hans From frenck at innologi.nl Mon May 13 19:14:21 2013 From: frenck at innologi.nl (Frenck Lutke) Date: Mon, 13 May 2013 19:14:21 +0200 Subject: [TYPO3-mvc] ExtBase and RealURL Links In-Reply-To: References: Message-ID: Hi Hans, On 13-5-2013 13:25, Hans Henning wrote: > Hey, > > I'm new to this forum (and fairly new to Typo3). At the moment I am > trying learn more about extension programming, especcially how to > integrate nice RealURL Links. > > Using the Extension Builder, I have build a little online shop > extension. You can add products into a backend folder and one of the > content pages contains a frontend plugin that lists, shows, etc. the > products. > > Using some fixedPostVars in the realurl_conf.php I have managed to get > Links such as {URL of content page}/list.html or > {URL of content page}/show/{id of product}.html > > What I have not managed so far are URLs like: > {URL of content page}/show/{product name}.html > > Can anyone help me there? Is that a config thing or do I have to rewrite > the showAction function in my products controller so that it can fetch > from a name instead of an ID? > > > Have a nice day, and thank you very much in advance, > Hans It's all in the RealURL conf. Look in the RealURL manual for the 'lookUpTable' array-key for use in the postVarSets, which explains all you need to know to resolve an id to whatever record value for that specific part of the RealURL produced link. HTH, Frenck From adrien.crivelli at gmail.com Tue May 14 03:49:00 2013 From: adrien.crivelli at gmail.com (Adrien Crivelli) Date: Tue, 14 May 2013 10:49:00 +0900 Subject: [TYPO3-mvc] ExtBase and RealURL Links In-Reply-To: References: Message-ID: Hey, Didn't try it myself, but I would still recommend to try https://github.com/NamelessCoder/extbase_realurl NamelessCoder (Claus Due) is quite active for Extbase extension developement. Also have a look at all his work: http://fedext.net/overview.html Cheers, Adrien On 13 May 2013 20:25, Hans Henning wrote: > Hey, > > I'm new to this forum (and fairly new to Typo3). At the moment I am trying > learn more about extension programming, especcially how to integrate nice > RealURL Links. > > Using the Extension Builder, I have build a little online shop extension. > You can add products into a backend folder and one of the content pages > contains a frontend plugin that lists, shows, etc. the products. > > Using some fixedPostVars in the realurl_conf.php I have managed to get > Links such as {URL of content page}/list.html or > {URL of content page}/show/{id of product}.html > > What I have not managed so far are URLs like: > {URL of content page}/show/{product name}.html > > Can anyone help me there? Is that a config thing or do I have to rewrite > the showAction function in my products controller so that it can fetch from > a name instead of an ID? > > > Have a nice day, and thank you very much in advance, > Hans > ______________________________**_________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc@**lists.typo3.org > http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-** > project-typo3v4mvc > From gianluca.strafella at webformat.com Wed May 15 09:12:54 2013 From: gianluca.strafella at webformat.com (Gianluca Strafella) Date: Wed, 15 May 2013 09:12:54 +0200 Subject: [TYPO3-mvc] initializeAction with getArguments triggers fatal error In-Reply-To: References: Message-ID: Hi, are you sure your error is in initializeAction ? Are you doing an Tx_Extbase_MVC_RequestInterface custom implementation ? In standard framework class extbase/Classes/MVC/Request.php the method getArguments returns simply "arguments" value ... If you need check the argument XXX existence you can check argument in action with $this->request->hasArgument('XXX'). Regards, Gianluca Il 11/05/2013 15:27, Tomita Militaru ha scritto: > Hello, > > I have the following code in initializeAction: > http://pastebin.com/PNg8wEmM > > But I get the following error: > Fatal error: Call to a member function getArgumentNames() on a non-object > > I read that the arguments are ready in initializeAction: > http://docs.typo3.org/typo3cms/ExtbaseFluidBook/b-ExtbaseReference/Index.html#id23 > > > Can someone help me, what am I doing wrong? > > Thanks. > -- Gianluca Strafella Software Developer gianluca.strafella at webformat.com Tel. +39-0427-926.389 WEBFORMAT srl ? www.webformat.com Via S. Francesco d'Assisi, 6 ? 20122 MILANO Corte Europa, 12 - 33097 SPILIMBERGO (PN) From tomita.militaru at gmail.com Wed May 15 09:19:09 2013 From: tomita.militaru at gmail.com (=?UTF-8?B?VG9tacWjxIMgTUlMSVRBUlU=?=) Date: Wed, 15 May 2013 10:19:09 +0300 Subject: [TYPO3-mvc] initializeAction with getArguments triggers fatal error In-Reply-To: References: Message-ID: Hi Gianluca, The problem was that in my controller I had my own $arguments variable defined and it was interfering with $arguments from AbstractController I think, since simply renaming the variable solved the problem. On Wed, May 15, 2013 at 10:12 AM, Gianluca Strafella < gianluca.strafella at webformat.com> wrote: > Hi, > are you sure your error is in initializeAction ? Are you doing an > Tx_Extbase_MVC_**RequestInterface custom implementation ? In standard > framework class extbase/Classes/MVC/Request.**php the method getArguments > returns simply "arguments" value ... > > If you need check the argument XXX existence you can check argument in > action with $this->request->hasArgument('**XXX'). > > Regards, > Gianluca > > Il 11/05/2013 15:27, Tomita Militaru ha scritto: > > Hello, >> >> I have the following code in initializeAction: >> http://pastebin.com/PNg8wEmM >> >> But I get the following error: >> Fatal error: Call to a member function getArgumentNames() on a non-object >> >> I read that the arguments are ready in initializeAction: >> http://docs.typo3.org/**typo3cms/ExtbaseFluidBook/b-** >> ExtbaseReference/Index.html#**id23 >> >> >> Can someone help me, what am I doing wrong? >> >> Thanks. >> >> > -- > Gianluca Strafella > > Software Developer > gianluca.strafella at webformat.**com > Tel. +39-0427-926.389 > > WEBFORMAT srl ? www.webformat.com > Via S. Francesco d'Assisi, 6 ? 20122 MILANO > Corte Europa, 12 - 33097 SPILIMBERGO (PN) > > > ______________________________**_________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc@**lists.typo3.org > http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-** > project-typo3v4mvc > -- Engr. Tomi?? MILITARU Certified TYPO3 Integrator Tel. +40741064681 From abo at schmutt.de Wed May 15 12:29:03 2013 From: abo at schmutt.de (Andrea Schmuttermair) Date: Wed, 15 May 2013 12:29:03 +0200 Subject: [TYPO3-mvc] ExtBase concept question about models and passing objects Message-ID: Hi there, I have a problem with designing ExtBase Models, and I think it is more a problem about understanding the concept. So this is the task: 1) action new -> input form, fills the model: contact 2) action create -> store to database in table contact if create is successfull: redirect to process 3) action process I have security sensitive data in contact from step 1). In Step 2, I store them to database. This is how it works right now, I redirect to process. I adding all needed data directly in an array: /** * action create * * @dontverifyrequesthash * @param Tx_MyExt_Domain_Model_Contact $newData * @validate $newData Tx_MyExt_Domain_Validator_ContactValidator * @return void */ public function createAction($newData) { $insert = $this->contactRepository->insertCrypted($newData); if ($insert) { $this->flashMessageContainer->add('Added contact to database successfully.','',t3lib_Flashmessage::OK); $this->redirect('process','Contact','myext',array( 'firstname' => $newData->getConsumerFirstname(), 'lastname' => $newData->getConsumerLastname(), 'contactId' => $newData->getContactId(), )); } else { $this->flashMessageContainer->add('Could not add contact to database','',t3lib_Flashmessage::ERROR); $this->redirect('new'); } } If it was pure PHP, I can imagine 2 better solutions: a) define a new Model "contactSanitized" that can be created from "contact" function getContactSantizied(){ $obj = new contactSanitized($this->firstname,$this->lastname,...); return $obj; } b) remove sensitive Data from Contact, and then pass newData object: function removeSensitive(){ $this->bankaccount=""; ... } I tried Nr. b) already, but got an Exception about persistence, even the suggested "persistAll" did not work. And I am not sure, if this function will really remove sensitive data from the object. About a) creating a 2nd Model: this will be a model without database table, its use is only for holding and passing data. Now if I place it within Classes/Domain/Model I have no idea what ExtBase Magic will do with that model? Will it try to find a a table? And how it will be passed in browser as it has no UID? As you can see, I am not deep enough in the Extbase Model and persistance concept to understand and find a good solution. Any hints would be great, even if it needs a redesign. TYPO3 Version: 4.5.25 ExtBase: 1.3.4 Best regards, Andrea From djgarms at gmail.com Wed May 15 20:07:02 2013 From: djgarms at gmail.com (Domi) Date: Thu, 16 May 2013 02:07:02 +0800 Subject: [TYPO3-mvc] after upgrade 6.0 to 6.1 error with domain model update "must be persisted already, but is new" Message-ID: Hello, I struggle with an extension updated vom TYPO3 6.0 to 6.1 In 6.0 it worked without problem: My form: (...) My save action: /** * intranetStep1SaveAction * * @param $client * * @return void */ public function intranetStep1SaveAction(\DMF\Intranet\Domain\Model\Client $client) { $this->clientRepository->update($client); $this->redirect('intranetStep2View'); } Now I receive following error: #1249479819: The object of type "DMF\Intranet\Domain\Model\Client" given to update must be persisted already, but is new. There must be a breaking change from 6.0 to 6.1, can somebody help me out? If I debug, my $client is a valid object of the Client model. This might relate to the fact, that I try to do partial validation? Thanks for help, Dominic From benbryant098 at yahoo.com Thu May 16 07:34:01 2013 From: benbryant098 at yahoo.com (talerKK) Date: Thu, 16 May 2013 07:34:01 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_How_can_I_create_watermark_in_my_ext?= =?utf-8?q?ension=3F?= References: Message-ID: I use the following codes to add watermark to images. http://www.rasteredge.com/how-to/csharp-imaging/create-watermark using System.IO; using System.Drawing.Printing; using RasterEdge.Imaging; using RasterEdge.Imaging.Processing; RasterEdgeImaging Image = new RasterEdgeImaging(); //Create an instance of Image and load an existing image using (Image image= Image.LoadImageFromFile(@"C:\1.bmp")); { Graphics graphics=new Graphics(image); RasterEdgeImaging.Font font = new RasterEdgeImaging.Font("Times New Roman", 16, FontStyle.Bold); RasterEdgeImaging.Brushes.SolidBrush brush=new RasterEdgeImaging.Brushes.SolidBrush(); brush.Color=Color.Black; brush.Opacity=100; image.CreateWatermark("watermark", font, brush, new PointF(image.Width/2, image.Height/2)); image.Save(@"C:\1-watermark.bmp"); } From militarutomita at gmail.com Thu May 16 15:43:35 2013 From: militarutomita at gmail.com (Tomita Militaru) Date: Thu, 16 May 2013 16:43:35 +0300 Subject: [TYPO3-mvc] tx_extbase_type ignored? Message-ID: Hello, I have the following setup: class A class B extends A When calling BRepository->findAll() I get all objects, even of type A. Does anyone experienced that problem? From aleichsenring at ab-softlab.de Thu May 16 16:06:34 2013 From: aleichsenring at ab-softlab.de (Anja Leichsenring) Date: Thu, 16 May 2013 16:06:34 +0200 Subject: [TYPO3-mvc] tx_extbase_type ignored? In-Reply-To: References: Message-ID: Have you configured your extension correctly? With this few informations I can only guess. Please provide TCA, TypoScript and system information / version numbers. Greetings Anja On 05/16/2013 03:43 PM, Tomita Militaru wrote: > Hello, > > I have the following setup: > class A > class B extends A > > When calling BRepository->findAll() I get all objects, even of type A. > > Does anyone experienced that problem? From militarutomita at gmail.com Thu May 16 16:18:45 2013 From: militarutomita at gmail.com (Tomita Militaru) Date: Thu, 16 May 2013 17:18:45 +0300 Subject: [TYPO3-mvc] tx_extbase_type ignored? In-Reply-To: References: Message-ID: Hi Anja, > Have you configured your extension correctly? With this few > informations I can only guess. It's mostly what the extension_builder generated, I thought it should work out of the box. > > Please provide TCA, TypoScript and system information / version numbers. TCA for Class A: http://pastebin.com/FSTVeKYW TCA for Class B: http://pastebin.com/9zKL2FD8 ExtBase 1.3.0 TYPO3 4.5.25 No special typoscript, only the one generated by EB. > > Greetings Anja Thanks From aleichsenring at ab-softlab.de Thu May 16 16:51:49 2013 From: aleichsenring at ab-softlab.de (Anja Leichsenring) Date: Thu, 16 May 2013 16:51:49 +0200 Subject: [TYPO3-mvc] tx_extbase_type ignored? In-Reply-To: References: Message-ID: Hi Tomita, how should this work out of the box? Extension Builder can not know you want to use Single Table Inheritence. Here is what you need, have a look into Extbase Implementation of Fe_Users and Fe_UserGroups for more details: TypoScript (see extbase/ext_typoscript_setup.txt): config.my_ext.persistence { classes { { mapping { tableName = tx_myext_domain_model_space recordType = } } } } TCA (see extbase/ext_tables.php): missing tablefield (probably in sql too) t3lib_div::loadTCA('fe_users'); if (!isset($TCA['fe_users']['ctrl']['type'])) { $tempColumns = array( 'tx_extbase_type' => array( 'exclude' => 1, 'label' => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type', 'config' => array( 'type' => 'select', 'items' => array( array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type.0', '0'), array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type.Tx_Extbase_Domain_Model_FrontendUser', 'Tx_Extbase_Domain_Model_FrontendUser') ), 'size' => 1, 'maxitems' => 1, 'default' => '0' ) ) ); t3lib_extMgm::addTCAcolumns('fe_users', $tempColumns, 1); t3lib_extMgm::addToAllTCAtypes('fe_users', 'tx_extbase_type'); $TCA['fe_users']['ctrl']['type'] = 'tx_extbase_type'; } $TCA['fe_users']['types']['Tx_Extbase_Domain_Model_FrontendUser'] = $TCA['fe_users']['types']['0']; While creating your records you need to set the extbase type to make that work. I link an extension using the fe_users table in this way, perhaps it helps you: http://forge.typo3.org/projects/extension-sf_register/repository Greetings Anja On 05/16/2013 04:18 PM, Tomita Militaru wrote: > Hi Anja, >> Have you configured your extension correctly? With this few >> informations I can only guess. > It's mostly what the extension_builder generated, I thought it should > work out of the box. >> >> Please provide TCA, TypoScript and system information / version numbers. > TCA for Class A: http://pastebin.com/FSTVeKYW > TCA for Class B: http://pastebin.com/9zKL2FD8 > > ExtBase 1.3.0 > TYPO3 4.5.25 > > No special typoscript, only the one generated by EB. >> >> Greetings Anja > Thanks From h.kromm at paints.de Thu May 16 18:13:07 2013 From: h.kromm at paints.de (Heiko Kromm | Paints) Date: Thu, 16 May 2013 18:13:07 +0200 (CEST) Subject: [TYPO3-mvc] Determin type of fileCollection In-Reply-To: <1011156.461.1368719131982.JavaMail.Heiko@PA15> Message-ID: Hi List, I'm trying to use fileCollections within extbase/fluid. Is there a way to determin in fluid, which type of fileCollection I have. At the moment there are two possible types of fileCollections TYPO3\CMS\Core\Resource\Collection\StaticFileCollection and TYPO3\CMS\Core\Resource\Collection\FolderBasedFileCollection. In the StaticFileCollection, the files are TYPO3\CMS\Core\Resource\FileReference objects, in FolderBasedFileCollection the files are TYPO3\CMS\Core\Resource\File objects. If I loop through the collection-Items like this:
it will only work for FolderBasedFileCollections,not for StaticFileCollections because the files there are FileReferences. Is ther any way to determin the object type of the fileCollection or the type of file? Regards Heiko From djgarms at gmail.com Thu May 16 20:15:11 2013 From: djgarms at gmail.com (Domi) Date: Fri, 17 May 2013 02:15:11 +0800 Subject: [TYPO3-mvc] after upgrade 6.0 to 6.1 error with domain model update "must be persisted already, but is new" In-Reply-To: References: Message-ID: Hello, Philipp mentioned it could rely on the new property mapper, which comes by default. As I never understood how this works in the CRUD pattern has anyone some examples how to use the new property mapping in real world? I am still using the old mapper, but hopefully I can solve this issue. Thanks Dominic From b.vandertogt at profinit.com Thu May 16 21:14:53 2013 From: b.vandertogt at profinit.com (Bas van der Togt) Date: Thu, 16 May 2013 21:14:53 +0200 Subject: [TYPO3-mvc] query contains exception Message-ID: Hello, I have a problem with the contains method but don't know what i'm doing wrong. When executing this query from my respository: $query = $this->createQuery(); $query->getQuerySettings()->setRespectStoragePage(false); $query->matching($query->contains('services', $service)); return $query->execute(); I get this exception: "Unsupported or non-existing property name "services" used in relation matching." My TCA ... 'services' => array( 'exclude' => 0, 'label' => 'LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services', 'config' => array( 'type' => 'select', 'items' => array( array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.1', '1'), array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.2', '2'), array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.3', '3'), array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.4', '4'), ), 'size' => 4, 'minitems' => 1, 'maxitems' => 4, ) ), ... My model class Testimonial extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity { /** * services * * @var \string * @validate NotEmpty */ protected $services; /** * name * * @var \string * @validate NotEmpty */ protected $name; /** * Returns the services * * @return \string $services */ public function getServices() { return $this->services; } /** * Sets the services * * @param \string $services * @return void */ public function setServices($services) { $this->services = $services; } ... Can anybody tell me what i'm doing wrong? Kind regards, Bas From djgarms at gmail.com Thu May 16 23:53:43 2013 From: djgarms at gmail.com (Domi) Date: Fri, 17 May 2013 05:53:43 +0800 Subject: [TYPO3-mvc] query contains exception In-Reply-To: References: Message-ID: Hi Bas, contains is for object storage. If you want to check \string then you should use: $query->matching($query->equals('services', $service)); Hope this helps, Dominic From b.vandertogt at profinit.com Fri May 17 10:13:45 2013 From: b.vandertogt at profinit.com (Bas van der Togt) Date: Fri, 17 May 2013 10:13:45 +0200 Subject: [TYPO3-mvc] query contains exception In-Reply-To: References: Message-ID: Tnx for your reply Dominic. But what if services is a comma seperated string and i need a FIND_IN_SET() ? Op 16-05-13 23:53, Domi schreef: > Hi Bas, > > contains is for object storage. If you want to check \string then you > should use: > > $query->matching($query->equals('services', $service)); > > Hope this helps, > > Dominic From militarutomita at gmail.com Fri May 17 10:15:42 2013 From: militarutomita at gmail.com (Tomita Militaru) Date: Fri, 17 May 2013 11:15:42 +0300 Subject: [TYPO3-mvc] tx_extbase_type ignored? In-Reply-To: References: Message-ID: Hi Anja, > > how should this work out of the box? Extension Builder can not know > you want to use Single Table Inheritence. Here is what you need, have > a look into Extbase Implementation of Fe_Users and Fe_UserGroups for > more details: > > TypoScript (see extbase/ext_typoscript_setup.txt): > config.my_ext.persistence { > classes { > { > mapping { > tableName = tx_myext_domain_model_space > recordType = > } > } > } > } I have this typoscript already. > > TCA (see extbase/ext_tables.php): > missing tablefield (probably in sql too) > t3lib_div::loadTCA('fe_users'); > if (!isset($TCA['fe_users']['ctrl']['type'])) { > $tempColumns = array( > 'tx_extbase_type' => array( > 'exclude' => 1, > 'label' => > 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type', > > 'config' => array( > 'type' => 'select', > 'items' => array( > > array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type.0', > '0'), > > array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type.Tx_Extbase_Domain_Model_FrontendUser', > 'Tx_Extbase_Domain_Model_FrontendUser') > ), > 'size' => 1, > 'maxitems' => 1, > 'default' => '0' > ) > ) > ); > t3lib_extMgm::addTCAcolumns('fe_users', $tempColumns, 1); > t3lib_extMgm::addToAllTCAtypes('fe_users', 'tx_extbase_type'); > $TCA['fe_users']['ctrl']['type'] = 'tx_extbase_type'; > } > $TCA['fe_users']['types']['Tx_Extbase_Domain_Model_FrontendUser'] = > $TCA['fe_users']['types']['0']; I have this also in my ext_tables.php and the field tx_extbase_type is in the table. The records have the correct tx_extbase_type set, I've looked into it. The only problem is when I fetch the records, I get all records of all tx_extbase_type(s). Thanks. From djgarms at gmail.com Fri May 17 19:27:47 2013 From: djgarms at gmail.com (Domi) Date: Sat, 18 May 2013 01:27:47 +0800 Subject: [TYPO3-mvc] query contains exception In-Reply-To: References: Message-ID: Hi Bas, I never used comma separated string so you need to test by yourself if it works. Cheers, Dominic From joerg at schoppet.de Sat May 18 15:46:57 2013 From: joerg at schoppet.de (Joerg Schoppet) Date: Sat, 18 May 2013 15:46:57 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_How_to_dynamically_create_objects?= Message-ID: Hi, I hope someone can help me on this. I created models where an order has n positions. In the "new" view of my order I want to give the user the possibility to dynamically add positions. My "new" form looks like this (shortend)
This is working as it should. Now I added a little bit of javascript to dynamically add new positions like And changed my "createAction" annotation to "@dontvalidaterequesthash". But now, as soon as I add a second position and transmit I get the error: Exception while property mapping at property path "positions":It is not allowed to map property "2". You need to use $propertyMappingConfiguration->allowProperties('2') to enable mapping of this property. Help please!!! Joerg From helmut.hummel at typo3.org Sat May 18 17:52:59 2013 From: helmut.hummel at typo3.org (Helmut Hummel) Date: Sat, 18 May 2013 17:52:59 +0200 Subject: [TYPO3-mvc] tx_extbase_type ignored? In-Reply-To: References: Message-ID: Hi, On 16.05.13 16:18, Tomita Militaru wrote: > No special typoscript, only the one generated by EB. I also ran into this problem lately. The extension builder generates code that "dynamically" adds the type field to the TCA ctrl section, which causes poblems with Extbase in frontend context (the data map factory cannot find the type field definition). Be sure to set this in the place you have the ctr section defined: $TCA['tx_ext_table']['ctrl'] = array( ... 'type' => 'tx_extbase_type', ... ) HTH Kind regards, Helmut -- Helmut Hummel Release Manager TYPO3 6.0 TYPO3 Core Developer, TYPO3 Security Team Member TYPO3 .... inspiring people to share! Get involved: typo3.org From militarutomita at gmail.com Sat May 18 19:12:14 2013 From: militarutomita at gmail.com (Tomita Militaru) Date: Sat, 18 May 2013 20:12:14 +0300 Subject: [TYPO3-mvc] tx_extbase_type ignored? In-Reply-To: References: Message-ID: Hello Helmut, > Be sure to set this in the place you have the ctr section defined: > > $TCA['tx_ext_table']['ctrl'] = array( > ... > 'type' => 'tx_extbase_type', > ... > ) > Thanks a lot! That was the problem. Do you know if the latest version of extension builder has this fixed? I'm currently using version 2.4.7 due to TYPO3 4.5, maybe we should open a ticket? :) From typo3.RemoveForMessage at elements-net.de Sun May 19 18:15:46 2013 From: typo3.RemoveForMessage at elements-net.de (Franz Koch) Date: Sun, 19 May 2013 18:15:46 +0200 Subject: [TYPO3-mvc] Issues with "@cascade remove" and forms with nested objects Message-ID: Hey folks, long time no see. I think I found a bug, but need confirmation/thoughts Setup: Extbase 1.4 (unfortunately can't update), but this should also apply even to 6.x according to the code (unless I missed something in the rewritten propertyMapper) Situation: I just wrote a simple blog like extension for a customer with the possibility to upload pictures and assign a caption to them. The pictures are themselves a domain object holding a filename and a caption property and are connected to the post object as ObjectStorage. In the create and edit forms, the blogger can dynamically add more upload fields with caption and ofc edit/delete existing. Issue: This all is working fine and gets mapped and persisted correctly as long as I haven't set the "@cascade remove" annotation for the pictures property. As soon as I add the annotation, ALL already persisted pictures get deleted when I update the blog post even if nothing changed at all and the property is correctly filled. Possible bug/cause: After debugging this for some hours now I think I found the cause. When I update the modified post in the repository, the persistence backend is calling "getRemovedChildObjects" in it's "persistObjectStorage" method, and "getRemovedChildObjects" always returns ALL contained objects even when nothing got removed. All this method internally does is a simple check if the current objectStorage contains all objects that exist in the clean property by comparing their spl_object_hash and returns all that are not contained. And this is the issue, because all nested picture objects got cloned in the PropertyMapper as they where submitted via the edit form and thus have a different spl_object_hash. So either the "getRemovedChildObjects" has to compare the (U)UID in case of DomainObjects or the PropertyMapper must not clone any object which is no aggregate root and thus not monitored by the persistenceManager. I fixed the issue for now by doing some dirty remapping of the pictures using their uncloned originals in a overridden internal actionController method. -- kind regards, Franz Koch From scecere at krur.com Mon May 20 06:11:28 2013 From: scecere at krur.com (Stefano Cecere) Date: Mon, 20 May 2013 06:11:28 +0200 Subject: [TYPO3-mvc] How to dynamically create objects In-Reply-To: References: Message-ID: Hi Jearg i don't know the answer but: what TYPO3 version are you using, and with or without the "new" property mapper? -- -- --- ----- ------- Stefano Cecere KRUR studio - http://krur.com From scecere at krur.com Mon May 20 06:15:30 2013 From: scecere at krur.com (Stefano Cecere) Date: Mon, 20 May 2013 06:15:30 +0200 Subject: [TYPO3-mvc] Issues with "@cascade remove" and forms with nested objects In-Reply-To: References: Message-ID: On 19/05/13 18:15, Franz Koch wrote: > I fixed the issue for now by doing some dirty remapping of the pictures > using their uncloned originals in a overridden internal actionController > method. arg.. to me it sounds like a nuclear engineering procedure! :( -- -- --- ----- ------- Stefano Cecere KRUR studio - http://krur.com From joerg at schoppet.de Mon May 20 11:40:13 2013 From: joerg at schoppet.de (Joerg Schoppet) Date: Mon, 20 May 2013 11:40:13 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_How_to_dynamically_create_objects?= References: Message-ID: Hey, I'm using a clean TYPO3 CMS 6.1 installation. Regarding the TypoScript Object-Browser the value of "config.tx_extbase.features.rewrittenPropertyMapper =" is set to 1. After further investigation (don't know the solution, yet) I think the "problem" is coming from the hidden form-field __trustedProperties My current rough workaround is: - I create in the view 20 positions - The rendered view now has in "__trustedProperties" all fields of these 20 positions - With javascript I delete 19 of the 20 positions !!! - Now the user can "dynamicall" add up to 20 positions This is really rough and a lot of meaningless data is transfered from server to client to let this happen because in average only up to 10 positions are created, but there may be circumstances where the 20 positions are needed. I'm facing the same problem if a user wants to modify an existing order and wants to add additional positions: - I have to "pseudo" create the positions and then delete them to let the user the possibility to create additional ones I want to do it the right extbase/fluid way and would also offer to write a wiki-entry as "Best Practice", because this kind of question comes up a lot over time regarding the forum. Thanks Joerg From typo3 at ndh-websolutions.de Mon May 20 14:45:28 2013 From: typo3 at ndh-websolutions.de (Nicolas de Haen) Date: Mon, 20 May 2013 14:45:28 +0200 Subject: [TYPO3-mvc] How to dynamically create objects In-Reply-To: References: Message-ID: Hi Joerg, afaik there is only one (not quite comfortable) solution: You have to allow explicitely each of your dynamic created properties in the controller initializeAction (or initializeCreateAction): if($this->request->hasArgument('newOrder')) { $newOrder = $this->request->getArgument('newOrder'); $propertyMappingConfiguration = $this->arguments->getArgument('newOrder')->getPropertyMappingConfiguration(); if(!empty($newOrder['positions'])) { $propertyMappingConfiguration->forProperty('positions')->allowAllProperties(); $propertyMappingConfiguration->allowModificationForSubProperty('positions'); foreach($newOrder[$dynamicProperty] as $positionIndex => $positionPropertyArray) { $propertyPath = 'positions.' . $propertyIndex; $propertyMappingConfiguration->forProperty($propertyPath)->allowAllProperties(); $propertyMappingConfiguration->allowCreationForSubProperty($propertyPath); $propertyMappingConfiguration->allowModificationForSubProperty($propertyPath); } // end foreach } // end if(!empty) } // end if(request->hasArgument) Pretty much code for a task that should/could be done by the framework... ;-) And it's getting really funny if you have nested properties.. BTW: as I mentioned in an earlier post, there is no chance to edit the positions after creating them, without a patch in ObjectAccess, allowing to access objects inside properties of type ObjectStorage regards, Nico -- Nico de Haen ndh websolutions Webprogrammierung, OpenSource, Typo3 http://www.ndh-websolutions.de From typo3.RemoveForMessage at elements-net.de Mon May 20 15:10:00 2013 From: typo3.RemoveForMessage at elements-net.de (Franz Koch) Date: Mon, 20 May 2013 15:10:00 +0200 Subject: [TYPO3-mvc] Issues with "@cascade remove" and forms with nested objects In-Reply-To: References: Message-ID: On 20.05.2013 06:15, Stefano Cecere wrote: >> I fixed the issue for now by doing some dirty remapping of the pictures >> using their uncloned originals in a overridden internal actionController >> method. > > arg.. to me it sounds like a nuclear engineering procedure! :( I know and I'm not at all happy with it, but it's the only solution I found so far. Injecting a custom persistence backend with a fixed method would probably be nicer, but that would affect other addons as well which I try to avoid as two agencies are working on this Typo3 installation (multidomain setup) and I don't want to break anything. -- kind regards, Franz Koch From joerg at schoppet.de Mon May 20 16:42:54 2013 From: joerg at schoppet.de (Joerg Schoppet) Date: Mon, 20 May 2013 16:42:54 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_Re=3A_How_to_dynamically_create_obje?= =?utf-8?q?cts?= References: Message-ID: WOW, +1, Like (or however today I have to say: THANK YOU SO MUCH) Joerg From frenck at innologi.nl Tue May 21 10:28:40 2013 From: frenck at innologi.nl (Frenck Lutke) Date: Tue, 21 May 2013 10:28:40 +0200 Subject: [TYPO3-mvc] Issues with "@cascade remove" and forms with nested objects In-Reply-To: References: Message-ID: Hi Franz, I'm well familiar with this issue, as I had to debug it a long time ago as well. On 19-5-2013 18:15, Franz Koch wrote: > Situation: > I just wrote a simple blog like extension for a customer with the > possibility to upload pictures and assign a caption to them. The > pictures are themselves a domain object holding a filename and a caption > property and are connected to the post object as ObjectStorage. > In the create and edit forms, the blogger can dynamically add more > upload fields with caption and ofc edit/delete existing. > > Issue: > This all is working fine and gets mapped and persisted correctly as long > as I haven't set the "@cascade remove" annotation for the pictures > property. As soon as I add the annotation, ALL already persisted > pictures get deleted when I update the blog post even if nothing changed > at all and the property is correctly filled. > > Possible bug/cause: > After debugging this for some hours now I think I found the cause. When > I update the modified post in the repository, the persistence backend is > calling "getRemovedChildObjects" in it's "persistObjectStorage" method, > and "getRemovedChildObjects" always returns ALL contained objects even > when nothing got removed. > All this method internally does is a simple check if the current > objectStorage contains all objects that exist in the clean property by > comparing their spl_object_hash and returns all that are not contained. > And this is the issue, because all nested picture objects got cloned in > the PropertyMapper as they where submitted via the edit form and thus > have a different spl_object_hash. So either the "getRemovedChildObjects" > has to compare the (U)UID in case of DomainObjects or the PropertyMapper > must not clone any object which is no aggregate root and thus not > monitored by the persistenceManager. > This happens because the objectStorage property has changed. The tricky part is: all extbase knows is that the objectStorage has changed. It doesn't know which child-objects are detached, because child-objects aren't set to be removed when detached, as you could still attach them somewhere else before persistence applies. Detaching a child-object doesn't "say" anything about the child-object, it only says something about the its relation to the parentobject, and that's not stored in the child-object. Extbase's way to deal with this, is to simply set the entire ORIGINAL objectStorage content as removed as you've noticed, and then and reattach the child-objects that were in the changed objectStorage, while in turn removing re-attached child-objects from the removedObjects storage. This way, only child-objects that weren't re-attached can be considered "lost children" and remain in the removedObjects storage. While that method is an acceptable solution in itself, the problem that occurs is that there is a cascade remove check in persistObjectStorage() BEFORE the re-attachment, that doesn't differentiate between removing always or only if the parent object was removed. It is this that I would classify as the actual bug, as "cascade" implies a status passed down from the parent object in programming. Cheers, Frenck From frenck at innologi.nl Tue May 21 10:51:37 2013 From: frenck at innologi.nl (Frenck Lutke) Date: Tue, 21 May 2013 10:51:37 +0200 Subject: [TYPO3-mvc] Issues with "@cascade remove" and forms with nested objects In-Reply-To: References: Message-ID: A factual inconsistency in my post: On 21-5-2013 10:28, Frenck Lutke wrote: > re-attached Sorry, this seemed weird to me when reading my documentation on this issue, so I've looked again and they're not literally re-attached. The objects in the changed objectStorage are simply removed from the removedObjects. From b.vandertogt at profinit.com Wed May 22 11:51:23 2013 From: b.vandertogt at profinit.com (Bas van der Togt) Date: Wed, 22 May 2013 11:51:23 +0200 Subject: [TYPO3-mvc] query contains exception In-Reply-To: References: Message-ID: Wel i have tested it but ik does not work with contains. Is there realy no way do to do a FIND_IN_SET with extbase? I think this is a must have with a TCA core element like: 'services' => array( 'exclude' => 0, 'label' => 'LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services', 'config' => array( 'type' => 'select', 'items' => array( array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.1', '1'), array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.2', '2'), array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.3', '3'), array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.4', '4'), ), 'size' => 4, 'minitems' => 1, 'maxitems' => 4, ) ), Kind regards, Bas Op 17-05-13 19:27, Domi schreef: > Hi Bas, > > I never used comma separated string so you need to test by yourself if > it works. > > Cheers, > Dominic From scecere at krur.com Wed May 22 13:10:02 2013 From: scecere at krur.com (Stefano Cecere) Date: Wed, 22 May 2013 13:10:02 +0200 Subject: [TYPO3-mvc] CheckboxViewHelper -> $this->propertyValue() In-Reply-To: References: Message-ID: this problem still persists (at least on 4.7) the only solution i fould is as Henjo says: setting the "booleans" to '1' and threat them as integer.. On 13/02/12 09:58, Henjo Hoeksma wrote: > Hi guys, > > you might resolve this setting the default of the property to be zero: > > protected $variable = '0'; > > NULL is not the same as 0 or FALSE. > > Kind regards, > > Henjo > > Problems are small because we learned how to deal with them. > Problems are big because we need to learn how to deal with them. > > > On Fri, Feb 10, 2012 at 12:06, Martin Ernst wrote: > >> Have you been able to resolve your problem? >> >> I am having the same problem here. A form with a checkbox is fully >> functional. The correct state of the checkbox is always saved. >> >> I have an own validator for my form. If the Validator fails, I return to >> the form. It is a form bound to and edit/update action. All values from the >> current object are filled in the fields, not the values from before posting >> the form. AND I get the error message for my checkboxes: >> >> "Checkbox viewhelpers can only be bound to properties of type boolean or >> array." >> >> I am very much interested in a solution. >> >> Greetings >> Martin >> >> Am 31.01.2012 10:42, schrieb Claus Due: >> >> Hi Mark, >>> >>> Can I assume that if values typed in textfields after submitting the >>>> form are shown in the form again after failing validation, that the >>>> formObject is not NULL? >>>> >>> >>> This is the key ;) >>> >>> No, you cannot always assume this. I suspect you may have NULL instead of >>> a form object - try debugging that in either your Controller or template >>> file. >>> >>> Cheers, >>> Claus >>> >> >> ______________________________**_________________ >> TYPO3-project-typo3v4mvc mailing list >> TYPO3-project-typo3v4mvc@**lists.typo3.org >> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-** >> project-typo3v4mvc >> -- -- --- ----- ------- Stefano Cecere KRUR studio - http://krur.com From frenck at innologi.nl Thu May 23 09:41:00 2013 From: frenck at innologi.nl (Frenck Lutke) Date: Thu, 23 May 2013 09:41:00 +0200 Subject: [TYPO3-mvc] CheckboxViewHelper -> $this->propertyValue() In-Reply-To: References: Message-ID: Hi Stefan, On 22-5-2013 13:10, Stefano Cecere wrote: > this problem still persists (at least on 4.7) > the only solution i fould is as Henjo says: setting the "booleans" to > '1' and threat them as integer.. What about leaving them boolean and setting up the checkbox VH in your templates like so: HTH, Frenck From frenck at innologi.nl Thu May 23 09:50:04 2013 From: frenck at innologi.nl (Frenck Lutke) Date: Thu, 23 May 2013 09:50:04 +0200 Subject: [TYPO3-mvc] CheckboxViewHelper -> $this->propertyValue() In-Reply-To: References: Message-ID: On 23-5-2013 9:41, Frenck Lutke wrote: > Hi Stefan, > > On 22-5-2013 13:10, Stefano Cecere wrote: >> this problem still persists (at least on 4.7) >> the only solution i fould is as Henjo says: setting the "booleans" to >> '1' and threat them as integer.. > > > What about leaving them boolean and setting up the checkbox VH in your > templates like so: > > > > HTH, > Frenck Sorry, I copied from a source of mine WITHOUT a boolean property. Try: From joerg at schoppet.de Thu May 23 15:01:44 2013 From: joerg at schoppet.de (Joerg Schoppet) Date: Thu, 23 May 2013 15:01:44 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Problem_with_validate/dontvalidate?= Message-ID: Hi, I don't get it anymore, please help. TYPO3 6.1 I have a a controller to edit/update users. Creating of new users is working and also the update of existing ones. The User-Model has the property "zip" and for this I now wanted to add a validation, so I changed the phpdoc: /** * ZIP * * @var string * @validate RegularExpression(regularExpression = '/[0-9]{5}$/') */ protected $zip; With the new/create-Actions everything is working as expected and as soon as I don't put in 5 digits I get a FormError-message displayed in the new-form. But it isn't working with the edit/update-Actions :( I always get the following error-meesage Could not ultimately dispatch the request after 101 iterations. Most probably, a @dontvalidate annotation is missing on re-displaying a form with validation errors. These are the signatures of the edit/update-Actions: /** * action edit * * @param \MyVendor\Example\Domain\Model\User $user * @dontvalidate $user * @return void */ public function editAction(\MyVendor\Example\Domain\Model\User $user) { } /** * action update * * @param \MyVendor\Example\Domain\Model\User $user * @return void */ public function updateAction(\MyVendor\Example\Domain\Model\User $user) { } I deactivated ZendDebugger, memcache and apc. I restarted apache. I cleaned the cache in TYPO3. Where is the problem? Regards Joerg From philippwrann at gmx.at Thu May 23 15:32:54 2013 From: philippwrann at gmx.at (Philipp) Date: Thu, 23 May 2013 15:32:54 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Searching_an_extension_=28alternative_for_?= =?utf-8?q?indexed_search=29?= Message-ID: Hey I need an alternative for indexed search. I am using TYPO3 6.0.5 and i just CANT get indexedsearch run like its supposed to do... What i need: Very simple functionallity: Only one Textbox for searching and one Resultlist for displaying Performance Fluid Templates I tried the classic indexedsearch but it displayes either all pages or none... Results are of no value to the user. Also the templating is extremely shitty Then i tried the extbase version but it 1) only says: no Results found 2) Is much to complicated... i dont need "resultsets", sections and all that shit, just Results below each other.... Do you know any alternative? From lists at mind2machine.com Thu May 23 15:38:18 2013 From: lists at mind2machine.com (=?iso-8859-1?Q?Alban_Cousini=E9?=) Date: Thu, 23 May 2013 15:38:18 +0200 Subject: [TYPO3-mvc] Searching an extension (alternative for indexed search) In-Reply-To: References: Message-ID: Try to follow this tutorial with indexed search, this is a good one : http://xavier.perseguers.ch/?id=148 Else you can use tx_mnogosearch, but you need to compile some code on the server, so it is not a piece of cake either to deploy. > -----Message d'origine----- > De?: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-project- > typo3v4mvc-bounces at lists.typo3.org] De la part de Philipp > Envoy??: jeudi 23 mai 2013 15:33 > ??: typo3-project-typo3v4mvc at lists.typo3.org > Objet?: [TYPO3-mvc] Searching an extension (alternative for indexed search) > > Hey > > I need an alternative for indexed search. I am using TYPO3 6.0.5 and i just > CANT get indexedsearch run like its supposed to do... > > What i need: > Very simple functionallity: Only one Textbox for searching and one Resultlist > for displaying Performance Fluid Templates > > I tried the classic indexedsearch but it displayes either all pages or none... > Results are of no value to the user. Also the templating is extremely shitty > Then i tried the extbase version but it > 1) only says: no Results found > 2) Is much to complicated... i dont need "resultsets", sections and all that > shit, just Results below each other.... > > Do you know any alternative? > _______________________________________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc at lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc From philippwrann at gmx.at Thu May 23 16:35:42 2013 From: philippwrann at gmx.at (Philipp) Date: Thu, 23 May 2013 16:35:42 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_Searching_an_extension_=28alternativ?= =?utf-8?q?e_for_indexed_search=29?= References: Message-ID: I just found out why i allways got all pages as results when using the classic plugin, i forgot the notation around my actual content. Now one big question left: why do i get 0 Results using the extbase plugin? Where is the big difference in the setup? Does anyone have the extbase version running? From aleichsenring at ab-softlab.de Thu May 23 17:33:23 2013 From: aleichsenring at ab-softlab.de (Anja Leichsenring) Date: Thu, 23 May 2013 17:33:23 +0200 Subject: [TYPO3-mvc] Problem with validate/dontvalidate In-Reply-To: References: Message-ID: Hi, the annotiation for ignoring Validation with the rewritten propertyMapper (that is default in 6.1) is named @ignorevalidation @dontvalidate has no effect anymore, except you use the old propertyMapper. see the change here: http://forge.typo3.org/issues/27656 Additionally I recommend you to check your new action. Kind regards Anja On 05/23/2013 03:01 PM, Joerg Schoppet wrote: > Hi, > > I don't get it anymore, please help. > > TYPO3 6.1 > > I have a a controller to edit/update users. > > Creating of new users is working and also the update of existing ones. > > The User-Model has the property "zip" and for this I now wanted to add a > validation, so I changed the phpdoc: > /** > * ZIP > * > * @var string > * @validate RegularExpression(regularExpression = '/[0-9]{5}$/') > */ > protected $zip; > > With the new/create-Actions everything is working as expected and as > soon as I don't put in 5 digits I get a FormError-message displayed in > the new-form. > > But it isn't working with the edit/update-Actions :( > > I always get the following error-meesage > > Could not ultimately dispatch the request after 101 iterations. Most > probably, a @dontvalidate annotation is missing on re-displaying a form > with validation errors. > > > These are the signatures of the edit/update-Actions: > /** > * action edit > * > * @param \MyVendor\Example\Domain\Model\User $user > * @dontvalidate $user > * @return void > */ > public function editAction(\MyVendor\Example\Domain\Model\User > $user) { > } > > /** > * action update > * > * @param \MyVendor\Example\Domain\Model\User $user > * @return void > */ > public function updateAction(\MyVendor\Example\Domain\Model\User > $user) { > } > > I deactivated ZendDebugger, memcache and apc. > I restarted apache. > I cleaned the cache in TYPO3. > > > Where is the problem? > > > Regards > Joerg From joerg at schoppet.de Thu May 23 18:11:05 2013 From: joerg at schoppet.de (Joerg Schoppet) Date: Thu, 23 May 2013 18:11:05 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_Problem_with_validate/dontvalidate?= References: Message-ID: Thanks Anja, I also just got this info in the IRC (thanks, bjo3rn). I just have two additional questions: - Why was this working with my newAction? - Where is this documented, or how should I have found this change? Regards Joerg From scecere at krur.com Sat May 25 09:26:17 2013 From: scecere at krur.com (Stefano Cecere) Date: Sat, 25 May 2013 09:26:17 +0200 Subject: [TYPO3-mvc] validator: email, but not required? In-Reply-To: References: Message-ID: Hi Dennis.. i see your very useful patch has been moved to 6.2 ... let's hope to see it applied soon! On 15/03/12 15:11, Dennis Ahrens wrote: > Hi Bastian, > > On 21.02.2012 18:16, Bastian Waidelich wrote: >> This issue has recently been fixed in FLOW3 (after some discussion) [1]. >> Maybe someone feels like backporting this - unfortunately it is a >> breaking change though.. > > As our trainee needs those feature for its first extension too, i've > spend some time to do the backport [1]. Maybe you have some time during > the code sprint to get this finished, there is still something to do > related to the GenericObjectValidator - more information can be found in > gerrit... > > regards > Dennis > > [1] http://forge.typo3.org/issues/34838 -- -- --- ----- ------- Stefano Cecere KRUR studio - http://krur.com From doria at wiro-consultants.com Sun May 26 23:31:29 2013 From: doria at wiro-consultants.com (Vitoandre D'Oria) Date: Sun, 26 May 2013 23:31:29 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_typolink_in_CommandController_or_bac?= =?utf-8?q?kend_module_in_6=2Ex?= References: Message-ID: The error comes from missing arguments when calling tslib_fe: tslib_fe($TYPO3_CONF_VARS, $id, $type) are required or it may come because of a deprecated error when using TYPO3 >= 6.0 (refactoring) From besucher80 at gmx.de Mon May 27 10:46:40 2013 From: besucher80 at gmx.de (Stefan Kruse) Date: Mon, 27 May 2013 10:46:40 +0200 Subject: [TYPO3-mvc] initializeObject() Message-ID: Hi, could somebody tell me for what exact the initializeObject() Method is for? Thanks and regards Stefan From andreas.kiessling at web.de Tue May 28 00:13:41 2013 From: andreas.kiessling at web.de (Andreas Kiessling) Date: Tue, 28 May 2013 00:13:41 +0200 Subject: [TYPO3-mvc] extbase storagePid on CLI In-Reply-To: References: Message-ID: Hi, has anyone tried this in 6.x with namespaced classes? It seems, that the extension key is not set in the configuration manager, when the TS config is built. I have to set this in my command controller, so that it takes the config from module.tx_dummy.persistence.storagePid from my root page before querying the db: $this->configurationManager->setConfiguration(array( 'extensionName' => 'Dummy', )); Otherwise, the pid constraint is always set to some default 1 Overriding with config.tx_extbase.persistence.storagePid works of course. Any ideas? Regards, Andreas From christian.mueller at typo3.org Tue May 28 02:44:52 2013 From: christian.mueller at typo3.org (=?ISO-8859-1?Q?Christian_M=FCller?=) Date: Mon, 27 May 2013 17:44:52 -0700 Subject: [TYPO3-mvc] initializeObject() In-Reply-To: References: Message-ID: Hi Stefan, this method probably makes more sense in Flow than in Extbase. It is kind of a "lifecycle" method that in Flow is automatically called after __construct and __wakeup (which of the two it was, will be given as first argument to the method). In this method you can be sure that all injections are done for example (contrary to __construct). I am not sure how extbase uses it, but I guess it is more of an backport artifact. Cheers, Christian On 27.05.13 01:46, Stefan Kruse wrote: > Hi, could somebody tell me for what exact the initializeObject() Method is > for? Thanks and regards Stefan > From joerg at schoppet.de Wed May 29 07:07:50 2013 From: joerg at schoppet.de (Joerg Schoppet) Date: Wed, 29 May 2013 07:07:50 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_validation_of_dynamically_added_sub-object?= =?utf-8?q?s?= Message-ID: Hi, TYPO3 CMS 6.1 I have the following model-classes: Order - name (string) - items (ObjectStorage of Item) Item - description (string) - types (ObjectStorage of Type) [implemented with a multi-select field as they are fix] In the newAction() of the Order I create a new $order-object if it is NULL and create the first item-subobject. In the new.html view I then display this all and give with the user the possibility to add additional items with a little bit of javascript. Everything is working fine and with the help of the "PropertyManager" in the initializeCreateAction() the dynamic sub-objects are correctly transfered to the createAction() method. BUT ... Now I have created an OrderValidator() class to check if the order including the items is valid. In general it is working, I have access to all properties (including the items). If the validation fails the new.html view is called again, but there the order-object hasn't the modified items-collection but again the new item as created in the newAction. Where have I missed something? Joerg From philippwrann at gmx.at Wed May 29 10:33:13 2013 From: philippwrann at gmx.at (Philipp) Date: Wed, 29 May 2013 10:33:13 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Re=3A_Searching_an_extension_=28alternativ?= =?utf-8?q?e_for_indexed_search=29?= References: Message-ID: One more question: How can i order exact hits before? So when i type "something" i get the page with the title "something" as first result. From pf at typoconsult.dk Wed May 29 11:56:17 2013 From: pf at typoconsult.dk (Peter Falk) Date: Wed, 29 May 2013 11:56:17 +0200 Subject: [TYPO3-mvc] Could not serialize Domain Object Message-ID: Hi, Get this annoying error when trying to redirect from one action/controller to another: public function createAction(Tx_TcDsfBooking_Domain_Model_Booking $newBooking) { if($this->request->getArgument('pHours') > 0) { $this->redirect('index', 'Payment', NULL, array('booking' => $newBooking), $this->settings['paymentPid']); } ... ... ... } Can anyone tell me what the problem is, and how to solve it? Regards Peter From scecere at krur.com Wed May 29 12:19:00 2013 From: scecere at krur.com (Stefano Cecere) Date: Wed, 29 May 2013 12:19:00 +0200 Subject: [TYPO3-mvc] Could not serialize Domain Object In-Reply-To: References: Message-ID: i use the same command without problems... maybe the object is invalid? did you try @dontvalidate $newBooking ? On 29/05/13 11:56, Peter Falk wrote: > Hi, > > Get this annoying error when trying to redirect from one > action/controller to another: > > public function createAction(Tx_TcDsfBooking_Domain_Model_Booking > $newBooking) { > > if($this->request->getArgument('pHours') > 0) { > $this->redirect('index', 'Payment', NULL, array('booking' => > $newBooking), $this->settings['paymentPid']); > } > ... > ... > ... > } > > Can anyone tell me what the problem is, and how to solve it? > > Regards > Peter -- -- --- ----- ------- Stefano Cecere KRUR studio - http://krur.com From pf at typoconsult.dk Wed May 29 13:05:49 2013 From: pf at typoconsult.dk (Peter Falk) Date: Wed, 29 May 2013 13:05:49 +0200 Subject: [TYPO3-mvc] Could not serialize Domain Object In-Reply-To: References: Message-ID: Tried it, but without luck. The error does not occur when parsing the function parameter, but when creating the redirect url. So at first the object is okay, and then next... FYI I have tried to set and get parameters from the object without any problems, so I think the object is okay. Regards Peter "Stefano Cecere" skrev i meddelelsen news:mailman.1.1369822740.31110.typo3-project-typo3v4mvc at lists.typo3.org... i use the same command without problems... maybe the object is invalid? did you try @dontvalidate $newBooking ? On 29/05/13 11:56, Peter Falk wrote: > Hi, > > Get this annoying error when trying to redirect from one > action/controller to another: > > public function createAction(Tx_TcDsfBooking_Domain_Model_Booking > $newBooking) { > > if($this->request->getArgument('pHours') > 0) { > $this->redirect('index', 'Payment', NULL, array('booking' => > $newBooking), $this->settings['paymentPid']); > } > ... > ... > ... > } > > Can anyone tell me what the problem is, and how to solve it? > > Regards > Peter -- -- --- ----- ------- Stefano Cecere KRUR studio - http://krur.com From pf at typoconsult.dk Wed May 29 14:52:52 2013 From: pf at typoconsult.dk (Peter Falk) Date: Wed, 29 May 2013 14:52:52 +0200 Subject: [TYPO3-mvc] Could not serialize Domain Object In-Reply-To: References: Message-ID: Somehow the issue occur, when the object isn't persisted. So, what I am looking for is a way to do this redirect without persisting the object first. /Peter "Stefano Cecere" skrev i meddelelsen news:mailman.1.1369822740.31110.typo3-project-typo3v4mvc at lists.typo3.org... i use the same command without problems... maybe the object is invalid? did you try @dontvalidate $newBooking ? On 29/05/13 11:56, Peter Falk wrote: > Hi, > > Get this annoying error when trying to redirect from one > action/controller to another: > > public function createAction(Tx_TcDsfBooking_Domain_Model_Booking > $newBooking) { > > if($this->request->getArgument('pHours') > 0) { > $this->redirect('index', 'Payment', NULL, array('booking' => > $newBooking), $this->settings['paymentPid']); > } > ... > ... > ... > } > > Can anyone tell me what the problem is, and how to solve it? > > Regards > Peter -- -- --- ----- ------- Stefano Cecere KRUR studio - http://krur.com From joerg at schoppet.de Wed May 29 15:17:30 2013 From: joerg at schoppet.de (Joerg Schoppet) Date: Wed, 29 May 2013 15:17:30 +0200 Subject: [TYPO3-mvc] =?utf-8?q?Could_not_serialize_Domain_Object?= References: Message-ID: I haven't tried this, but regarding the docu redirect() "will be sent to the client which then performs another request to the new URL". If you have a non persisted object have you tried forward() "directly transfered to the other action without the need for a new request" Joerg From pf at typoconsult.dk Wed May 29 15:25:46 2013 From: pf at typoconsult.dk (Peter Falk) Date: Wed, 29 May 2013 15:25:46 +0200 Subject: [TYPO3-mvc] Could not serialize Domain Object In-Reply-To: References: Message-ID: I might try this. But forward suffer from the lack of a pageUid, so I have to rewrite some of the code to use this concept. But thnks anyway. /Peter "Joerg Schoppet" skrev i meddelelsen news:mailman.1.1369833450.30261.typo3-project-typo3v4mvc at lists.typo3.org... I haven't tried this, but regarding the docu redirect() "will be sent to the client which then performs another request to the new URL". If you have a non persisted object have you tried forward() "directly transfered to the other action without the need for a new request" Joerg From bastian at typo3.org Wed May 29 18:04:54 2013 From: bastian at typo3.org (Bastian Waidelich) Date: Wed, 29 May 2013 18:04:54 +0200 Subject: [TYPO3-mvc] initializeObject() In-Reply-To: References: Message-ID: Christian M?ller wrote: Hi Christian, just as a quick addition: > I am not sure how extbase uses it, but I guess it is more of an backport > artifact. As Extbase supports dependency injection as well, this method makes sense. -- Bastian Waidelich -- Core Developer Team TYPO3 .... inspiring people to share! Get involved: typo3.org From besucher80 at gmx.de Thu May 30 10:50:12 2013 From: besucher80 at gmx.de (Stefan Kruse) Date: Thu, 30 May 2013 10:50:12 +0200 Subject: [TYPO3-mvc] Flexform Display Condition for switchableControllerActions Message-ID: Hi, i would like to use a display condition for switchableControllerAction. I try this: FIELD:switchableControllerActions:=:Product->details But that doesn't work. IS there a bug or something what I missed? By the way. Is there a way to use displayCond for complete sheets? To hide a complete sheet when its not needed? Thanks and regards Stefan From h.kromm at paints.de Thu May 30 17:22:22 2013 From: h.kromm at paints.de (Heiko Kromm | Paints) Date: Thu, 30 May 2013 17:22:22 +0200 (CEST) Subject: [TYPO3-mvc] ItemsProcFunc and Namespaces In-Reply-To: References: Message-ID: Hi List, I want to call a ItemsProcFunc with a new extbase extension using namespaces. I placed my Class in Classes/Hook and the filename is ItemsProcFunc.php. The content of this file is (shortend): How can I call the createItems function with ItemsProcFunc? Thanks for your help Heiko From franssaris at gmail.com Thu May 30 18:49:46 2013 From: franssaris at gmail.com (Frans Saris) Date: Thu, 30 May 2013 18:49:46 +0200 Subject: [TYPO3-mvc] ItemsProcFunc and Namespaces In-Reply-To: References: Message-ID: Hi Heiko, Don't het the whole context. But you mean something like: 'EXT:media/Classes/Hooks/NawSecuredl.php:TYPO3\CMS\Media\Hooks\NawSecuredl->preOutput'; File:classname_incluiding_namespace->funtion_name Gr. Frans Op 30 mei 2013 17:22 schreef "Heiko Kromm | Paints" het volgende: > Hi List, > > I want to call a ItemsProcFunc with a new extbase extension using > namespaces. > > I placed my Class in Classes/Hook and the filename is ItemsProcFunc.php. > The content of this file is (shortend): > namespace Myvendor\Myextension\Hook; > > class ItemsProcFunc { > > public function createItems(array &$config, t3lib_TCEforms > $parentObject) { > ... > } > } > ?> > > How can I call the createItems function with ItemsProcFunc? > > Thanks for your help > Heiko > _______________________________________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc at lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc > From obeck at biznet.ch Fri May 31 13:10:25 2013 From: obeck at biznet.ch (Oliver Beck) Date: Fri, 31 May 2013 13:10:25 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_Set_Validators_inside_an_Action?= Message-ID: Hi all I know it's possible to add custom Arguments Errors inside an action (with \TYPO3\CMS\Extbase\Mvc\Controller\ArgumentError). But with this solution I have to create a new validation error (with its own error code and message). But I want to use existing validators like the NotEmpty-Validator. Thanks for any hints! Kind Regards, Oliver From h.kromm at paints.de Fri May 31 14:00:02 2013 From: h.kromm at paints.de (Heiko Kromm | Paints) Date: Fri, 31 May 2013 14:00:02 +0200 (CEST) Subject: [TYPO3-mvc] ItemsProcFunc and Namespaces In-Reply-To: References: Message-ID: Hi Frans, thanks for your answer. Calling the Function with: Myvendor\Myextension\Hook\ItemsProcFunc->createItems works. The problem was my function declaration. It has to be: public function createItems(array &$config, $parentObject) Thanks Heiko ----- Urspr?ngliche Mail ----- Von: "Frans Saris" An: "TYPO3 v4 MVC project" Gesendet: Donnerstag, 30. Mai 2013 18:49:46 Betreff: Re: [TYPO3-mvc] ItemsProcFunc and Namespaces Hi Heiko, Don't het the whole context. But you mean something like: 'EXT:media/Classes/Hooks/NawSecuredl.php:TYPO3\CMS\Media\Hooks\NawSecuredl->preOutput'; File:classname_incluiding_namespace->funtion_name Gr. Frans Op 30 mei 2013 17:22 schreef "Heiko Kromm | Paints" het volgende: > Hi List, > > I want to call a ItemsProcFunc with a new extbase extension using > namespaces. > > I placed my Class in Classes/Hook and the filename is ItemsProcFunc.php. > The content of this file is (shortend): > namespace Myvendor\Myextension\Hook; > > class ItemsProcFunc { > > public function createItems(array &$config, t3lib_TCEforms > $parentObject) { > ... > } > } > ?> > > How can I call the createItems function with ItemsProcFunc? > > Thanks for your help > Heiko > _______________________________________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc at lists.typo3.org > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc > _______________________________________________ TYPO3-project-typo3v4mvc mailing list TYPO3-project-typo3v4mvc at lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc -- Paints Multimedia GmbH Heiko Kromm Lange Reihe 29 20099 Hamburg Tel: + 49 (0)40 - 27 808 285 Fax: + 49 (0)40 - 27 808 286 E-Mail: h.kromm at paints.de Internet: www.paints.de -------------------------------------------- Gesch?ftsf?hrer : F. Till, J. W?hning HRB 86114, Hamburg Ust.ID.Nr. DE226211017 From romain.hydrocanon at gmail.com Fri May 31 15:46:29 2013 From: romain.hydrocanon at gmail.com (Romain) Date: Fri, 31 May 2013 15:46:29 +0200 Subject: [TYPO3-mvc] =?utf-8?q?_=5BTypo3_6=2E1=5D_MVC_Backend_Module_=3A_h?= =?utf-8?q?ow_to_show_PHP_errors_=3F?= Message-ID: Hey, I'm searching for something that is probably really easy to do, but I'm wasting my time on it since a couple of hours now... I just don't see any PHP error when there is a syntax - or anything else - error in my controllers. I'm working on a MVC-style extension, and this is really annoying not to know where do the errors come from everytime... Does someone have any idea on how to fix it ? Thanks a lot in advance, Have a good day, Romm' From adrien.crivelli at gmail.com Fri May 31 17:46:32 2013 From: adrien.crivelli at gmail.com (Adrien Crivelli) Date: Fri, 31 May 2013 17:46:32 +0200 Subject: [TYPO3-mvc] [Typo3 6.1] MVC Backend Module : how to show PHP errors ? In-Reply-To: References: Message-ID: did you try installing xdebug and using those flag in config file ? $TYPO3_CONF_VARS['SYS']['sqlDebug'] = '1'; // Modified or inserted by TYPO3 Install Tool. $TYPO3_CONF_VARS['BE']['versionNumberInFilename'] = '0'; // Modified or inserted by TYPO3 Install Tool. $TYPO3_CONF_VARS['SYS']['displayErrors'] = '1'; // Modified or inserted by TYPO3 Install Tool. $TYPO3_CONF_VARS['BE']['debug'] = '1'; // Modified or inserted by TYPO3 Install Tool. $TYPO3_CONF_VARS['FE']['debug'] = '1'; // Modified or inserted by TYPO3 Install Tool. That's coming from 4.X branch, but I am pretty sure you can find equivalent things in "install tool" On 31 May 2013 15:46, Romain wrote: > Hey, > > I'm searching for something that is probably really easy to do, but I'm > wasting my time on it since a couple of hours now... > > I just don't see any PHP error when there is a syntax - or anything else - > error in my controllers. I'm working on a MVC-style extension, and this is > really annoying not to know where do the errors come from everytime... > > Does someone have any idea on how to fix it ? > > Thanks a lot in advance, > > Have a good day, > > Romm' > ______________________________**_________________ > TYPO3-project-typo3v4mvc mailing list > TYPO3-project-typo3v4mvc@**lists.typo3.org > http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-** > project-typo3v4mvc >