Problem/Motivation

HTTP 500 response when visiting admin/config/system/served_files/add:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "app.root". in Drupal\Component\DependencyInjection\Container->get() (line 157 of core/lib/Drupal/Component/DependencyInjection/Container.php).

Drupal\serve_plain_file\Form\ServedFileForm::create(Object) (Line: 28)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('Drupal\serve_plain_file\Form\ServedFileForm') (Line: 210)
...

Steps to reproduce

See above (in D10)

Proposed resolution

Fix code, while temporarily keeping backward compatibility.

Remaining tasks

User interface changes

Review, commit.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

roderik created an issue. See original summary.

roderik’s picture

Issue summary: View changes

roderik’s picture

Status: Active » Needs review

Manually tested:
Form opens without errors on recent D9 and D10, when visiting admin/config/system/served_files/add

ciprian.stavovei’s picture

Status: Needs review » Fixed

I like the approach. Merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.