Skip to content
Snippets Groups Projects
Commit f60ef0ef authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Fix the fields in news localizations in the backend

parent 865b8be6
No related branches found
No related tags found
1 merge request!8Feature upgrade to9 lts
......@@ -338,10 +338,9 @@ call_user_func(
);
$GLOBALS['TCA'][$table]['palettes']['titleDescriptionAndHighlightFlag'] = [
'showitem' => 'title,
--linebreak--, slug,
--linebreak--, subtitle;' . $localLangDbPath . $table . '.subtitle.inPalette,
'showitem' => 'subtitle;' . $localLangDbPath . $table . '.subtitle.inPalette,
--linebreak--, description,
--linebreak--, slug,
--linebreak--, tx_realurl_pathsegment, tx_realurl_exclude,
--linebreak--, tx_sgnews_highlighted, tx_sgnews_never_highlighted',
'canNotCollapse' => 1,
......@@ -369,6 +368,34 @@ call_user_func(
$GLOBALS['TCA'][$table]['types'][117]
);
}
if (\version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '>')) {
// if TYPO3 9.5, exclude a lot of fields from the news doktype in localizations
foreach (
$GLOBALS['TCA'][$table]['columns'] as $languageExcludeField => $_
) {
if (
!\in_array($languageExcludeField, [
'doktype',
'subtitle',
'description',
'slug',
'author',
'tx_sgnews_location',
'tx_sgnews_teaser1_image',
'tx_sgnews_teaser2_image',
'abstract',
'tx_projectbase_seo_titletag',
'tx_projectbase_seo_canonicaltag',
'hidden',
'starttime',
'endtime'
])
) {
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides'][$languageExcludeField]['l10n_mode'] = 'exclude';
}
}
}
}, 'sg_news', 'pages'
);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment