Expose the url to the entity for Views

Created on 7 July 2022, almost 3 years ago
Updated 5 December 2024, 5 months ago

Problem/Motivation

When attempting to use the views data export module in conjunction with broken links report view, The "found here" column uses linkcheckerlink_page_entity_label field provided by the linkcheck module. The problem lies in the fact that within views there is no way to output the bare url to the entity/parent entity from the LinkCheckerLink entity. This makes it impossible for one to create an export that would allow a user outside of the drupal UI to access the entity the broken link came from.

Normally, one would use the "entity link" or "entity edit link" that comes with views to achieve this, but since that is not how LinkCheckerLink works, we need to make a new one that would work like this.

Proposed resolution

I was able to extend the Drupal\views\Plugin\views\field\EntityLink class and adjust the getEntity method with the logic needed to achive creating that link. This issue includes a small patch that adds this new views field to the module so one can output that url as they see fit.

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States devkinetic

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024