Switch from base_path to origin_url to fix issues when retrieving the path of the CKEditor plugins for use in a URL

Created on 1 May 2024, 7 months ago

Problem/Motivation

Facing issues of not able to load the Media Embed library when working with multilingual sites.
1. When the language dedication is using the url like /fr
2. When the site is in a sub folder of a domain.

Proposed resolution

As they did this in Drupal core
Introduce a token to get site's base URL Fixed

Switch from base_path to origin_url

    $origin_url = \Drupal::request()->getSchemeAndHttpHost() . \Drupal::request()->getBaseUrl();
    return $origin_url . '/libraries/' . self::$ckeditorName . '/plugins/';

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs review

Version

2.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024