Base path is empty

Created on 12 August 2022, over 2 years ago
Updated 23 March 2025, 14 days ago

Problem/Motivation

Having this warning on error pages:
Warning: Undefined array key "base_path" in /var/www/html/web/core/includes/common.inc on line 195

Steps to reproduce

Proposed resolution

May be make the base path used by the module configurable in the settings.php ?

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Postponed: needs info

Version

2.0

Component

Code

Created by

🇲🇺Mauritius j.b

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.

  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    This might have been fixed in 📌 Automated Drupal 11 compatibility fixes for error_page Needs review . Could you test with that branch?

  • 🇮🇳India sharma.amitt16 Delhi

    This is happening when error is added in the page.

    base_path() is returning null in render() function of error_page/src/ErrorPageRenderer.php.

    Please note this is warning which is visible on frontend on the page.

    Steps I followed:
    1. I added a syntax error in the code after configuration of module.
    2. After this I refreshed the page.
    3. Now warning message is visible which is breaking the design due to base_path().

Production build 0.71.5 2024