- Issue created by @mvonfrie
A webform with a source entity (i. e. using the webform_group module) gets cached for anonymous users with max age -1 not respecting the source entity. If it is defined via query string parameters for the entity.webform.canonical
route using Drupal\webform\Plugin\WebformSourceEntity\QueryStringWebformSourceEntity
, the first user calling /form/[webform_name]?source_entity_type=[entity_type]&source_entity_id=[entity_id]
with entity id 4 (label: "Group A") after rebuilding caches sees "Group A", the next user calling the same url but with entity id 19 (label: "Group X") should see "Group X" but sees "Group A".
/form/[webform_name]?source_entity_type=[entity_type]&source_entity_id=[entity_id]
and check the title.There are two options:
entity.webform.canonical
and eventually other affected routes like webform preview) when the request includes query string parameters defined by Drupal\webform\Plugin\WebformSourceEntity\QueryStringWebformSourceEntity
. Maybe this should be made controllable via an option per webform.Drupal\webform\Plugin\WebformSourceEntity\QueryStringWebformSourceEntity
, add corresponding cache tags for the source entity, to cache requests depending on them. I'm not sure though, if this works correctly with query string parameters for browsers and proxies.Active
6.2
Code