Linkit for Link field: Files displayed in link widget form should show full path

Created on 11 April 2023, over 2 years ago
Updated 30 April 2023, about 2 years ago

Problem/Motivation

When using the Linkit plugin for link fields, creating a link to a file/media element displays only the filename, rather than the entire relative file path.

Steps to reproduce

  • Install Drupal 9.5.7 - standard installation
  • Install Linkit 6.0.x-dev
  • Edit default LinkIt profile to allow files in the Manage Matchers menu
  • Upload a file
  • Edit the basic page content type, add a link field with default settings but change the form display to use the LinkIt widget
  • Create a page using the basic page content type and link to a file with the link field.
  • On the edit page the link should be like /sites/default/files/2023-03/filename.pdf, however it displays without path as filename.pdf

Proposed resolution

Provide a full relative path instead of a file name.

πŸ› Bug report
Status

Fixed

Version

6.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine ruslan piskarov Kyiv, Ukraine

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

Comments & Activities

Production build 0.71.5 2024