Active
Project:
Commerce Product Permissions by Type
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2017 at 12:34 UTC
Updated:
12 Mar 2023 at 15:58 UTC
Jump to comment: Most recent
Comments
Comment #2
joachim commentedOn further reading, I don't think this can be right, since AccessResult::addCacheableDependency() comes from
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Cache%21R... and looking at that code, if you pass in a non-object (such as the $form array), then you get this:
Comment #3
joachim commentedInstead of
should maybe be:
?
Which would give us overall:
I'm still fairly mystified by the whole cache context system though, so this is a bit of a guess.
Comment #4
zerolab commentedThis whole bit happens in
commerce_product_permissions_by_type_form_commerce_order_item_add_to_cart_form_alter()It does not return any access result. Instead
$form['#access']is changedshould become just:
Comment #6
joachim commentedLast commit added a debug call to ksm().
Comment #8
erik.erskine commentedRemoved the ksm()!
Comment #9
damienmckennaIs there anything remaining on this or is it working correctly now?