❌

Normal view

[Help] PHPUnit in Drupal Multisite loading 'default' instead of specific site directory

Hey everyone, I'm running into a frustrating issue with a Drupal Multisite setup and could use some help.

I'm on a Linux server running Drupal 10.6.2 and Drush 12.5.3.0. My working directory is /var/www/uat.

Here is my /var/www/uat/phpunit.myWebsiteBBB.xml:

<?xml version="1.0" encoding="UTF-8"?> <phpunit bootstrap="/var/www/uat/bootstrap.myWebsiteBBB.php" colors="true"> <php> <env name="DTT_SITE_DIR" value="myWebsiteBBB"/> <env name="SIMPLETEST_BASE_URL" value="https://uat.myWebsiteBBB.com"/> <env name="SIMPLETEST_DB" value="mysql://lmuat:Bwurp9vS(CQSbd5F@localhost:3306/myWebsiteBBB"/> <env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/var/www/uat/web/sites/simpletest/browser_output"/> <ini name="memory_limit" value="-1"/> <server name="HTTP_HOST" value="uat.myWebsiteBBB.com"/> <server name="SERVER_NAME" value="uat.myWebsiteBBB.com"/> <env name="DTT_BASE_URL" value="https://uat.myWebsiteBBB.com"/> <env name="DTT_API_URL" value="https://uat.myWebsiteBBB.com"/> </php> <testsuites> <testsuite name="MyWebsiteBBB Existing Site Tests"> <directory>/var/www/uat/web/modules/custom/lps_api/tests/src/ExistingSite</directory> </testsuite> </testsuites> </phpunit> 

And my /var/www/uat/phpunit.myPageAAA.xml:

<?xml version="1.0" encoding="UTF-8"?> <phpunit bootstrap="/var/www/uat/web/core/tests/bootstrap.php" colors="true"> <php> <env name="DTT_SITE_DIR" value="default"/> <env name="SIMPLETEST_BASE_URL" value="https://uat.myPageAAA.ca"/> <env name="SIMPLETEST_DB" value="mysql://lmuat:Bwurp9vS(CQSbd5F@localhost:3306/multisite"/> <env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/var/www/uat/web/sites/simpletest/browser_output"/> <ini name="memory_limit" value="-1"/> <server name="HTTP_HOST" value="uat.myPageAAA.ca"/> <server name="SERVER_NAME" value="uat.myPageAAA.ca"/> <env name="DTT_BASE_URL" value="https://uat.myPageAAA.ca"/> <env name="DTT_API_URL" value="http://localhost"/> </php> <testsuites> <testsuite name="MyPageAAA Existing Site Tests"> <directory>/var/www/uat/web/modules/custom/lps_api/tests/src/ExistingSite</directory> </testsuite> </testsuites> </phpunit> 

The tests are located in: /var/www/uat/web/modules/custom/lps_api/tests/src/ExistingSite/

I added some lines to debug the environment in /var/www/uat/web/modules/custom/lps_api/tests/src/ExistingSite/ClinicImagesConsistencyTest.php:

