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

Issues w/Single-Line Lava Comments #5656

Closed
2 tasks done
briankalwat opened this issue Oct 31, 2023 · 0 comments
Closed
2 tasks done

Issues w/Single-Line Lava Comments #5656

briankalwat opened this issue Oct 31, 2023 · 0 comments
Labels
Fixed in v16.1 Topic: Lava Related to the Lava templating language. Type: Bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@briankalwat
Copy link
Contributor

Description

We recently deployed version 17.0.5 and it appears there are some issues with the single-line lava comment syntax.

Two things I've found thusfar:

  1. Single-line lava comments in an HTML block cause the contents of the block to not be rendered:
    Example Lava:
//- Single line lava comment
<h2>This is a test.</h2>
  1. When using single-line lava comments within the item tags of a block lava shortcode, an error is visible shown on the page, and an exception is logged for an error in the for loop.
    Example Lava:
{% assign array = 'One,Two,Three,Four,Five '%}
{% assign arrayObj = array | Split:',' %}
{[ accordion ]}
    {% for item in arrayObj %}
        [[ item title:'Item {{ item }}' ]]
            <p>This is an item.</p>
            //- this is a single line comment in a block shortcode item
        [[ enditem ]]
    {% endfor %}
{[ endaccordion ]}

I've reproduced both of these issues on rockrmslatest.com which is currently on 17.0.5, as well.

Actual Behavior

Single-line comments currently prevent HTML blocks from showing their contents, and block lava shortcodes from doing the same.

Expected Behavior

Single-line lava comments //- This is a comment should work as expected, hiding the comment but still displaying the rest of what's around them.

Steps to Reproduce

Put either of the two lava examples documented above in an html block on any Rock instance running 1.17.0.5.

Issue Confirmation

  • Perform a search on the Github Issues to see if your bug or enhancement is already reported.
  • Try to reproduce the problem on a fresh install or on the demo site.

Rock Version

1.17.0.5

Client Culture Setting

en-US

@sparkdevnetwork-service sparkdevnetwork-service added Type: Bug Confirmed bugs or reports that are very likely to be bugs. Topic: Lava Related to the Lava templating language. Status: In Dev Queue This issue is being worked on, and has someone assigned. labels Oct 31, 2023
@MrUpsideDown MrUpsideDown added Fixed in v16.1 and removed Status: In Dev Queue This issue is being worked on, and has someone assigned. labels Nov 1, 2023
PraveenMathew92 pushed a commit that referenced this issue Nov 2, 2023
briankalwat pushed a commit to NewSpring/Rock that referenced this issue Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in v16.1 Topic: Lava Related to the Lava templating language. Type: Bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

No branches or pull requests

3 participants