Bug #45092

Allow disabling the default MediaWizardProvider

Added by Alexander Stehlik over 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2013-02-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

At the moment it does not seem possible to disable the default MediaWizardProvider

TYPO3\CMS\Frontend\MediaWizard\MediaWizardProvider

This also makes it impossible to use custom renderers in TYPO3\CMS\Frontend\ContentObject\MediaContentObject for all URLs that this renderer can handle.

I already tried to extend the MediaWizardProvider with the configuration in

$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Frontend\\MediaWizard\\MediaWizardProvider']

This does not work because:

  1. when I put it in the ext_localconf.php file of my extension (mediaoembed) the configuration file of the cms extension that registers the MediaWizardProvider gets always loaded before the configuration file of the extension, so it does not know about the overwritten class.
  2. when I put it my global AdditionalConfiguration.php the overwritten class configuration gets recognized but the class loader will throw an exception because the mediaoembed extension is not loaded (yet).

As far as I can see, there are several approaches to solve this.

  1. Do not call \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance() when calling \TYPO3\CMS\Frontend\MediaWizard\MediaWizardProviderManager::registerMediaWizardProvider(). This is just too early. There needs to be some initialization method in the MediaWizardProviderManager that gets called one time at the beginning of getValidMediaWizardProvider(). This would make sure that the class overwriting system is fully initialized.
  2. Add a configuration variable for LocalConfiguration.php to disable the registration of the default MediaWizardProvider

Maybe even both solutions should be implemented.

Do you have any input on this? Otherwise I will start writing a patch.

Would this be a bugfix or a feature?


Related issues

Related to TYPO3 Core - Bug #56336: Prevent Inclusion of MediaWizardProvider* in Base BootstrapClosed2014-02-26

Actions
#1

Updated by Alexander Stehlik over 9 years ago

I just realized, that I can register my own provider that always returns TRUE in canHandle(). But this does not help.

As soon as a valid media provider was found, the $renderType gets overwritten and I can't use my own renderer any more :(

#2

Updated by Gerrit Code Review over 9 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17996

#3

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17996

#4

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17996

#5

Updated by Gerrit Code Review about 9 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17996

#6

Updated by Christian Kuhn about 8 years ago

  • Description updated (diff)
  • Status changed from Under Review to Closed
  • Is Regression set to No

resolved with the related issue.

Also available in: Atom PDF