Content parsing broken

Created on 13 October 2023, about 1 year ago
Updated 17 October 2023, about 1 year ago

Problem/Motivation

With content parsing selected, I'm not seeing file type or size being appended to link text. However, I can see the file type and size on links from fields.

Steps to reproduce

1. Enable module.
2. Head to "/admin/config/media/media_link_enhancements".
3. Enable "Type/size appending" for at least one media type.
4. Enable "Redirection" for the same media type you enabled type/size appending.
5. Enable "Content parsing" for the field type where you will be adding media links.
6. Create a node with a link to media. Currently, I am using CKE5 with the standard link button that integrates with the LinkIt module.
7. After saving, the file type and size are not appended to the link text.

Proposed resolution

Update line #152 of "MediaLinkEnhancementsAlterLinks.php" to

      // Get the full link to replace before we modify it.
      $full_link = $doc->saveHTML($link);
πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States afinnarn

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

Comments & Activities

Production build 0.71.5 2024