Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
TODO: Provide an alternative which returns GeneratedUrl objects instead
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | 2708055-2.patch | 2.72 KB | dawehner |
Comments
Comment #2
dawehnerThis one is tricky, maybe something like that?
Comment #3
dawehner.
Comment #5
Wim LeersComment #6
tim.plunkettYou'll need to replace this '/' with an object. And also worry about converting it to an object in set()
or
return $this->destination->toString($collect_bubbleable_metadata);
Comment #7
dawehnerYeah I'm not sure yet how to properly achieve this for all cases. Do you agree though with the general direction?
Comment #10
yched CreditAttribution: yched commentedComing from #2847972: Missing context on UserLoginBlock causes render-cache poisoning of the "destination", which adds a missing 'url.query_args' cache context in UserLoginBlock.
I was a bit baffled that the following code in UserLoginBlock::build() :
$form['#action'] = $this->url('<current>', [], ['query' => $this->getDestinationArray(), 'external' => FALSE]);
automatically adds the 'route' cache context required by the '
<current>
' route,but leaves it to the consuming code to account for the cache contexts needed for the getDestinationArray() call.
It seems this issue might be able to do something about it, by allowing the various "if" branches in RedirectDestination::get() to add relevant cache metadata ?
Or maybe I'm understanding this issue incorreclty and it's shooting for something else entirely ?