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.
The protection works if the file field is directly attached to the node. If it is in i.e. a field collection, I get:
Notice: Undefined property: stdClass::$type in jplayer_protect_file_download()
Comment | File | Size | Author |
---|---|---|---|
#1 | field_collection_protect-2014493-1.patch | 723 bytes | old_toby |
Comments
Comment #1
old_toby CreditAttribution: old_toby commentedAs the field is not attached to an entity type but to a field name, I included a check if an entity type is given, and if not, it takes the field_name as the context.