I have a carousel module which draws in data from a hubdb table. This works, but once I try to query for a specific category (dropdown in the hubdb), I get the error:
with no explanation on what the error actually is.
I had a chat with support and they were a bit stumped as well so I've come here looking for answers.
<ul>
{% for row in hubdb_table_rows(<tableid>, "&category="~module.category) %}
<li class="carousel-item">
</li>
{% endfor %}
</ul>
The Category variable is set to 1, 2, 3, 4 etc which corresponds to the select options in the hubdb column. If I change the module.category to just a number, it works and lets me publish.
I can preview the module and it all works, but it refuses to let me publish stating the error mentioned above.
Cannot resolve property "[missing {{token}} value] in Custom module
Just a note for next developers who probabily will stuck with this thing like we did. 😞
Wrap your code with with `{% if (module.category) %} .... {% endif %}`. The error comes from the "undefined/unexpected/null" parameter passed to `hubdb_table_rows` function.
Cannot resolve property "[missing {{token}} value] in Custom module
So I noticed something really strange.
If I create a table field and do:
{% for row in hubdb_table_rows(module.table, "&category="~value) %}
instead of
{% for row in hubdb_table_rows(<table id>, "&category="~value) %}
it works. This is strange as both lines of code are identical when parsed. I tried replacing value with just a number before and it worked fine, which leads me to believe this might be an error in hubspot's parser?
Cannot resolve property "[missing {{token}} value] in Custom module
That's because anything inline would auto adjust to the height of the container if using flexbox. You can see the effects if you set a background colour on your <a> or <span> and use flexbox to vertically align.