Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTA tag & function says GUID is null if default flag is used #127

Open
erik4github opened this issue Mar 23, 2022 · 0 comments
Open

CTA tag & function says GUID is null if default flag is used #127

erik4github opened this issue Mar 23, 2022 · 0 comments

Comments

@erik4github
Copy link

Both the CTA tag and function end up saying Invalid GTA guid null if the default filter is used.

Example:


    {% set cta_to_render = (
        module.sidebar_cta_tag_collection 
        | selectattr('tag', 'in', content.tag_list|map('id')) 
        | first 
        | attr('cta') 
        | default(module.sidebar_cta_default)
        ) 
    %}
    {{ cta("{{ cta_to_render }}")  }} 

shows Invalid GTA guid null in my VSCode Problems terminal. However viewing the page with the debug mode query parameter shows no template errors, and the behavior is expected (it renders the value of module.sidebar_cta_default if none of the previous filters returned anything.

Removing the default filter:


    {% set cta_to_render = (
        module.sidebar_cta_tag_collection 
        | selectattr('tag', 'in', content.tag_list|map('id')) 
        | first 
        | attr('cta') 
        ) 
    %}

    {{ cta("{{ cta_to_render }}")  }} 

Shows no problems in VSCode terminal.

This also happens with the CTA tag, e,g {% cta guid="{{ cta_to_render }}" %}

I tested this with the default key in fields.json populated and unpopulated, doesn't seem to make a difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant