Improve method makeCategorizable to be used everywhere
Method makeCategorizable is in charge of registering a table to be categorizable in the BE. The current implementation has the drawback to force the call of this method after the TCA of the table. If called before, the "categorization" wouldn't be applied because of timing issue. The patch improve the situation in this regard by postponing the application of the TCA responsible of categorization.
For more details about the method refer to t3lib_extMgm::makeCategorizable.
Updated by Fabien Udriot over 8 years ago
- Target version changed from 6.0.1 to 6.2.0
- PHP Version set to 5.3
To test the patch you could make this experiment.
Before applying the patch, in extension "foo", add this line at the top of ext_tables.php and notice there are no : Actually after a second test, it appears categorization is totally broken as of 6.1 following TCA refactoring. Patch resolves it.
categories key in TCA['foo']['columns']
# Actually, I have taken EXT:news/ext_tables.php as example \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable('news', 'tx_news_domain_model_file');
After applying the patch, you will see a field "categories" in TCA of table "foo" proving the use of the patch.
Updated by Francois Suter over 8 years ago
While looking at your patch, I discovered the
[SYS][defaultCategorizedTables] setting which isn't documented in the wiki. It doesn't work at all unless your patch is applied.
By default it is set to "pages,tt_content". If your patch is backported as is to 6.1, categories will suddenly appear in the pages and tt_content tables upon the next minor upgrade, but the database will not have been updated, thus creating SQL errors. I would suggest to remove this default setting from 6.1 and leave it only for 6.2.
I will open a thread in the core list about this.