Are there any updates on this topic? A short statement from the maintainers would be highly appreciated :) Thank you!
Are there any plans on this topic? A short statement from the maintainers would be highly appreciated :) Thank you!
Ah, that's interesting! Maybe this commit from 9.5.4 is related to it, at least it's about view pagers: https://git.drupalcode.org/project/drupal/-/commit/3664a3d4b49f900f617d9...
I think I have found the bug.
It's inside the "template_preprocess_calendar_view_pager" preprocess function, where the query params are "merged" with the correct "calendar_timestamp" param for the next/prev/reset link:
'#url' => Url::fromRoute($route_name, [], [
'query' => $parameters + ['calendar_timestamp' => $parameters['next']],
]),
The order of this "+" operator is wrong. PHP documentation:
The + operator returns the right-hand array appended to the left-hand array; for keys that exist in both arrays, the elements from the left-hand array will be used, and the matching elements from the right-hand array will be ignored.
As the "calendar_timestamp" key was already inside $parameters, the intended override didn't work. The fix is easy, just revert the order.
Why you can't reproduce this bug @matthieuscarset is weird though...
I disabled all caches just to make sure that it's not related to that, but the issue is still there.
alex0412 → created an issue.