backdrop-contrib / entity_plus

This module wraps in a variety of additional entity-related functionality from various sources. Partial port of D7 Entity API.
https://backdropcms.org/project/entity_plus
GNU General Public License v2.0
3 stars 11 forks source link

Trying to access property 'type' of file entities with a wrapper produces fatal errors #136

Closed argiepiano closed 1 year ago

argiepiano commented 2 years ago

Apparently the properties of file entities are not defined correctly for metadata wrappers. This may be a legacy of D7, as file entities were not full-fledged entities.

Edit: All properties except type are defined in Entity Plus' file system.info.inc. Property type needs to be added there (this property was added in D7 by the file_entity module

argiepiano commented 2 years ago

PR #137

@laryn, @hosef - this is a very simple PR that adds metadata for the type property for file entities. In D7 this metadata was added by the contrib module file_entity.

I'll wait a few days before merging in case you want to test or have feedback. I copied-pasted (and slightly adapted to match the function names in B) from file_entity.

laryn commented 1 year ago

For posterity, here's the file_entity version.

LGTM :+1:

argiepiano commented 1 year ago

Thank you, @laryn!