Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Error in combination with EXT:mask and/or itemsProcFuncs #2132

Closed
rfuehricht opened this issue Sep 5, 2023 · 3 comments
Closed

Fatal Error in combination with EXT:mask and/or itemsProcFuncs #2132

rfuehricht opened this issue Sep 5, 2023 · 3 comments

Comments

@rfuehricht
Copy link

Hi!

I am currently upgrading a legacy project to TYPO3 v12 and noticed that EXT:flux and EXT:mask do not work together.

Mask adds some itemsProcFuncs to TCA. Flux breaks because it seems that it expects the Classes used to implement the FormDataProviderInterface of the core.

See Classes/Integration/MultipleItemsProcFunc.php:

public function execute(array &$parameters, FormDataProviderInterface $formDataProvider): void

Why those classes must implement FormDataProviderInterface? AFAIK, this is not expected by TYPO3 Core, at least the examples here do not state that:

https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/CommonProperties/ItemsProcFunc.html#tca-property-itemsprocfunc

Kind regards,
Reinhard

@NamelessCoder
Copy link
Member

Flux expects that the caller of the class is an instance of FormDataProviderInterface which it is, when called from the TYPO3 core. If this method does not receive an instance of that interface as second argument, then the replacement implementation that is calling the method is doing so in an incompatible way and it would break any implementation - not just the one in Flux - if that implementation uses strict types like Flux does.

You're welcome to provide more background information about this, such as the specific error, but I'm almost certain that the problem is EXT:mask - not Flux. In order to be correctly compatible, EXT:mask should be passing the second argument that it gets for its itemsProcFunc, as second argument to any itemsProcFunc it calls after that.

@rfuehricht
Copy link
Author

Your explanation is totally correct.

I will ask for a fix in EXT:mask then.

Thank you very much for the quick answer.

@NamelessCoder
Copy link
Member

Fixed in EXT:mask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants