google / closure-templates

A client- and server-side templating system that helps you dynamically build reusable HTML and UI elements
Apache License 2.0
641 stars 193 forks source link

Invalid multimap flag entry. No '=' found: io.noticeable.newspage.soy.functions.ContainsFunction #1506

Open lpellegr opened 1 year ago

lpellegr commented 1 year ago

Using the latest open source version 2023-07-19 that include security fixes, compiling a soy template breaks with this error message:

Invalid multimap flag entry.  No '=' found: io.noticeable.newspage.soy.functions.ContainsFunction,io.noticeable.newspage.soy.functions.DefaultAvatarFunction,io.noticeable.newspage.soy.functions.ExcerptFunction,io.noticeable.newspage.soy.functions.GetFunction,io.noticeable.newspage.soy.functions.HtmlFunction,io.noticeable.newspage.soy.functions.Iso8601Function,io.noticeable.newspage.soy.functions.LabelsFunction,io.noticeable.newspage.soy.functions.LabelClustersFunction,io.noticeable.newspage.soy.functions.MarkdownFunction,io.noticeable.newspage.soy.functions.NullOrBlankFunction,io.noticeable.newspage.soy.functions.PhraseFunction,io.noticeable.newspage.soy.functions.ReplaceUrlPlaceholdersFunction,io.noticeable.newspage.soy.functions.Rfc822Function,io.noticeable.newspage.soy.functions.TimestampFunction,io.noticeable.newspage.soy.functions.UniqueJoinFunction,io.noticeable.newspage.soy.functions.UrlFunction

Here is snippet of a soy template that shows how the contains custom function is used:

{template Publication}
    {@inject baseUrl: trusted_resource_uri}
    {@inject assetsUrl: trusted_resource_uri}
    {@inject newspage: map<string, ?>}
    {@inject project: map<string, ?>}
    {@inject queryParameters: map<string, list<string>>}
    {@inject requestUri: string}

    {@param publication: map<string, ?>}

    {let $labels: labels($project, $publication) /}

    {call Layout}
        {param canonicalUrl kind="text"}{nullOrBlank($publication['seo']['canonicalUrl']) ? '' : $publication['seo']['canonicalUrl']}{/param}
        {param metaDescription kind="text"}{contains($publication, 'seo', 'meta', 'description') ? get($publication, 'seo', 'meta', 'description') : excerpt($publication)}{/param}
...
{/template}

I guess a breaking change has been introduced since the last release but I cannot understand what it is based on the error message. Any idea?

emspishak commented 1 year ago

Hmmm... Do you have any more details you could share? Like repro steps or at least the command you run to see that error?