Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Define the property type when the field is not stored n the database in order to be selectable in the Search API index fields.
Comment | File | Size | Author |
---|---|---|---|
#7 | 0001-Issue-1514848-by-skipyt-fgm-Define-the-property-type.patch | 20.45 KB | fgm |
#4 | 1514848-rewrite_property_callback.patch | 2.57 KB | skipyT |
#1 | 1514848-rewrite_property_callback.patch | 2.21 KB | skipyT |
Comments
Comment #1
skipyT CreditAttribution: skipyT commentedI created a patch which sets the property type even if the field is not stored in the database.
Comment #2
laurentchardin CreditAttribution: laurentchardin commentedI think the main reason we need to do that is because it raises an EntityMetadataWrapperException : Unknown data property... for such fields.
Am i right skipyT ?
Edit: silly me, it was another issue: #1414282: Support for entity_metadata_wrapper()
Comment #3
jsacksick CreditAttribution: jsacksick commentedI think you need to replace that line :
$field['settings']['database']['data_type']
by$field_type['property_type'] = $property_types[$field['settings']['database']['data_type']];
+ the getter callback should return the value coming from the computed function.Comment #4
skipyT CreditAttribution: skipyT commentedHi,
I modified the previous patch file after jsacksick review.
New patch file attached.
Comment #5
cmoldovan222 CreditAttribution: cmoldovan222 commentedIt seems ok for me.
Comment #6
fgmThis patch contains both an error and a performance issue. Rerolling
Comment #7
fgmComment #8
colanNew features go into the latest dev branch. This is not critical as the module will still work without it.