Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use foreign_field / foreign_table_field for configuration #804

Open
nhovratov opened this issue May 16, 2024 · 2 comments
Open

Use foreign_field / foreign_table_field for configuration #804

nhovratov opened this issue May 16, 2024 · 2 comments

Comments

@nhovratov
Copy link
Contributor

The inline field calendarize does not make use of modern relation fields foreign_field and foreign_table_field. Relations are stored as CSV list. This is probably due to the age of this extension. I would highly recommend to migrate this field (Needs UpgradeWizard). By doing so we benefit from proper reference index entries and generally better support for state of the art relations.

$GLOBALS['TCA'][$tableName]['columns'][$fieldName] = [
'label' => 'Calendarize',
'l10n_mode' => 'exclude',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_calendarize_domain_model_configuration',
'minitems' => $configuration['required'] ? 1 : 0,
'maxitems' => 99,
'behaviour' => [
'enableCascadingDelete' => true,
],
],
];

https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Inline/Properties/ForeignField.html
https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Inline/Properties/ForeignTableField.html

@lochmueller
Copy link
Owner

Yes, you are right. Feel free to write an upgrade wizard (also for tables, that use calednarize in your own models).
Regards,
Tim

@nhovratov
Copy link
Contributor Author

I already tried to override it, but the Indexer still expects a CSV value and writes incorrect index records. So this place also needs to be adjusted. Maybe I can have a look someday, but right now I am very busy with Content Blocks. Btw it works really great together to create a custom event type on top of the default event. Maybe I can write I guide about that.

Thanks for the great extension! Really like the possibility to extend with own Models 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants