HubDB not working in CSS

hubdb

#1

This was working before but suddenly a load of our CSS vanished.
There’s no error thrown, it just fails silently which makes it really hard to debug.

Something as simple as this prints nothing:

{% set icon_gradients=hubdb_table_rows(123456) %}
{% for gradient in icon_gradients %}
    .selling-point--{{ gradient.name }} {
        fill: url(#svg-lg--{{ gradient.name }});
    }
{% endfor %}

However this prints what you would expect:

{% set icon_gradients=[{name: 'blue'}, {name: 'red'}] %}
{% for gradient in icon_gradients %}
  .selling-point--{{ gradient.name }} {
    fill: url(#svg-lg--{{ gradient.name }});
  }
{% endfor %}

Prints:

.selling-point--blue {
  fill: url(#svg-lg--blue);
}
.selling-point--red {
  fill: url(#svg-lg--red);
}

#2

Hi @brookjordan,

Thank you for your patience on this; this topic slipped under my radar. Can you send me a link to the stylesheet in question? That appears like it should work.


#3

Ha, I was pulled off’ve this project and forgot to check back about this.
… plus, I just checked and it appears as if it may be working again. HubSpot had the hiccups, but it seems to have been resolved.

However, this is what I typed out before I noticed.

Here is a link to the stylesheet:
https://app.hubspot.com/design-manager/407937/code/5287088058

And the base colours which it imports:
https://app.hubspot.com/design-manager/407937/code/5252304799

You can see that I actually ended up manually coding this because it wasn’t being printed.

Sorry about the super late reply!


#4

Hi @brookjordan,

No worries, it clearly slipped under my radar as well. It appears to be working again; feel free to reach back out in this thread if you see this issue going forward.