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
Looks like LazyRouteFilter doesn't handle priority
Comments
Comment #2
andypostconfirm that priority does not taken into account
Comment #3
tim.plunkettIt does not. I just had to work around this in Page Manager by making the route filter non-lazy.
Comment #4
joshi.rohit100I was first in impression that its a tagged service and thus i can register my service with high priority and should work but not the case. So I even did a work around by overriding lay route service for this - https://github.com/joshirohit100/rest_without_format
Comment #5
tim.plunkett- { name: route_filter }
is for lazy route filters (which is a Drupalism), and currently does not support priority
- { name: non_lazy_route_filter, priority: -1024 }
is for regular route filters, and works fine.
Comment #6
tim.plunkettSee also #2647590: Add support for priority to lazy route enhancers
Comment #7
dawehner#2472337: Provide a lazy alternative to service collectors which just detects service IDs would solve that
Comment #9
dawehnerComment #10
dawehner#2883680: Force all route filters and route enhancers to be non-lazy is a concrete issue to resolve that particular problem.
Comment #12
Wim Leers#2883680: Force all route filters and route enhancers to be non-lazy fixed this.