Project

General

Profile

Actions

Bug #87057

closed

Plugin added via TypoScript throws an error.

Added by Anu Bhuvanendran Nair almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2018-12-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
TYPO3,TypoScript
Complexity:
medium
Is Regression:
Sprint Focus:

Description

In TYPO3 v9, plugin added via typoScript throws an exception, ie 'Default controller for the plugin cannot be determined. Please check configurePlugin in ext_localconf.php'.

Usually, there will be a spelling mistake or syntax error which leads to this category of error. But this time it is not. The same plugin runs flawlessly as a content element in the page.
On further investigation, found out that function getConfiguration() in 'sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php', reads two config arrays regarding the plugin which is $frameworkConfiguration[] and $pluginConfiguration[]. In case of plugin added via typoScript, frameworkConfiguration array fails to fetch the default controller from ext_localconf.php which in turn leads to this error.

#1316104317 TYPO3\CMS\Extbase\Mvc\Exception
The default controller for extension "*****" and plugin "*****" can not be determined. Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.

Below is the TS code added in root.

page.1000 = USER
page.1000 {
 userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
 extensionName = *****
 pluginName = *****
 vendorName = ******
 settings {
   flexform {
     compliance = opt-in
     link {
       value = a_random_page_id
     }
   }
 }
}

Please find below, the code from which the mentioned error is being generated. sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php


    /**
     * Loads the Extbase Framework configuration.
     *
     * The Extbase framework configuration HAS TO be retrieved using this method, as they are come from different places than the normal settings.
     * Framework configuration is, in contrast to normal settings, needed for the Extbase framework to operate correctly.
     *
     * @param string $extensionName if specified, the configuration for the given extension will be returned (plugin.tx_extensionname)
     * @param string $pluginName if specified, the configuration for the given plugin will be returned (plugin.tx_extensionname_pluginname)
     * @return array the Extbase framework configuration
     */
    public function getConfiguration($extensionName = null, $pluginName = null)
    {

     ....

        \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($frameworkConfiguration, $pluginConfiguration);
        // only load context specific configuration when retrieving configuration of the current plugin
        if ($extensionName === null || $extensionName === $this->extensionName && $pluginName === $this->pluginName) {
            $frameworkConfiguration = $this->getContextSpecificFrameworkConfiguration($frameworkConfiguration);
        }

        //Patch added by PITS 09/11/18
        if(empty($frameworkConfiguration['controllerConfiguration'])){
            $frameworkConfiguration['controllerConfiguration'] = $pluginConfiguration['controllerConfiguration'];
        }
    ....
    }

Actions #1

Updated by Anu Bhuvanendran Nair almost 6 years ago

  • Tags changed from TYPO3, to TYPO3,TypoScript
Actions #2

Updated by Rémy DANIEL almost 6 years ago

Hi
I thought I encounter this issue, but no.
In my case, the controllerConfiguration was blank because my tt_content had an invalid pi_flexform value.
The tt_content was of another type that was changed, and the switchableControllerActions went wrong for the new "list_type".
Deleting and recreating the tt_content from scratch solved the issue.

Actions #3

Updated by Benni Mack over 5 years ago

  • Status changed from New to Needs Feedback

Does this solve your issue?

Actions #4

Updated by Benni Mack over 5 years ago

  • Target version changed from next-patchlevel to Candidate for patchlevel
Actions #5

Updated by Riccardo De Contardi over 5 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Anu Bhuvanendran Nair)
  • Target version deleted (Candidate for patchlevel)

No feedback since the last 90 days => closing this issue.

If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or ping me.

Thank you and best regards

Actions

Also available in: Atom PDF