How can I get rid of “No XCLASS inclusion code found in file 'pi1/class.tx_xxxxx_pi1.php''”?

StackOverflow https://stackoverflow.com/questions/3981423

  •  09-10-2019
  •  | 
  •  

Question

Typo3 - Question:

In the extensionmanager when you click on "Information" there often is a (red) error which reads like this: "No XCLASS inclusion code found in file xxxxx".

Especially when developing an extension I am looking for a way to fix this this. Any ideas?

Was it helpful?

Solution

You need to add the neccessary code in the bottom of your extension code. The extension kickstarter produces one for you, or you could snatch and adapt one from another extension, just make sure you don't change anything but the name of the class/path etc, as there doesn't seem to be much of a fuzzy logic to recognize the XCLASS statements.

OTHER TIPS

Yes, norwebian's answer is right. I just want to add that XCLASS is a concept for extension to extend other extension's (or core) classes. t3lib_div::makeInstance() takes care of this and looks, whether another class added itself as an XCLASS for this particular class, which should be instantiated.

Thanks for the answers! Here is the code that I found, that has to go in the class files:

if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/extkey/pi1/class.tx_extkey_pi1.php']) {
     include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/extcey/pi1/class.tx_extkey_pi1.php']); 
} 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top