Bug #68106
closedcf_extbase_datamapfactory_datamap created wrong with sys_categories
0%
Description
In my controller I create a constraint for my query that looks like this:
$constraints[] = $query->contains('course.categories', $category);
The property "categories" of my model "course" is created in ext_tables.php via \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable. When I try to filter the results in the frontend I get the following error message:
Unsupported or non-existing property name "categories" used in relation matching.
After manually clearing the table cf_extbase_datamapfactory_datamap it works until the table is created again. I think this is due to a wrong behaviour which creates the table before the full TCA for the model is loaded including the sys_categories. After manually adding the configuration for sys_categories in the column section of the model's TCA the table is created correct every time.
Updated by Frederic Gaus over 9 years ago
TCA schould be loaded completely! Always and automatically. Do you use this within eID. Extbase & eID schould not be used.
Updated by Benni Mack over 4 years ago
- Status changed from New to Needs Feedback
We've reworked the datamapper in v9 and v10, so this issue should not exist anymore. Can you confirm that this isn't an issue in v9/v10 anymore?
Updated by Stephan Großberndt over 4 years ago
The call to makeCategorizable() must be located in an extension’s Configuration/TCA/Overrides folder (or ext_tables.php file before TYPO3 CMS 6.2.1).
https://docs.typo3.org/m/typo3/reference-coreapi/8.7/en-us/ApiOverview/Categories/Index.html
Updated by Riccardo De Contardi over 4 years ago
- Status changed from Needs Feedback to Closed
No feedback since the last 90 days => closing this issue.
If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one.
Thank you and best regards