- Issue created by @srishtiiee
- Status changed to Needs review
about 1 year ago 1:55pm 24 August 2023 - last update
about 1 year ago 30,058 pass - Status changed to RTBC
about 1 year ago 2:27pm 24 August 2023 - 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺
@amateescu LGTM!
P.S.: I do think it's still slightly confusing, but this is out of scope. What do you think, @amateescu and others?
+++ b/core/lib/Drupal/Core/Field/FieldTypeCategoryManager.php @@ -79,6 +79,17 @@ protected function getDiscovery(): YamlDiscovery { + if (!isset($definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY])) { + throw new \LogicException('Missing fallback category.'); +++ b/core/modules/comment/comment.module @@ -789,9 +789,7 @@ function comment_entity_view_display_presave(EntityViewDisplayInterface $display + // The `comment` field type belongs in the `general` category, so the ... + $definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'comment/drupal.comment-icon';
This is the thing that makes it confusing IMHO: the constant says "fallback", but it's really the "general" category.
Renaming the constant would make this clearer.
And we can still do that because this didn't ship in any release!🤞🤓
- Status changed to Fixed
about 1 year ago 2:45pm 24 August 2023 - 🇫🇮Finland lauriii Finland
I think we called it a fallback category because it has some special functionality, see
\Drupal\Core\Field\FallbackFieldTypeCategory
. It's also not rendered like other categories. Items in this category are rendered on their own, without a category, meaning it's not a real category. If we want to consider renaming or changing it, let's do that in a follow-up issue.Committed 1ea295c and pushed to 11.x. Thanks!
Automatically closed - issue fixed for 2 weeks with no activity.