Problem/Motivation

There was a change in code that breaks calendar_links() previous functionality, causing php errors.

calendar_links() accepts 6 parameters, the fourth used to be a boolean, now it may only be a string.

Steps to reproduce

Version 2.1.3, we had:

{% set links = calendar_links(event.entity_label, event_datetime, event_datetime, 0, '', '' ) %}

in a twig template.

Proposed resolution

Changing the 4th parameter to an empty string resolves the issue, however the toString() should account for this.

Remaining tasks

I'm going to submit a fork with an error throw, as well as a message as to why the error is likely encountered. This is pretty opinionated, change it however you would like.

User interface changes

None.

API changes

Accounting for previous changes.

Data model changes

None.

I could also be completely wrong how I'm handling this- in our case we changed all of the calendar_link methods fourth param to an empty string. However this should still be handled, right?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kazajhodo created an issue. See original summary.

wells’s picture

Status: Active » Needs work

  • wells committed 71bcda8 on 2.x authored by kazajhodo
    Issue #3284487 by kazajhodo, wells: calendar_link no longer allows...

  • wells committed 8d41fef on 3.0.x authored by kazajhodo
    Issue #3284487 by kazajhodo, wells: calendar_link no longer allows...
wells’s picture

Status: Needs work » Fixed
wells’s picture

Assigned: kazajhodo » Unassigned

Status: Fixed » Closed (fixed)

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