This is a follow up from #1567354: AJAX WSOD when adding empty Relationship where this issue was fixed for D7 but not D8. The patch committed to D7 would still apply to D8 but we need to determine whether this is necessary.

Original report:

I've the View with no relationships.
How to reproduce the problem:
1. Edit existing View (or create a new one).
2. Add Relationship.
3. You should see the message: 'There are no relationships available to add.'
4. Click any of the buttons.
5. The URL should be: /admin/structure/views/ajax/add-item/view_name/page/relationship
You should see the AJAX WSOD.
See the screenshots.

P.S. Doesn't affect any functionality apart of awful WSOD.

Comments

pameeela created an issue. See original summary.

pameeela credited jfinkel.

pameeela credited kenorb.

pameeela’s picture

Issue tags: +Bug Smash Initiative

Adding contributors from related issue for credit.

lendude’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs steps to reproduce

1. Edit existing View (or create a new one).
2. Add Relationship.
3. You should see the message: 'There are no relationships available to add.'

This is not something you see with every view you create in D8. You would have to have an entity with zero relationships for that to be shown. Core has none of those, so I think the steps need to be updated a bit (if this is reproducible at all).

pameeela’s picture

Yeah I wasn’t able to reproduce it based on those steps. I think we probably just need one or two other people to weigh in and if no one has any ideas then we can close it.

robcolburn’s picture

Hi there, I wrote the patch I suppose, but I haven’t touched Drupal in over 5 years - never saw the GA of D8.

I believe the code diff is … trivial defensive programming. As I recall, “Custom Entities” were a powerful but poorly documented feature that became common building blocks in D8, and the foundational Views plugin became Core. So that may explain some of the disconnect.

If you’re looking for something that lacks relationships, I’d suppose you go through the flow of making a new entity type, then a View of that thing.

I believe the D7 flow of creating new Entities involved manually creating database tables, so there might be some edge-cases where this issue comes up.

Also, I can’t remember the difference between a “Node” and an “Entity” in Drupal anymore, so I maybe using terms incorrectly.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

pameeela’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closed since no info provided on how to reproduce.