public function testClinicImagesMatchJson(): void { // --- HOME SAFE DIAGNOSTICS --- $site_path = \Drupal::getContainer()->getParameter('site.path'); $db_name = \Drupal\Core\Database\Database::getConnection()->getConnectionOptions()['database']; $dtt_url = getenv('DTT_BASE_URL'); fwrite(STDERR, "\n--- SCAN RESULTS ---\n"); fwrite(STDERR, "1. Environment URL (DTT_BASE_URL): " . ($dtt_url ?: 'VACÍO') . "\n"); fwrite(STDERR, "2. Folder you chose to upload : " . $site_path . "\n"); fwrite(STDERR, "3. Final database : " . $db_name . "\n"); fwrite(STDERR, "------------------------------\n"); // --- END OF SAFE DIAGNOSIS --- 

In /var/www/uat/web/sites/sites.php:

<?php $sites['upcore.branchmanager.myWebsiteBBB.com'] = 'myWebsiteBBB'; $sites['dev.branchmanager.myWebsiteBBB.com'] = 'myWebsiteBBB'; $sites['myWebsiteBBB.com'] = 'myWebsiteBBB'; $sites['uat.myWebsiteBBB.com'] = 'myWebsiteBBB'; 

I have two sites: uat.myPageAAA and uat.myWebsiteBBB. Inside /var/www/uat/web/sites, I have the following folders: myWebsiteBBB and default.

So, what's the problem? When I execute: ./vendor/bin/phpunit -c phpunit.myWebsiteBBB.xml

This is the output I get:

--- SCAN RESULTS --- 1. Environment URL (DTT_BASE_URL): https://uat.myWebsiteBBB.com 2. Folder you chose to upload: sites/default 3. Final database: multisite 

Basically, when I run the tests for myWebsiteBBB, it does not load the myWebsiteBBB site data. Instead, it falls back to the default directory. Because of this, everything goes wrong when I execute my test script: /var/www/uat/run_multisite_tests.sh

#!/bin/bash # Ensure we run everything from the directory where this script is located SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "$SCRIPT_DIR" # Define base log directory LOG_BASE_DIR="$SCRIPT_DIR/logs" # Create the logs directory if it doesn't exist mkdir -p "$LOG_BASE_DIR" # Define static log files for this execution MYPAGEAAA_LOG="$LOG_BASE_DIR/uat_myPageAAA.log" MYWEBSITEBBB_LOG="$LOG_BASE_DIR/uat_myWebsiteBBB.log" echo "===================================================" echo "πŸš€ Starting tests for MyPageAAA..." echo "πŸ“„ Logging output to: logs/uat_myPageAAA.log" echo "===================================================" # Run PHPUnit and pipe the output to 'tee' to overwrite the log file ./vendor/bin/phpunit -c phpunit.myPageAAA.xml | tee "$MYPAGEAAA_LOG" MYPAGEAAA_RESULT=${PIPESTATUS[0]} echo "" echo "===================================================" echo "πŸš€ Starting tests for MyWebsiteBBB..." echo "πŸ“„ Logging output to: logs/uat_myWebsiteBBB.log" echo "===================================================" ./vendor/bin/phpunit -c phpunit.myWebsiteBBB.xml | tee "$MYWEBSITEBBB_LOG" MYWEBSITEBBB_RESULT=${PIPESTATUS[0]} echo "" echo "=================== SUMMARY =======================" if [ $MYPAGEAAA_RESULT -eq 0 ]; then echo "βœ… MyPageAAA: SUCCESS" else echo "❌ MyPageAAA: FAILED (Check logs/uat_myPageAAA.log)" fi if [ $MYWEBSITEBBB_RESULT -eq 0 ]; then echo "βœ… MyWebsiteBBB: SUCCESS" else echo "❌ MyWebsiteBBB: FAILED (Check logs/uat_myWebsiteBBB.log)" fi echo "===================================================" # If any test failed, return an error code for continuous integration systems if [ $MYPAGEAAA_RESULT -ne 0 ] || [ $MYWEBSITEBBB_RESULT -ne 0 ]; then exit 1 fi exit 0 

Has anyone run into this before? Why is PHPUnit ignoring my myWebsiteBBB environment variables and forcing the default site directory? Any pointers would be greatly appreciated!

submitted by /u/ScriptNone
[link] [comments]

Core Infrastructure Maintenance in BLR1 and SGP1

25 February 2026 at 13:00

Feb 25, 18:00 UTC
Completed - The scheduled maintenance has been completed.

Feb 25, 15:00 UTC
In progress - Scheduled maintenance is currently in progress. We will provide updates as necessary.

Feb 23, 16:05 UTC
Scheduled - Start: 2026-02-25 15:00 UTC
End: 2026-02-25 18:00 UTC

Hello,

During the above window, our Engineering team will be performing maintenance on core control plane infrastructure in BLR1 and SGP1. Please note that the existing infrastructure will continue running without issue.

We do not anticipate any impact; however, there is a small possibility that control panel functionality specifically CRUD (Create, Read, Update, Delete) operations may be affected during the maintenance window. All running workloads are expected to continue operating normally without interruption.

Our team will be actively monitoring the environment throughout the maintenance, and any unexpected events will be promptly communicated through our status page.

If you have any questions or concerns regarding this maintenance, please feel free to open a support ticket from within your account. We’re here to help.

Thank you,
Team DigitalOcean

How do I override individuel Nodes with Canvas?

Could somebody help me and take a look at this question please?
I want to use a Canvas Content Template as default for a Content Type (e.g. "Projects"), BUT be able to override individual nodes.

Example:

  • Template has Title + Subtitle + Image
  • For one specific Project node, remove subtitle (or completely different layout)

What I've tried:

  1. Content Type β†’ Manage Display β†’ "Allow each content item to have its layout customized" is not a visible option
  2. Canvas enabled for View Mode
  3. Edit Node β†’ looking for "Layout" tab / Canvas override checkbox β†’ nothing visible

Questions:

  1. Where exactly does the "Override default template for this node only" checkbox from Issue #3567225 appear?
  2. Do I need to create Content Template first (/canvas/content-templates)?
  3. Missing permission or feature not in Canvas 1.0?
  4. Is there a Workaround like Custom Block per node or other solution?
submitted by /u/probefahrer
[link] [comments]
❌