PanelizerFieldPanelsStorage::access() calls entity access with incorrect operations and excludes cacheability metadata. This results in false negatives, and incorrectly cached access results.
Panels storage access operations different from entity access operations, yet the class maps them almost directly, with exception of the change layout operation.
No user account or entity cacheability metadata is included in the access result, which means that dependent data, such as render arrays, is not cleared from the cache when the target entity or the user are updated, for instance.
Comments
Comment #2
xanoComment #4
dsnopekThanks! In general, the patch looks good. It looks like the tests might need to be updated, though?
Comment #5
xanoAnd here's the updated test. I wanted to see what would break first.
This makes the tests pass, but does not yet test whether cacheability metadata is bubbled up properly. That requires a more invasive change of the existing test methods, as the API's required data types (
AccessResultInterface,AccountInterface) does not provide this metadata by default.Comment #6
arknoll commentedTested. Works well. Also moving to a high priority. Without this editing panels panes fails for anyone except users with very high node access privileges.
Comment #7
sk33lz commentedThe patch in #5 still works with the latest 3.x-dev release from Oct. 14th. I just applied it with no issues.
Comment #8
dsnopek+1 on this - just need a passing test build (I queued a new one in case this was just a Drupal 8.3.x failure)
Comment #10
dsnopekCommitted! Thanks, Xano, and everyone who tested!