Checkout template error -- except I'm not using Twig

matt633matt633 Member
in Help
Hi @fc_adam,

Trying to cache & save an older template, but getting an error on Save: "Your template was not saved because there was an error in your Twig template syntax: Unclosed comment in "TEMP_checkout_template.twig" at line 2315"

Problem is, I'm not using Twig. This is a 1.0 store.

Any advice would be greatly appreciated. Thanks!
Comments
  • fc_adamfc_adam FoxyCart Team
    @matt633,

    Sorry to hear you're running into errors saving the template. Would it be possible to see the template you're attempting to cache? If you're including Modernizr on your template, that can cause that error to appear. If that is the case, you can fix it by wrapping it in raw tags like this:
    {% raw %}<script... ></script>{% endraw %}
    In terms of the twig error - we started using Twig to power our templates starting with version 1. Even if you're just using the default template, under the hood, it's a Twig template.
  • matt633matt633 Member
    Hi @fc_admin!

    Here's the page: http://hapcoa.org/checkout

    I tried pasting the page code directly in (as opposed to cacheing the page) and saving, but it then gave me an error that my css files were not secure.
  • matt633matt633 Member
    Actually @fc_adam... the page is now saving, but not accessing any of its CSS. https://hapcoa.foxycart.com/checkout.php?fcsid=8vqaofpd7jsct6k6cb7v9ut9c2
  • matt633matt633 Member
    Hi again @fc_adam. Sorry to blow you up this morning. I fixed the issue by caching the page, THEN adding the {% raw %}{% endraw %} escapes like you suggested, to not only but also to where it gave me errors.

    Thanks for your help!
  • fc_adamfc_adam FoxyCart Team
    @matt633,

    Glad you were able to get it working! Looking at your page there, I believe the error was originating from your minified CSS within style.css. In it's minified state, it has these characters - {# which is an opening comment tag in Twig.
Sign In or Register to comment.