Problem/Motivation

It seems that AccessResult returned by ReorderChildrenAccess is making the block non cachable as max-age is set to 0
This is breaking dynamic cache.
I think it would be good to add have catchable meta

Steps to reproduce

Visit any node page which has local task block enabled.
For authenticated users dynamic-drupal-cache always becomes UNCACHEABLE

Proposed resolution

Add cachability metadata

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mohit_aghera created an issue. See original summary.

mohit_aghera’s picture

Assigned: Unassigned » mohit_aghera
Status: Active » Needs work

larowlan’s picture

Anyway we can add a test for this?
And if so, would be keen to see if user.permissions works instead of user

mohit_aghera’s picture

Assigned: mohit_aghera » Unassigned
Status: Needs work » Closed (cannot reproduce)

After digging through the cacheable metadata, I came across that issue was not related to this module.
I think we can close this issue.

I tested one test-only patch and it was working fine.

acbramley’s picture

Title: Adding cachable metadata on ReorderChildrenAccess results » ReorderChildrenAccess results in uncacheable pages
Category: Task » Bug report
Status: Closed (cannot reproduce) » Active

This is still an issue https://git.drupalcode.org/project/entity_hierarchy/-/blob/3.x/src/Routi...

This effectively makes every node page uncacheable by DPC for users with access to the Children tab.

acbramley’s picture

Issue summary: View changes
acbramley’s picture

Rebased and removed the cache contexts. From manual testing I don't see a local task on non parentable pages, let's see if anything fails.

acbramley’s picture

Status: Active » Needs review

acbramley changed the visibility of the branch 5.x to hidden.