Problem/Motivation

"dr cache:rebuild" only works on the site installed into "sites/default".

This was discovered whilst running Playwright tests on sites installed using the test site installer - when "sites/default" doesn't exist it gives the error `The specified database connection is not defined: default`, and when it does exist it clears the caches on the default site instead of the specified one.

Steps to reproduce

composer create-project drupal/recommended-project:^11.4 test
cd test
mkdir -p web/sites/foo
DRUPAL_DEV_SITE_PATH=sites/foo vendor/bin/dr install minimal -n
DRUPAL_DEV_SITE_PATH=sites/foo vendor/bin/dr cache:rebuild
# and for URL
printf "<?php\n\$sites['foo.localhost'] = 'foo';\n" > web/sites/sites.php
vendor/bin/dr --url=https://test.ddev.site cache:rebuild

Proposed resolution

tbc

Remaining tasks

tbc

User interface changes

None

Introduced terminology

None

API changes

None

Data model changes

None

Release notes snippet

n/a

Issue fork drupal-3636461

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

justafish created an issue. See original summary.

justafish’s picture

Issue summary: View changes