Bug #42963

preProcess() hook invoking in some extensions in PageLayoutViewDrawItemHook fails

Added by Frank Gerards over 2 years ago. Updated 7 months ago.

Status:Closed Start date:2012-11-14
Priority:Won't have this time Due date:
Assigned To:- % Done:

0%

Category:Backend User Interface Spent time: -
Target version:6.0.1
TYPO3 Version:6.0 Is Regression:No
PHP Version:5.3 Sprint Focus:
Complexity:medium

Description

I noticed, that at least in two extension in my test system (FLUX and tx_damttcontent) there were errors in the page module display in the backend,
that had the same structure:

<MyExtensionHookClass>::preProcess() must be compatible with that of TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface::preProcess()...

I looked into both extension hook classes and found the parameters be the same and are matching the interfaces' declaration:

Extensions preProcess() parameters: tx_cms_layout &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row
Core Interface Class requirements: \TYPO3\CMS\Backend\View\PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row

the tx_cms_layout object type is also mapped on the right namespace path.

Can anybody investigate, why this error occurs although the preProcess-functions in the extensions have the right declaration ?

I consider this a major issue for all extensions that hook into the backend page module.


Related issues

related to Core - Bug #43451: Existing implementation of txCmsLayoutDrawItemHook fails ... Closed 2012-11-29

History

#1 Updated by Philipp Maas over 2 years ago

I've noticed a similar issue with the gridelements extension:

Fatal error: Declaration of tx_gridelements_drawItemHook::preProcess() must be compatible with that of TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface::preProcess() in ...

UPDATE 2012-11-28 13:36: the issue still exists in final release (6.0.0)

#2 Updated by Philipp Maas over 2 years ago

  • Target version changed from 6.0.0-RC2 to 6.0.1

#3 Updated by Helmut Hummel over 2 years ago

  • Status changed from New to On Hold
  • Priority changed from Must have to Won't have this time

There a re three ways you can get around that problem:

  1. Update PHP to any version higher than 5.3.6 (which is a requirement for TYPO3 6.0)
  2. Change the hook registration that it does not include a filename (make sure it is found by the autoloader) so that the compatibility autoloader can step in and rewrite the class
  3. Change the class to have the new interface name when used with 6.0

#4 Updated by Mathias Schreiber 7 months ago

  • Status changed from On Hold to Closed
  • Is Regression set to No

Also available in: Atom PDF