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

**URL:** <https://community.hubspot.com/t/getting-error-rendering-module-tag-error-on-hubspot-dynamic-pages/86578>\
**Category:** CMS Development\
**Tags:** hubdb, enterprise\
**Created:** [August 1, 2023, 4:58pm UTC](https://community.hubspot.com/t/getting-error-rendering-module-tag-error-on-hubspot-dynamic-pages/86578 "2023-08-01T16:58:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MEmpeno](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@MEmpeno](https://community.hubspot.com/u/MEmpeno)\
**Post date:** [August 1, 2023, 4:58pm UTC](https://community.hubspot.com/t/getting-error-rendering-module-tag-error-on-hubspot-dynamic-pages/86578/1 "2023-08-01T16:58:18Z")

</div>

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:

```lia-code-sample
{# 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](https://medicushcs.com/test-dynamic-job?hsDebug=true)  
Thanks!  
Best,

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [August 3, 2023, 12:57pm UTC](https://community.hubspot.com/t/getting-error-rendering-module-tag-error-on-hubspot-dynamic-pages/86578/2 "2023-08-03T12:57:15Z")

</div>

Hi, [@MEmpeño](https://community.hubspot.com/t5/user/viewprofilepage/user-id/565856) 👋 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
