Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
According to entity.api.php, 'description' is optional in hook_entity_property_info(), however, not defining it results in 'undefined index: description' notices. See #1398114: Undefined index notices.
Comments
Comment #1
XanoAlso, if there are titles/labels, descriptions should (almost) never be required, because if the title is descriptive enough, the description property is simply redundant. Requiring it would mean the title and description are identical, which is useless.
The same issue exists when building forms or when defining permissions. They have a title and an optional description (permissions only after a patch, because their required descriptions caused duplication and a cluttered interface).
Comment #2
fagoAgreed, so yep they are optional.
Comment #3
sammyd56 CreditAttribution: sammyd56 commentedSo we are agreed that 'description' should be optional, so what are we supposed to do about the notices that are reported when it is not defined?
Notice: Undefined index: description in EntityDefaultViewsController->map_from_schema_info() (line 391 of /var/www/drupal/sites/all/modules/entity/views/entity.views.inc).
Comment #4
fagoadd a check - I've done so, what should fix the issue.