Problem/Motivation

If a translated title is supplied to 'calendar_links' twig function as a first parameter, we get exception: "Could not get valid string from input".

Steps to reproduce

Call from a template:

{% set links = calendar_links(title, date_start, date_end) %}

where title is a TranslatableMarkup.

Proposed resolution

In CalendarLinkTwigExtension.php additionally account for a string to be of type MarkupInterface

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

Baysaa created an issue. See original summary.

baysaa’s picture

Issue summary: View changes

baysaa’s picture

Status: Active » Needs review
baysaa’s picture

Tag related issue

wells made their first commit to this issue’s fork.

  • wells committed 720cafc on 2.x authored by Baysaa
    Issue #3250644 by Baysaa: Could not get valid string from input when...
wells’s picture

Status: Needs review » Fixed
Related issues: +#3249457: Views support

Thanks, @Baysaa. This is the approach I figured was needed here. #3249457: Views support is also related and overlaps a bit but we'll focus on dates there.

baysaa’s picture

Status: Fixed » Needs review
StatusFileSize
new3.6 KB
new4.36 KB

Uploading patches for those who prefer patches over dev version, until this is released :)

baysaa’s picture

Thanks for the quick response @wells!

baysaa’s picture

Status: Needs review » Fixed

Oops

Status: Fixed » Closed (fixed)

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