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

Formatted liquid templates fail in universal_login #971

Open
6 tasks done
zicvic opened this issue Oct 31, 2024 · 1 comment
Open
6 tasks done

Formatted liquid templates fail in universal_login #971

zicvic opened this issue Oct 31, 2024 · 1 comment
Labels

Comments

@zicvic
Copy link

zicvic commented Oct 31, 2024

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this tool and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

When using a standard formatter for liquid code the deployment fails due to misalignment on expected formatting of the {%- auth0: head -%} and {%- auth0: widget -%} tags.

Expectation

When I use a standard formatter of the supported coding languages the deployment should not fail due to an additional space added to adhere to the formatting rules.

Reproduction

  1. Formatting the universal_login.liquid with these settings (in vscode):
{
  "[liquid]": {
    "editor.defaultFormatter": "sissel.shopify-liquid",
    "editor.formatOnSave": true
},
  "[liquid-css]": {
    "editor.defaultFormatter": "sissel.shopify-liquid",
    "editor.formatOnSave": true
}
  1. Results in that the tags {%- auth0:head -%} and {%- auth0:widget -%} are re formatted to {%- auth0: head -%} and {%- auth0: widget -%} (notice added space)

  2. Running a0deploy import the results in this error message:

2024-10-30T15:10:00.997Z - error: Problem running command deploy during stage processChanges when processing type branding
2024-10-30T15:10:00.997Z - error: The template must contain a single auth0:head tag and at least one auth0:widget tag.
  1. Reformatting and removing the spaces results in a successful deployment

Deploy CLI version

7.23.4

Node version

v20.18.0

@zicvic zicvic added the bug label Oct 31, 2024
@kushalshit27
Copy link
Contributor

kushalshit27 commented Nov 15, 2024

Hi, @zicvic , Thanks for opening this.

Its seem like the syntax is defined via API

This is not a valid syntax (with added space)

{%- auth0: widget -%}

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

No branches or pull requests

2 participants