Problem/Motivation

As mentioned in Issue #2833300, selecting custom titles and URLs doesn't work, but I'm posting this new issue since I'm providing a working patch for 8.x-1.0-alpha3. This patch specifically should address #5, as I was able to resolve a similar error in relation to fields provided by the Recurring Events module. This patch should work for any type of title field, as well as any link field using any of the following View options:

  • "Use absolute link"
  • "Output the URL as text"
  • "Output this field as a custom link"

Steps to reproduce

  1. Create a new View using the FullCalendar format
  2. Add whatever fields are necessary, including "Custom text"
  3. Under "Customize Fields", select "Use a custom title" and/or "Use a custom redirect URL"
  4. You'll see something similar to the following error:
    Call to undefined method Drupal\views\Plugin\views\field\EntityLink::getItems() in Drupal\fullcalendar\Plugin\views\style\FullCalendar->prepareEvents() (line 296 of modules/contrib/fullcalendar/src/Plugin/views/style/FullCalendar.php).
    

Comments

ryankavalsky created an issue. See original summary.

ryankavalsky’s picture

helioha’s picture

Updating patch #2 to work with Drupal 9.4.8.

\Doctrine\Common\Util\ClassUtils was removed without any good replacement for \Doctrine\Common\Util\ClassUtils::getClass(). I just replaced ::getClass() with get_class().

See https://github.com/doctrine/common/issues/867

dcam’s picture

Status: Needs review » Closed (duplicate)

Closing as a duplicate of #2833300: Customize fields title, url don't works. I suggest updating existing issues rather than opening new ones if you have changes to contribute.