[TYPO3-dev] switchableControllerActions: The action "index"is not allowed by this plugin.

Marc Wöhlken woehlken at quadracom.de
Wed Nov 5 17:10:47 CET 2014


Hi!
Playing around with a flexform setup using switchableControllerActions.

Via flexform I have added a select field to choose between two different
actions which should be called by the corresponding plugin.

The correct action gets called but when I try to f:link.action between
actions I get the error message "The action "index" (controller
"Product") is not allowed by this plugin".

The error raises when I choose the method Product->manufacturer and try
to link to Product->index using fluid templating.

This is my setup:

---
ext_localconf.php

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
  $_EXTKEY,
  'ProductList',
  array (
    'Product' => 'index,detail,manufacturer',
  ),
  array(
    'Product' => ''
  )
);

---
ext_tables.php

$extensionName =
\TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
  $_EXTKEY,
  'ProductList',

'LLL:EXT:mw_machine/Resources/Private/Language/locallang_db.xml:tx_mwmachine_plugin_productList'
);

$pluginSignature = strtolower($extensionName . '_' . 'ProductList');
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] =
'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
  $pluginSignature,
  'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform.xml'
);

---
flexform.xml

<switchableControllerActions>
  <TCEforms>
   <exclude>0</exclude>

<label>LLL:EXT:mw_machine/Resources/Private/Language/locallang_flexform.xml:entryType</label>
    <config>
      <type>select</type>
      <default>0</default>
      <items type="array">
        <numIndex index="0" type="array">
          <numIndex index="0">Kategorien</numIndex>
          <numIndex
index="1">Product->index;Product->manufacturer</numIndex>
        </numIndex>
        <numIndex index="1" type="array">
          <numIndex index="0">Hersteller</numIndex>
          <numIndex
index="1">Product->manufacturer;Product->index</numIndex>
        </numIndex>
      </items>
    </config>
  </TCEforms>
</switchableControllerActions>

---
Manufacturer.html

<f:if condition="{manufacturers->f:count()}">
  <ul class="tx-mwmachine-manufacturerlist">
    <f:for each="{manufacturers}" as="manufacturer">
      <li>
        <f:link.action action="index" controller="Product"
arguments="{manufacturer: manufacturer.uid}">
          <div class="header">{manufacturer.name}</div>
        </f:link.action>
      </li>
    </f:for>
  </ul>
</f:if>

---
Any ideas what causes my problem?

For me it looks like each action is working stand alone but an error
gets thrown when I try to cross link between actions.

Your help is appreciated,
CU Marc
-- 
...........................................................
Marc Wöhlken                     TYPO3 certified integrator

Quadracom - Proffe & Wöhlken

Rembertistraße 32              WWW: http://www.quadracom.de
D-28203 Bremen                E-Mail: woehlken at quadracom.de
______________             PGP-Key: http://pgp.quadracom.de



More information about the TYPO3-dev mailing list