Remove labels and \n from description field

Created on 25 August 2022, almost 2 years ago
Updated 7 September 2023, 10 months ago

Problem/Motivation

I'm working on creating an iCal feed for Events, which use Smart Recurring Dates.

I was not able to get it working with the main module version; I had to use the Dev version, and that worked better. However, I'm seeing some issues:

- The field labels are displaying even though I've set them not to
- Taxonomy term fields are showing links even though I've set them not to
- The descriptions include a bunch of \n and escaping slashes \ instead of quotes
- Trying to set up a rewrite on a field does not work (e.g. if I wanted to remove the \n's from the description, or combine address fields together)

Example output:

BEGIN:VEVENT
UID:56671
DTSTART;TZID=America/New_York:20210524T170000
SEQUENCE:0
TRANSP:TRANSPARENT
DTEND;TZID=America/New_York:20210524T180000
LOCATION: \n\nCity \nRockaway [/city/rockaway]
SUMMARY: \n\nTITLE GOES HERE\n\n
CLASS:PUBLIC
DESCRIPTION: \n\nMain Description \nLorem ipsum\nmore lorem ipsum includi
ng item1\, item2\, and item3\,\nplus other content.
RRULE:FREQ=DAILY;INTERVAL=1;COUNT=1000;BYDAY=MO,TU,WE,TH,FR
DTSTAMP:20220825T204450Z
END:VEVENT

Steps to Reproduce

- Drupal 9.4.5, Views iCal dev, Smart Date 3.6.0
- View: iCal Display. Format = iCal Style Wizard. Show = iCal Fields row wizard.

Solution

For right now I'm uploading a patch that solves the issues on my end, but it is a rather hardcoded hack. Ideally I'd love to see the module be smart enough to listen to whatever settings are configured on the field (e.g. "Create a label" or not, "Rewrite Results", etc)

Additionally, the updates that have been made to get Recurring Smart Dates working need to be pushed Live.

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

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

  • πŸ‡ΊπŸ‡ΈUnited States bburg Washington D.C.

    I've merged the issue in #3092917: Support VTIMEZONE objects for daylight savings β†’ which adds the VTIMEZONE object. I believe this addresses issue brought up in comment #4. This issue will remain open though as it is about the formatting of fields for Location and Summary.

  • πŸ‡ΊπŸ‡ΈUnited States joshuasosa

    Hello, I'm using 8.x-1.0-alpha11 and also am running into the issue of field names showing in the resulting ical feed. They're not view field labels since I have those unchecked. They seem to be the names of the fields themselves. The issue shows up for both DESCRIPTION and LOCATION fields.

    If my event's description field is called Event Description, it will show as

    DESCRIPTION:Event Description \n\nThis is my description.

    Similarly, if my event's location field is called Event Location, it will show as

    LOCATION:Event Location \nBuilding 123

    I'd like to remove those field names from the output. It's problematic on the location output because it then shows all events with a prefix location of "Event Location" which is not helpful if I'm trying to output an address.

Production build 0.69.0 2024