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.