ErrorHandlerSubscriber and ThemeInfoRebuildSubscriber calls "hasPermission" before LanguageRequestSubscriber
Problem/Motivation
Through https://www.drupal.org/project/drupal/issues/3569172 it has been identified that there is an issue in Drupal core (>=11.3.2).
If a EventSubscriber runs before core LanguageRequestSubscriber, and triggers an action within "core/lib/Drupal/Core/Session/AccessPolicyProcessor.php", it can, in some cases, break site translation.
Both ThemeInfoRebuildSubscriber and ErrorHandlerSubscriber, in the devel project, uses priority 256 and calls "hasPermission". LanguageRequestSubscriber has a priority of 255.
Please see further details within the Drupal core issue, and also for retrieving a "Steps to reproduce".
Proposed resolution
Lower the priority for ThemeInfoRebuildSubscriber and ErrorHandlerSubscriber to 254, or lower, until the issue is fixed in Drupal core.
Edited by Flemming Fridthjof