Problem/Motivation
Drupal 10.2.0 introduces a new concept to cache things with cache contexts using the new VariationCache. This change breaks the way profile manager caches its toolbar subtrees with a fatal error:
The complete set of cache contexts for a variation cache item must contain all of the initial cache contexts
Further, the hash calculated for toolbar subtrees should not include array values (link urls) in its calculation as this can lead to false access denied under certain circumstances. See #3130197: Faulty toolbar subtree hash breaks asynchonous loading of admin menu content for more information, that issues deals with the same problem but inside the toolbar module. This issue happens with the toolbar module for example if wse is appending the workspace id to all links via its path processor.
Steps to reproduce
On a site that used profile_manager and its toolbar on Drupal 10.1 or below, update to Drupal 10.2
Proposed resolution
Create the cacheability based on the render array. Also use only the array keys of a toolbar subtree for hash calculations.
Issue fork profile_manager-3412512
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
Comment #4
tim bozeman commentedThank you for researching this. It definitely gets things going again.