Why is there a random bracket in my Crave theme header?

ugneugne
Excursionist
12 0 4

Hello web masters 🙂

 

I was looking for the whole day where did I made a mistake with the header, since the bracket appeared on the header. Maybe someone could point me at least in what code file to search for the mistake? Website: https://aromeli.com/

Replies 2 (2)

Zeel-prajapatii
Shopify Partner
138 32 27

Hey @ugneugne please share the code of theme.liquid file , I will make changes to the code and send you here.

 

Thanks

➔ Was I helpful , please don't forget to like and mark solution as an accepted solution , you can PM me.
➔ Software engineer : Having more than 3 years of experience in the related industry with the specialization of Shopify theme development , worked on hundreds of stores.
➔ Want to hire me? Email me

tim
Shopify Expert
3269 234 1182

You should start looking in header.liquid section -- in a JS code area:

{% javascript %}
  ...
      this.currentScrollTop = scrollTop;
    

    hide() {
  ... 
{% endjavascript %}

 

This code should look like this -- see the missing closing bracket?

{% javascript %}
  ...
      this.currentScrollTop = scrollTop;
    }

    hide() {
  ... 
{% endjavascript %}

You may have incidentally drag-and-dropped the bracket somewhere below the closing </script> tag of the ld+json code...

 

Also, not strictly related, but also wrong -- you should check the theme.liquid layout  -- you have an extra closing </body> tag there (last line of this code snippet):

<body class="gradient animate--hover-default">
    <style>
        #MainContent {
            background: transparent !important;
        }

        body.gradient {
            background: url("https://cdn.shopify.com/s/files/1/0787/7840/1104/files/pexels-kate-trifo-6414317-2_1c66d80d-ea4e-4d88-8a14-7c3403df0556.jpg?v=1706011764") no-repeat center center fixed !important;
            background-size: cover !important;
            background-attachment: fixed;
            background-blend-mode: overlay;
        }

        .gradient {
            background: transparent !important;
        }
    </style>

    <a class="skip-to-content-link button visually-hidden" href="#MainContent">
        Eiti į turinį
    </a>

<style>  </style>
</body>

 

If my post is helpful, consider liking it -- it will help others with the same problem find solution.