[TYPO3-mvc] Problem with switchableControllerActions (Stefan Kruse)

Thomas Nussbaumer typo3 at thomasnu.ch
Tue Jan 22 09:46:21 CET 2013


Hi Stefan
Yes, I made ​​the experience that when I have such a Flexform all 
participating controller->action there must be. I'm not sure if this 
applies to your case. I have for example two controllers News and Mail 
where I run the plugin with action show:
*** <numIndex 
index="1">News->info;News->detail;News->edit;News->update;News->new;News->create;News->delete;Mail->edit;Mail->update;Mail->new;Mail->create;Mail->delete</numIndex>

Greetings, Thomas

Am 22.01.2013 07:56, schrieb Stefan Kruse:
> Hi, thanks for reply.
>
> Ok, i could make my seperate plugin only for the menu, but I think that is
> not sense of switchableControllerActions or is it? :)
>
> But I have tested it with a separate plugin and that works.
>
> @ Thomas: do I have to add my Menu->show combination to all
> Controller->Action combinations that are in the flexform?
>
> For example I have:
>
> Search->headings;Search->companies;Search->details;
> Notepad->show;Notepad->list;Notepad->details;
>
> I have only add my menu controller / action like
>
> Menu->show;
>
> To the flexform.
>
> Thanks Stefan
>
> -----Ursprüngliche Nachricht-----
> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
> [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
> typo3-project-typo3v4mvc-request at lists.typo3.org
> Gesendet: Montag, 21. Januar 2013 12:00
> An: typo3-project-typo3v4mvc at lists.typo3.org
> Betreff: TYPO3-project-typo3v4mvc Digest, Vol 48, Issue 17
>
> Send TYPO3-project-typo3v4mvc mailing list submissions to
> 	typo3-project-typo3v4mvc at lists.typo3.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>
> or, via email, send a message with subject or body 'help' to
> 	typo3-project-typo3v4mvc-request at lists.typo3.org
>
> You can reach the person managing the list at
> 	typo3-project-typo3v4mvc-owner at lists.typo3.org
>
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of TYPO3-project-typo3v4mvc digest..."
>
>
> Today's Topics:
>
>     1. Problem with switchableControllerActions (Stefan Kruse)
>     2. Re: Problem with switchableControllerActions (Thomas Nussbaumer)
>     3. Re: Action "create" is not allowed? (2)
>     4. Re: Problem with switchableControllerActions (Stephen Bungert)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 21 Jan 2013 10:19:51 +0100
> From: "Stefan Kruse" <besucher80 at gmx.de>
> Subject: [TYPO3-mvc] Problem with switchableControllerActions
> To: <typo3-project-typo3v4mvc at lists.typo3.org>
> Message-ID:
> 	
> <mailman.686.1358759994.609.typo3-project-typo3v4mvc at lists.typo3.org>
> Content-Type: text/plain;	charset="us-ascii"
>
> Hello,
> I have an extension with a lot of action controller combinations. I use also
> a Flexform file with switchable controller actions. Furthermore, I use my
> template for the fluid template object. Ok, I have included on my home page
> the first plugin, do a search. If there was one enters, you obtain the next
> action that results. I would now like to include in my template a specific
> controller action, namely a specific menu. This I do with the cObject view
> helper. My TS is as follows:
>
> MenuWidget = USER
> MenuWidget {
> userFunc = tx_extbase_core_bootstrap-> run plugin name = Pi1 extension name
> = Tl24boersesearch controller = Menu action = show switchable controller
> actions { Menu {
> 1 = show
> }
> }
> settings = <plugin.tx_tl24boersesearch.settings
> persistence = <plugin.tx_tl24boersesearch.persistence
> view = <plugin.tx_tl24boersesearch.view
> }
>
> lib.menutop <MenuWidget
>
> On the first page everything looks fine, but when the next action comes, an
> error message is coming that this action is not allowed in the menu
> controller.
>
> Has someone a tip what this could be?
>
> Thanks
>
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 21 Jan 2013 11:10:44 +0100
> From: Thomas Nussbaumer <typo3 at thomasnu.ch>
> Subject: Re: [TYPO3-mvc] Problem with switchableControllerActions
> To: typo3-project-typo3v4mvc at lists.typo3.org
> Message-ID:
> 	<mailman.1.1358763044.7670.typo3-project-typo3v4mvc at lists.typo3.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hello Stefan,
> Is this Controller->action in Flexform available?
> Fx from me with controller Mail:
> <config>
>     <type>select</type>
>       <items type="array">
>         <numIndex index="0" type="array">
>           <numIndex index="0">Default</numIndex>
>             <numIndex
> index="1">Mail->index;Mail->new;Mail->create;Menu->show</numIndex>
>           </numIndex>
>         <numIndex index="1" type="array">
>           ...
> Greetings, Thomas
>
> Am 21.01.2013 10:19, schrieb Stefan Kruse:
>> Hello,
>> I have an extension with a lot of action controller combinations. I
>> use also a Flexform file with switchable controller actions.
>> Furthermore, I use my template for the fluid template object. Ok, I
>> have included on my home page the first plugin, do a search. If there
>> was one enters, you obtain the next action that results. I would now
>> like to include in my template a specific controller action, namely a
>> specific menu. This I do with the cObject view helper. My TS is as
> follows:
>>
>> MenuWidget = USER
>> MenuWidget {
>> userFunc = tx_extbase_core_bootstrap-> run plugin name = Pi1 extension
>> name = Tl24boersesearch controller = Menu action = show switchable
>> controller actions { Menu {
>> 1 = show
>> }
>> }
>> settings = <plugin.tx_tl24boersesearch.settings
>> persistence = <plugin.tx_tl24boersesearch.persistence
>> view = <plugin.tx_tl24boersesearch.view }
>>
>> lib.menutop <MenuWidget
>>
>> On the first page everything looks fine, but when the next action
>> comes, an error message is coming that this action is not allowed in
>> the menu controller.
>>
>> Has someone a tip what this could be?
>>
>> Thanks
>>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 21 Jan 2013 11:21:32 +0100
> From: Daniel Siepmann - wfp:2 <layne.obserdia at googlemail.com>
> Subject: Re: [TYPO3-mvc] Action "create" is not allowed?
> To: typo3-project-typo3v4mvc at lists.typo3.org
> Message-ID:
> 	<mailman.1.1358763686.9581.typo3-project-typo3v4mvc at lists.typo3.org>
> Content-Type: text/plain; charset=iso-8859-1; format=flowed
>
> Hey all,
>
> is it possibel to map and validate nested objects with
> Tx_Extbase_Persistence_ObjectStorage?
> E.g. we want to add a Message with multiple topics.
> So our model has a property:
> /**
>   *
>   * @var Tx_Extbase_Persistence_ObjectStorage<Tx_***_Domain_Model_Topic>
>   */
> protected $topics;
>
> We allow nested creation of the objects and that works fine. But we don't
> know how to validate them.
> Your solution doesn't look like it supports ObjectStorage.
>
> Is there a way to solve this too?
>
>
> On 2011-10-22 10:12:20 +0000, Henjo Hoeksma said:
>
>> 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.x
>>> ml:tx_d gtimetrack_flexforms.tracking</numIndex>
>>> 	<numIndex
>>> index="1">Timeaccountcz->list;Timeaccountcz->update;Timeaccountcz->cr
>>> eate</n
>>> umIndex>
>>> </numIndex>
>>> <numIndex index="1">
>>> 	<numIndex
>>> index="0">LLL:EXT:dg_timetrack/Resources/Private/Language/locallang.x
>>> ml: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-typo3v
>>>> 4mvc
>>>>
>>> _______________________________________________
>>> TYPO3-project-typo3v4mvc mailing list
>>> TYPO3-project-typo3v4mvc at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4
>>> mvc
>>
>> Hi David,
>>
>> great you found it!
>>
>> Have fun,
>>
>> Henjo
>
>
> --
> Best regards,
> Daniel
>
> --
> Daniel Siepmann
> TYPO3-Extension developer at wfp:2
>
> TYPO3 .... inspiring people to share!
> Get involved: http://typo3.org
>
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 21 Jan 2013 11:38:59 +0100
> From: "Stephen Bungert" <stephenbungert at yahoo.de>
> Subject: Re: [TYPO3-mvc] Problem with switchableControllerActions
> To: typo3-project-typo3v4mvc at lists.typo3.org
> Message-ID:
> 	
> <mailman.1.1358764741.12545.typo3-project-typo3v4mvc at lists.typo3.org>
>
> I had the same problem, I had several instance of my plugin set to display
> different switchable actions and solved it (after being advised to) by
> creating different plugin for the controllers.
>
> http://forge.typo3.org/issues/37245
>
> Stephen.
>
>
>
>
> ------------------------------
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>
> End of TYPO3-project-typo3v4mvc Digest, Vol 48, Issue 17
> ********************************************************
>



More information about the TYPO3-project-typo3v4mvc mailing list