I couldn't find any issues that matched what I'm seeing here.

In the displays for the fullcalendar other than month (Week, Day, List):

If the "Use entity fields" option in the view settings if OFF (using views rendering rather than entity fields) AND the title field is linked
the title will show as an escaped plain text link.

I've attached some screenshots.

In the fullcalendar_view.theme.inc file on line ~243 the title uses the views advancedRender function.
If I change that to use getValue instead it renders ok on those other displays.

Original:

        // Event title.
        if (empty($options['title']) || $options['title'] == 'title') {
          $title = $fields['title']->advancedRender($row);
        }
        elseif ($current_entity->hasField($options['title'])) {
          $title = $fields[$options['title']]->advancedRender($row);
        }
        else {
          $title = 'Invalid event title';
        }
      }
      $entry = [
        'title' => $title,
        'description' => $des,
        'id' => $entity_id,
        'url' => $current_entity->toUrl()->toString(),
      ];

My change:

        // Event title.
        if (empty($options['title']) || $options['title'] == 'title') {
          $title = $fields['title']->getValue($row);
        }
        elseif ($current_entity->hasField($options['title'])) {
          $title = $fields[$options['title']]->advancedRender($row);
        }
        else {
          $title = 'Invalid event title';
        }
      }
      $entry = [
        'title' => $title,
        'description' => $des,
        'id' => $entity_id,
        'url' => $current_entity->toUrl()->toString(),
      ];

I'm not really sure why the Month display is ok and this affects only the Week, Day and List displays.

Comments

jimmynash created an issue. See original summary.

anschinsan’s picture

Hi jimmynash,

I experienced kind of the same issue - but unfortunately your solution didn't work for me because I need the 'Rewrite Result' value of the views field.

The views->advancedRender outputs escaped html and adds some br tags with any configuration I could imagine. Strange enough - everything works fine in the month view, but the html in list view is escaped :(

As a solution without changing the module I found that I could overwrite template_preprocess_views_view_fullcalendar() function in my templates theme file.

In any case I wonder if the output could be the same for the month and the other views? This would make all the overwriting obsolete :) Sorry to say that I didn't find out, where this different texts are set.

dak5859’s picture

I'm having the same issue because I've also unchecked the "Use entity fields" setting so I can use the event description/body field that would honor the use of the "Summary or trimmed" formatter. And this was only after I applied the patch in this issue - https://www.drupal.org/project/fullcalendar_view/issues/3054176. jimmynash - any chance you could submit your change as a patch?

dak5859’s picture

Submitting patch for review based on jimmynash's solution in issue description.

mingsong’s picture

Status: Active » Needs review

Thanks for the patch.

Could anyone test it for us?

mrogers’s picture

Patch in #4 resolved the issue for me.

sunsetco’s picture

Hmm...
I applied the patch in #4, but I am still getting the html code for the href...

blueblot’s picture

patch #4 works fine.

Thx

snsblvd’s picture

patch #4 works for me, too.

b_sharpe’s picture

StatusFileSize
new583 bytes

I found this to be not a problem with the output, but rather the JS selector using span instead of div. I aslo with #2 needed to rewrite the output of the view field.

Here is a patch that worked for me and allows views to function per normal, but rather uses a different selector and the event title when changing calendar view modes.

providence_matt’s picture

StatusFileSize
new604 bytes

The patch in #10 worked for me on the week and day view of the calendar. It did not work on the "list" view of the calendar. I was also rewriting a view result field as described in #2.

I've added a minor adjustment to the patch in #10 to allow this to work on the list calendar view.

  • providence_matt authored e1e2df3 on 8.x-3.x
    Issue #3046175 by dak5859, providence_matt, b_sharpe, jimmynash: Raw...
mingsong’s picture

Thank you all for the patches and testing.

I make a minor amendment based on patch #11 with security improvement.

Now, it is ported.

mingsong’s picture

Version: 8.x-2.2 » 8.x-2.x-dev
Status: Needs review » Patch (to be ported)

  • providence_matt authored 9ae0cf2 on 8.x-2.x
    Issue #3046175 by dak5859, providence_matt, b_sharpe, jimmynash: Raw...
mingsong’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.