Discussion:
[TYPO3-english] How do I specify a default action?
Calgacus map Brude
2013-12-13 17:45:43 UTC
Permalink
I made a new extension in extension builder (a basic 4 model extension with no custom work in it, the only thing slightly fancy it does is extend the fe_users table) and installed it and made a page with the plugin and when I view the page I get a blank area where the plugin should appear - not a whole blank page just the part where the plugin should appear. I put some
echo __FUNCTION__.__LINE__;
die;
lines in all the listActions so if I was hitting any of them I'd at least know which I was hitting. But I see no echo lines and I clearly never hit a die; so I guess my extension is not hitting any action, maybe because I have to specify one as the default. My extension has 4 models. How do I specify what action gets called?
I am using typo3 v4.5.30 with extbase.

Thanks
Jan Kornblum
2013-12-13 17:59:02 UTC
Permalink
Post by Calgacus map Brude
I made a new extension in extension builder (a basic 4 model extension with
no custom work in it, the only thing slightly fancy it does is extend the
fe_users table) and installed it and made a page with the plugin and when I
view the page I get a blank area where the plugin should appear - not a whole
blank page just the part where the plugin should appear. I put some echo
__FUNCTION__.__LINE__;
die; lines in all the listActions so if I was hitting any of them I'd at
least know which I was hitting. But I see no echo lines and I clearly never
hit a die; so I guess my extension is not hitting any action, maybe because I
have to specify one as the default. My extension has 4 models. How do I
specify what action gets called? I am using typo3 v4.5.30 with extbase.
Possibly you don't have included the typoscript template? Independent
from that the default controller and action is configured in
ext_localconf.php for plugins by:

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'VENDOR.' . $_EXTKEY,
'PluginName',
array(
'Controller' => 'list, show, new, ...',

),
// non-cacheable actions
array(
'FileUpload' => 'list, show, new, ...',

)
);

Regards, Jan
Jan Kornblum
2013-12-13 18:03:15 UTC
Permalink
Ups, i meant:

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'VENDOR.' . $_EXTKEY,
'PluginName',
array(
'ControllerX' => 'list, show, new, ...',
'ControllerY' => 'list, show, new, ...',
),
// non-cacheable actions
array(
'ControllerX' => 'list, show, new, ...',
'ControllerY' => 'list, show, new, ...',
)
);
Calgacus map Brude
2013-12-13 18:33:04 UTC
Permalink
Thanks for getting in touch, this is what I have, you are using the namespacey notation, should mine look that way in my version of typo3 - v4.5.30 with extbase 1.3.4:

<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}

Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'Bpscore',
array(
'Player' => 'list, show, new, create, edit, update, delete',
'Hall' => 'list, show, new, create, edit, update, delete',
'Hallplayers' => 'list, show, new, create, edit, update, delete',
'Hallvisits' => 'list, show, new, create, edit, update, delete',

),
// non-cacheable actions
array(
'Player' => 'create, update, delete',
'Hall' => 'create, update, delete',
'Hallplayers' => 'create, update, delete',
'Hallvisits' => 'create, update, delete',

)
);

?>
Calgacus map Brude
2013-12-13 19:29:00 UTC
Permalink
I had the priority option set to top in the ext builder. Also I had 4 models but only one listed as a front end plugin. I added all four models as front end models so now my ext_localconf looks like so:



Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'Bpshallplayers',
array(
'Player' => 'list, show, new, create, edit, update, delete',
'Hall' => 'list, show, new, create, edit, update, delete',
'Hallplayers' => 'list, show, new, create, edit, update, delete',
'Hallvisits' => 'list, show, new, create, edit, update, delete',

),
// non-cacheable actions
array(
'Player' => 'create, update, delete',
'Hall' => 'create, update, delete',
'Hallplayers' => 'create, update, delete',
'Hallvisits' => 'create, update, delete',

)
);

Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'Bpshalls',
array(
'Player' => 'list, show, new, create, edit, update, delete',
'Hall' => 'list, show, new, create, edit, update, delete',
'Hallplayers' => 'list, show, new, create, edit, update, delete',
'Hallvisits' => 'list, show, new, create, edit, update, delete',

),
// non-cacheable actions
array(
'Player' => 'create, update, delete',
'Hall' => 'create, update, delete',
'Hallplayers' => 'create, update, delete',
'Hallvisits' => 'create, update, delete',

)
);

Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'Bpshallvisists',
array(
'Player' => 'list, show, new, create, edit, update, delete',
'Hall' => 'list, show, new, create, edit, update, delete',
'Hallplayers' => 'list, show, new, create, edit, update, delete',
'Hallvisits' => 'list, show, new, create, edit, update, delete',

),
// non-cacheable actions
array(
'Player' => 'create, update, delete',
'Hall' => 'create, update, delete',
'Hallplayers' => 'create, update, delete',
'Hallvisits' => 'create, update, delete',

)
);

Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'Bpsplayers',
array(
'Player' => 'list, show, new, create, edit, update, delete',
'Hall' => 'list, show, new, create, edit, update, delete',
'Hallplayers' => 'list, show, new, create, edit, update, delete',
'Hallvisits' => 'list, show, new, create, edit, update, delete',

),
// non-cacheable actions
array(
'Player' => 'create, update, delete',
'Hall' => 'create, update, delete',
'Hallplayers' => 'create, update, delete',
'Hallvisits' => 'create, update, delete',

)
);

then once I removed the priority option and reloaded the extension and changed the page to point to one of the new frontend plugins it started working, calling the players listAction by default. Even though I pointed the page to the Hallplayers plugin. So, I guess I need to carve out some controllable actions in the ext builder front end advanced options. When I try that though the save fails as it doesn't like the format...
Calgacus map Brude
2013-12-13 19:39:55 UTC
Permalink
found the format typos. now it works.
Thanks

Loading...