Getting "Error rendering module tag error" on hubspot dynamic pages

Hi,

I encountered an error while working with dynamic pages on HubSpot. The error message is as follows:
“Error rendering module tag: class com.hubspot.jinjava.interpret.LazyReference cannot be cast to class java.util.Map (com.hubspot.jinjava.interpret.LazyReference is in an unnamed module of loader ‘app’; java.util.Map is in module java.base of loader ‘bootstrap’)”.
The code below shows how I am checking the route level:

{# Get the URL request path and store it in an array #}
{% set requestPath = [] %}
{% for item in request.path|split('/') %}
{% if loop.index != 1 %}
{% do requestPath.append(item) %}
{% endif %}
{% endfor %}

{{ dynamic_page_route_level }}
{% if dynamic_page_route_level == 0 %}
{% elif dynamic_page_route_level == 1 %}
{% set selectedJobType = (requestPath[0] == 'all') ? "" : dynamic_page_hubdb_row.hs_name %}
{% set paginationType = dynamic_page_hubdb_row.hs_path %}
{% elif dynamic_page_route_level == 2 %}

{% set selectedJobType = (requestPath[0] == 'all') ? "" : dynamic_page_hubdb_row.hs_parent_row.hs_name %}
{% set selectedSpecialtiesDynamic = (requestPath[1] == 'all') ? "" : dynamic_page_hubdb_row.hs_name %}

{% elif dynamic_page_route_level == 3 %}

{% set selectedJobType = (requestPath[0] == 'all') ? "" : requestPath[0] | replace("-", " ") | title %}
{% set selectedSpecialtiesDynamic = (requestPath[1] == 'all') ? "" : dynamic_page_hubdb_row.hs_parent_row.hs_name %}
{% set selectedStates = (requestPath[2] == 'all') ? "" : dynamic_page_hubdb_row.hs_name %}
{% endif %}​

{# build job_type query) #}
{% set typeFilterParams = "" %}
{% if selectedJobType %}
{% if selectedJobType == 'Physician' %} 
{% set typeFilterParams = "&job_type__ne=Physician+Assistant&job_type=" + selectedJobType %}
{% else %}
{% set typeFilterParams = "&job_type=" + selectedJobType %}
{% endif %}
{% endif %}

{# build specialty query) #}
{% set specialtyFilterParams = "" %}
{% if selectedSpecialtiesDynamic %}
{% set specialtyFilterParams = "&specialties__in=" + selectedSpecialtiesDynamic %}
{% set selectedSpecialtiesArr = [] %}
{% do selectedSpecialtiesArr.append(selectedSpecialtiesDynamic) %}
{% endif %}

{# build job_state__in query) #}
{% set stateFilterParams = "" %}
{% if selectedStates %}
{% set stateFilterParams = "&job_state__in=" + selectedStates %}
{% set selectedStateArr = [] %}
{% do selectedStateArr.append(selectedStates) %}
{% endif %}

{# Add type / specialties / states params #}
{% set filterParams = filterParams + typeFilterParams + specialtyFilterParams + stateFilterParams %}

{# Build the queryparam (/date/offset/limit) #}
{% if urlParams %}
{% set queryParams = filterParams %}
{% else %}
{% set queryParams = '&offset=0&limit=10' + filterParams %}
{% endif %}

<p>filterParams: {{filterParams}}</p>
<p>queryParams: {{queryParams}}</p>

{# Get Jobs Custom Object #} 
{% set jobs = crm_objects('job', queryParams, 'hs_createdate, job_title, job_state, job_type, specialty, specialties, description, hs_object_id, crowdsource, status, record_type, date_posted___fulfil, salesforce_id', true) %}

here is the urls:
i noticed when there is a hs_preview or hs_debug the module is loading with no problem: Locum Tenens - Medicus HCS
Thanks!
Best,

Hi, @MEmpeño :waving_hand: Thanks for your question! Were you able to make any progress with this issue?

If not, a first step to troubleshoot this is to isolate where the error is coming from. I would suggest commenting out parts of the code where you’re accessing properties from dynamic_page_hubdb_row, until the error disappears. This way, you can narrow down which variable assignment is causing the problem.

Best,

Jaycee