Bug #94469
closedDependency Injection fails in UserFunc breaking copy in the BE
0%
Description
We got a DoktypeFilter in the BE which is used for TCA type group to filter the selection of pages.
The class has a construct with another class with methods to handle the filter.
The dependency injection fails as it seems when copying e.g. content in the BE.
This means the UserFunc filter affects the copy process, while it does fully work at its task to filter.
The Exception (attached) is only thrown via ListModule.
In the PageModule the copy fails silent // the exception is thrown in the XHR but not displayed
Files
Updated by Henrik Elsner over 3 years ago
UPDATE:
Either i got a config issue on my side or the same behavior can be watched when using the button bar hook to add buttons:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['Backend\Template\Components\ButtonBar']['getButtonsHook']
I added a class via this registration which calls the same stack resulting in the same error.
Updated by Oliver Bartsch over 3 years ago
- Status changed from New to Needs Feedback
Hi, this basically means autowiring does not work as those are instantiated with GeneralUtility::makeInstance()
. Therefore, you have to declare those services public in your Services(.yaml|.php) configuration.
See https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/DependencyInjection/Index.html#knowing-what-to-make-public for more information.
Could you please check if this solves the issue for you?
Updated by Riccardo De Contardi almost 3 years ago
- Status changed from Needs Feedback to Closed
No feedback since a long time => closing the issue.
If you think that this is the wrong decision or there is still work that should be done here, please reopen it or open a new issue with a reference to this one.
Thank you.