FluidTYPO3 / flux

TYPO3 extension Flux: Dynamic Fluid FlexForms
https://fluidtypo3.org
146 stars 213 forks source link

xclassing tceform causes problems with other extensions #125

Closed arnekolja closed 11 years ago

arnekolja commented 11 years ago

I recently stumbled across a problem that might be a bigger one.

Whenever using flux, calendar base ("cal") and news system ("news") together, some hooks of news system don't work correctly. Their hook methods' signatures require an object of type t3lib_TCEforms where Tx_Flux_Override_Backend_Form_FormEngine is given.

I reported a bug (http://forge.typo3.org/issues/47559), but it seems like it's not "their problem". Do you think it's possible to solve this flux-side? If not, then there's a general compatibility problem on one or the other side.

Here's an example for an error:

PHP Catchable Fatal Error: Argument 8 passed to Tx_News_Hooks_Tceforms::getSingleField_preProcess() must be an instance of t3lib_TCEforms, instance of Tx_Flux_Override_Backend_Form_FormEngine given, called in /opt/typo3/typo3_src-6.0.4/typo3/sysext/backend/Classes/Form/FormEngine.php on line 1001 and defined in /var/customers/webs/mycustomer/typo3conf/ext/news/Classes/Hooks/Tceforms.php line 47

Interestingly it happens only in combination with more than one of the extensions. news itself works, cal itself works, but as soon as both are installed, the errors occur.

NamelessCoder commented 11 years ago

Hi Arne,

Would you mind confirming that changing this line:

https://github.com/FluidTYPO3/flux/blob/master/Classes/Override/Backend/Form/FormEngine.php#L33

To:

class Tx_Flux_Override_Backend_Form_FormEngine extends t3lib_TCEforms {

...fixes the problem completely (after clearing reflection caches etc. to allow proper rebuild)?

Cheers, Claus

NamelessCoder commented 11 years ago

Closing due to inactivity - assuming the merged fix solves the problem, which it should, being the universal solution :)