backdrop-contrib / paragraphs

Paragraphs module to control your content flow
https://backdropcms.org/project/paragraphs
GNU General Public License v2.0
5 stars 11 forks source link

Add `'property_type'` and `'property_callbacks'` keys and values to paragraphs field definition #117

Closed argiepiano closed 2 years ago

argiepiano commented 2 years ago

Paragraphs needs to include 'property_type' and 'property_callbacks' keys and values in the field definition array found in the paragraphs_field_info().

Interestingly, these were removed when porting the module to Backdrop.

These keys are necessary to allow metadata wrapper access AND token access to all paragraphs fields Without these, you can't access field values with entity_metadata_wrapper, and the tokens are severely limited and non-functional.

This is just two lines, very simple. PR coming.

argiepiano commented 2 years ago

PR #118 . I found this issue when testing tokens (entity_token can't fulfill tokens for paragraph fields unless the this metadata property info is there). I also fixed a call to entity_metadata_field_get_language, which does not exist.

argiepiano commented 2 years ago

Additionally, without these two lines, Rules can't select, operate on, or access/set Paragraphs fields in its entry widgets.