[TYPO3-dev] Extbase (6.1) Command Controller StoragePid/Settings CLI issue
g4-lisz at tonarchiv.ch
g4-lisz at tonarchiv.ch
Wed Nov 27 13:11:44 CET 2013
On 11/26/2013 01:16 PM, Alexander Bigga wrote:
> Hi Till,
>
> Am 26.11.2013 13:02, schrieb g4-lisz at tonarchiv.ch:
>
>> CLI runs in backend, so plugin setup shouldn't matter. I did set it
>> anyway, i just did not mention it.
> Ah, sorry. I missunderstood your Command Controller. You're absolutely
> right, for CLI and/or scheduler tasks, you don't need the plugin setting.
>
>> Typoscript browser shows me the constants i did set.
>>
>> I think it's not about my TS, but more the configuration manager not
>> properliy working when a CommandController is used from CLI.
>>
>> I just updated from 6.1.4 to 6.1.5... still not working.
> I read, that for this configuration, you need to set module.* AND make
> to make sure, that your template is added to your _root_ template.
>
> The later is not possible in my configuration. So I need to pass the
> storagePid as argument to my CLI task.
>
> Inside my command controller, I set the storagePid like this:
>
> // set storagePid to point extbase to the right repositories
> $configurationArray = array(
> 'persistence' => array(
> 'storagePid' => $storagePid
> )
> );
> $this->configurationManager->setConfiguration($configurationArray);
>
>
> I haven't found a cleaner solution yet.
>
> Best regards,
>
> Alexander
I missed this two lines in my BE setup in ext_tables.php:
if (TYPO3_MODE === 'BE') {
.....
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY,'setup','<INCLUDE_TYPOSCRIPT:
source=FILE:EXT:stdapp/Configuration/TypoScript/setup.txt>');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY,'constants','<INCLUDE_TYPOSCRIPT:
source=FILE:EXT:stdapp/Configuration/TypoScript/constants.txt>');
}
Now, everything works perfectly!
Cheers
Till
More information about the TYPO3-dev
mailing list