Does not work in views when using relationships

Created on 18 January 2024, 5 months ago
Updated 6 February 2024, 5 months ago

Problem/Motivation

When using fields from referenced entities the data is missing.

Steps to reproduce

Have a Location content type and a Booking content type with the following fields:

Location:
Title
Body
Address (address field)
Geolocation geolocation field)
Bookings (entity reference)

Booking:
Date
Body

Create a ical feed page view of booking nodes and add a relationship using the entity reference: "Relate each Content with a field_bookings set to the content item."

Add the following fields:
Date
Title
Body
Address (using the relationship above)
Geolocation (using the relationship above)

In the field settings set:
Date field = the date field
Summary field = title
Description field = body
Location field = address (using the relationship as above)
Geo field = geolocation (using the relationship above)

The view will WSOD if the Geolocation field is set and if you remove that field the feed works but the location is missing.

I also have other fields in my view such as the on-site contact name, email and telephone number fields which are on the location entity and none of those are there in the view either. I added them to the view by re-writing the content of the body field and used their tokens.

πŸ› Bug report
Status

Needs work

Version

4.0

Component

iCal Export

Created by

πŸ‡¬πŸ‡§United Kingdom vaccinemedia

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

Comments & Activities

  • Issue created by @vaccinemedia
  • πŸ‡«πŸ‡·France lazzyvn paris

    Try testing with the geo field. are you try with geo without relationship? Anyway, the geo field doesn't show anything in Google Calendar, Outlook or Thunder Bird, it works on iPhone. test on my own it show apple map on iphone calendar.

  • πŸ‡¬πŸ‡§United Kingdom vaccinemedia

    I believe that this issue is related to the first one I raised: https://www.drupal.org/project/date_ical/issues/3415703#comment-15408503 πŸ› Geolocation fields not working Active

    At first I thought it was the Geolocation fields not working but this issue supersedes it and I believe that the wider issue is that fields which use relationships are not working. If we can ignore the Geofield for a second, no fields which use relationships work.

    So for example, I have a content type of "Location" which references "Event" nodes. The events are in a view displayed as a table and also have an attached iCal feed. The addresses and names of the locations are loaded into the events table using the relationship based on the entity reference field. They show fine in the table, but the fields are not working on the iCal feed. I have also triad adding them into the body field by rewriting it but they are not showing.

  • πŸ‡«πŸ‡·France lazzyvn paris

    does it work without relationship?

  • πŸ‡¬πŸ‡§United Kingdom vaccinemedia

    That's correct - To test for you I added an address field to the "Events" content type and added an address to one of them and then the location was present in the iCal feed for that particular event.

  • Status changed to Fixed 5 months ago
  • πŸ‡«πŸ‡·France lazzyvn paris
  • Status changed to Needs work 5 months ago
  • πŸ‡¬πŸ‡§United Kingdom vaccinemedia

    Addresses on related entities are still not showing / being detected on the iCal view. Addresses on the event entities are showing but the issue here is that the address fields on related entities are not showing.

  • πŸ‡«πŸ‡·France lazzyvn paris

    It works on my local, but you can try with a global custom text field and override the text

Production build 0.69.0 2024