Fix Icon path for Type Tray with the Origin URL (scheme and HTTP host) of the site

Created on 12 March 2023, over 1 year ago
Updated 29 November 2023, 7 months ago

Problem/Motivation

The language prefix sub-directory/folder issue of Drupal base path and Drupal root path
#3203457: Ship a default set of icons/thumbnails

Steps to reproduce

Given that the Type Tray module was installed on the standard recommended Drupal 9/10 build with the following directory physical path "/var/www/html/dev/drupal1type_tray"
But no direct domain to point at the folder "/var/www/html/dev/drupal1type_tray/web"
When navigating to "http://localhost/dev/drupal1type_tray/web/node/add" URL
No data is loading
And when the site is working with another languages as the default language with a sub path

Having the same issue when the site has a direct domain.
But with multiple languages, which each language will be selected using the URL

Proposed resolution

  • Use the logic of Origin URL.
  • The Origin URL (scheme and HTTP host) of the site make sure that link for icons/images works for every site setup.
  • No language prefix.

This solution to have origin path works in all cases

Introduce a token to get site's base URL Fixed

As it was fixed in

Remaining tasks

  • File an issue
  • Patch/MR
  • Test
  • Review

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A
🐛 Bug report
Status

Needs work

Version

1.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.69.0 2024