Problem/Motivation

If I create a brand new, vanilla instance of Drupal 8.3.7, install the Redirect module (8.x-1.0-beta1), and then create a custom View (taking all default options) on the Redirect entity, there is a "Broken/missing handler" error showing in the fields section.

Proposed resolution

Implement a sensible default field when creating a new view for Redirects.

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

When creating a new view for Redirects, the Fields section shows the 'from' (redirect_source__path) property of a Redirect.

API changes

None.

Data model changes

None.

Comments

rwsimmo created an issue. See original summary.

karenann’s picture

StatusFileSize
new116.09 KB
mrdalesmith’s picture

I'm using Redirect 8.2 on a Drupal 8.5.6 install, and have seen the issue described at https://www.drupal.org/node/2859493. That issue has been closed with a comment that a custom view can be used to show redirect information: in attempting to create a new view to display redirects, I hit this issue.

I'm not as up on Drupal 8 as I am 7, but I can't see an integration of \Drupal\views\EntityViewsDataInterface or a use of hook_views_data(): is it possible that the views implementation is incomplete?

idebr’s picture

Title: Custom View for Redirect Entity » Creating a new view for Redirects results in a broken/missing fields handler
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.8 KB

Views defaults to the 'redirect_source' field that is configured as the redirect label. Since this is a composed field, I suggest we change the default Views field to its 'path' value. When creating a new view for Redirects, the Fields section shows the 'from' (redirect_source__path) property of a Redirect.

laravz’s picture

After applying the patch from #4, I no longer see the broken/missing handler error and I can see that the redirect source field has been set as a default. I'm personally okay with setting the source as a default, however, perhaps it would be a good idea to set the redirect (To) field as well.

  • Berdir committed 5c615e6 on 8.x-1.x authored by idebr
    Issue #2912784 by idebr, karenann: Creating a new view for Redirects...
berdir’s picture

Status: Needs review » Fixed

works for me, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.