[TYPO3-mvc] Action "create" is not allowed?

Henjo Hoeksma me at henjohoeksma.nl
Sat Oct 22 12:12:20 CEST 2011


On 2011-10-22 08:43:36 +0000, David Greiner said:

> Hey Henjo!
> 
> Thanks for your answer!
> Yes there is a flexform plugin. Adding some more actions in the
> switchableControllerAction-section resolved my problems.
> <numIndex index="0">
> 	<numIndex
> index="0">LLL:EXT:dg_timetrack/Resources/Private/Language/locallang.xml:tx_d
> gtimetrack_flexforms.tracking</numIndex>
> 	<numIndex
> index="1">Timeaccountcz->list;Timeaccountcz->update;Timeaccountcz->create</n
> umIndex>
> </numIndex>
> <numIndex index="1">
> 	<numIndex
> index="0">LLL:EXT:dg_timetrack/Resources/Private/Language/locallang.xml:tx_d
> gtimetrack_flexforms.statistic</numIndex>
> 	<numIndex index="1">Timeaccountcz->statistic</numIndex>
> </numIndex>
> 
> Nice weekend!
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
> [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
> Henjo Hoeksma
> Gesendet: Freitag, 21. Oktober 2011 16:44
> An: TYPO3 v4 MVC project
> Betreff: Re: [TYPO3-mvc] Action "create" is not allowed?
> 
> Hi David,
> 
> your code looks fine. Did you add a flexform plugin? It could be that you
> haven't add the action there.
> 
> BTW Please stick to the coding guidelines and use full descriptive names
> including the right CamelCase usages!
> 
> 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, Oct 21, 2011 at 15:58, David Greiner <davidgreiner at gmx.net> wrote:
> 
>> Hey!
>> 
>> In my Fluid-Template I use the following form.
>> 
>> ----------------
>> <f:form action="create" method="post" name="newTimeaccountcz"
>> object="{newTimeaccountcz}">
>> <f:form.hidden name="status" property="status" value="1" />
>> <f:form.submit value="Zeit starten" />
>> </f:form>
>> ----------------
>> 
>> By clicking the submit-button I get this error:
>> 
>> #1313855173: The action "create" (controller "Timeaccountcz") is not
>> allowed
>> by this plugin. Please check
>> Tx_Extbase_Utility_Extension::configurePlugin()
>> in your ext_localconf.php.
>> 
>> 
>> My ext_localconf.php:
>> ----------------
>> <?php
>> if (!defined('TYPO3_MODE')) {
>> die ('Access denied.');
>> }
>> 
>> Tx_Extbase_Utility_Extension::configurePlugin(
>> $_EXTKEY,
>> 'Timetracking',
>> array(
>> 'Timeaccountcz' => 'list, edit, update, new, create,
>> statistic',
>> 
>> ),
>> // non-cacheable actions
>> array(
>> 'Timeaccountcz' => 'list, edit, update, new, create,
>> statistic',
>> 
>> )
>> );
>> 
>> ?>
>> ----------------
>> 
>> And my createAction() in the TimeaccountczController.php:
>> ----------------
>> /**
>> * action create
>> *
>> * @param $newTimeaccountcz
>> * @return void
>> */
>> public function createAction(Tx_DgTimetrack_Domain_Model_Timeaccountcz
>> $newTimeaccountcz) {
>> $newTimeaccountcz->setWorktime(time());
>> $this->timeaccountczRepository->add($newTimeaccountcz);
>> $this->flashMessageContainer->add('Your new Timeaccountcz was
>> created.');
>> $this->redirect('list');
>> }
>> ----------------
>> Where is the problem? What can I do?
>> 
>> Greets, David.
>> 
>> _______________________________________________
>> 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

Hi David,

great you found it!

Have fun,

Henjo



More information about the TYPO3-project-typo3v4mvc mailing list