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.
When using the deploy_revisions branch of deploy, the _uuid_services_entity_access function in uuid_services does a check to ensure that the user has permissions to perform the operation on the entity. If you are deploying a revision of a field collection, this access callback returns false in isolation (since the field collection entity is created separately from the parent node when using deploy). This small patch fixes this issue.
Comment | File | Size | Author |
---|---|---|---|
uuid_services_field_collection_revisions.patch | 816 bytes | timaholt | |
Comments
Comment #1
joseph.olstadRTBC ++
Comment #3
joseph.olstadI know this one will pass the bot tests again on retest because I recently tested it myself.
Marking this as RTBC
we're using uuid revision a7bf2db with this patch (and several others)
We've been using this patch for 8 months at least and most recently on the newer revision of uuid. Lets commit.
Comment #4
skwashd CreditAttribution: skwashd at Dave Hall Consulting for Pfizer, Inc. commentedIsn't the result of this that there is no access check performed when deploying field collections?
Comment #5
joseph.olstadYes skwashd it looks that way, I will notify colleague about this and follow up
Comment #6
joseph.olstadThe description explains it, see issue explanation above
Comment #7
skwashd CreditAttribution: skwashd at Dave Hall Consulting for Pfizer, Inc. commentedI like to avoid module specific hacks in UUID.
I'd like to propose a different approach. In uuid_services implement
hook_entity_info_alter()
to change the access callback forfield_collection_item
. The new callback checks if the parent entity is empty and if it is it returnsTRUE
otherwise it callsfield_collection_item_access()
.Comment #8
skwashd CreditAttribution: skwashd at Dave Hall Consulting for Pfizer, Inc. commentedAdding a check for the presence
$entity->uuid_services
would ensure that this is firing when the entity is coming from UUID Services.Comment #9
BoobaaAs the contrib-related parts have been stripped off from UUID to UUID Extras (well, only partially), I had to roll a patch against UUID Extras to be able to actually utilize the Deploy module for pushing nodes with field_collections. So this work from #1817956-42: Field collection support might be needed for additional work on this issue. TL;DR: Neither Deploy nor Field Collection themselves are affected, but both UUID and UUID Extras needs patching. Some additional work might be needed for the revision- and access-related parts.