BatchNegotiator tests for an invalid route

Created on 1 July 2021, over 3 years ago
Updated 29 March 2023, over 1 year ago

Problem/Motivation

Discovered this while triaging πŸ› Batch API should use the current theme to run the batches Fixed . It is in comment 539022#71 πŸ› Batch API should use the current theme to run the batches Fixed and I've moved it here so it can be resolved.

\Drupal\system\Theme\BatchNegotiator::applies tests for 'system.batch_page' but that route does not exist.

  public function applies(RouteMatchInterface $route_match) {
    return $route_match->getRouteName() == 'system.batch_page';
  }

system.routing.yml defines system.batch_page.html and system.batch_page.json so the above test will always fails.

Steps to reproduce

Launch a batch from a page with the frontend theme.
Because of this bug the admin theme will always be used for users that have access to the admin theme.

Proposed resolution

Change 'system.batch_page' to 'system.batch_page.html'

Remaining tasks

Decide on solution
Patch
Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

9.5

Component
BatchΒ  β†’

Last updated 4 days ago

Created by

πŸ‡³πŸ‡ΏNew Zealand quietone

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024