CMS Development

fm360
Participant

Receive only empty attributes from global "theme" variable

Hello HubSpot team,

Unfortunately, in HTML files we suddenly get only empty attributes from the global "theme" variable. In CSS files it still works. Can you take a look at this urgently?

The change must have occurred in the last few days.

 

The problem appears in our custom theme (deployed in our beta + normal portal/account) and also in the standard theme boilerplate.

 

Best regards
Felix

0 Upvotes
3 Replies 3
dennisedson
HubSpot Product Team
HubSpot Product Team

Receive only empty attributes from global "theme" variable

@fm360 ,

Thanks for adding the code example

@stefen , @Kevin-C  have you all experienced this before?

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Receive only empty attributes from global "theme" variable

Hey @fm360 ,

Can you provide more details about the problem?  Screenshots and code blocks would be usefule here

 

0 Upvotes
fm360
Participant

Receive only empty attributes from global "theme" variable

Hi Dennis (@dennisedson),

 

To make clear the exact problem, here's an example. We added a script tag in the html+hubl file templates/layouts/base.html of the boilerplate, where we output the contents of the "theme" hubl variable.

 

<!doctype html>
<html lang="{{ html_lang }}" {{ html_lang_dir }}>
  <head>
    <meta charset="utf-8">
    <title>{{ page_meta.html_title }}</title>
    <script>
      window.test123 = '{{theme}}'
      window.test789 = '{{theme.buttons}}'
    </script>
...

 

Rendered it looks like this:

 

<!doctype html><!-- start coded_template: id:37097144412 path:cms-theme-boilerplate-sw/templates/layouts/base.html -->
<html lang="en"><head>
    <meta charset="utf-8">
    <title>test-sw-001</title>
    <script>
      window.test123 = '{typography=, tables=, buttons=, spacing=, footer=, global_colors=, global_fonts=, header=, forms=}'
      window.test789 = '{vertical_padding=, colored=, transparent=, footer=, border_type=, horizontal_padding=}'
    </script>
...

 

As you can see, all the properties of "theme" are empty.

 

Thanks,

Felix

0 Upvotes