[TYPO3-ect] lib/div: Unknown action with 2 controllers after validating a form

Elmar Hinz elmar07 at googlemail.com
Tue Aug 7 10:12:50 CEST 2007


Fabian Fisahn wrote:

> Hi List,
> 
> I inserted 2 plugins/controllers on a page, the first prints a list of
> database entries, the second shows a formular to edit a database entry.
> 
> In general it works, but if I validate the form and print a error list
> in second controller,
> the first controllers says:
> "Unknown action.
> Mind: All valid action functions have to end with "Action"."
> 


Different solutions are possible. Please see the comment in

http://typo3.org/extensions/repository/view/bananas/0.0.8/info/controllers%252Fclass.tx_bananas_controllers_list.php/

    // You don't want to receive the actions from the form.
    // Instead you always want to use the default action. 
    // So you set a different designator. (Here the same as the class name.)
    // Designators should always start with the extension key.
    var $defaultDesignator = 'tx_bananas_controllers_list';

Alternative 1:

function unknownAction() {
  return $this->defaultAction();
}

Alternative 2: 

Define a "forced" Action for the list in the TS configuration.


Regards

Elmar










More information about the TYPO3-team-extension-coordination mailing list