I accidentally published a page that had the wrong HubDB selected as the data source. When I connect the right table and publish the page all of the dynamic pages that were created from the wrong table become 404 but show up in Hubspot reporting and Google Console. Is there a way to create dynamically created pages?
Hi @likwid, Here are some steps to ensure the old dynamic pages are removed:
Reconnect the HubDB Table - Go to the Page Editor where the dynamic pages are set up. - Change the Data Source back to the HubDB table. - Publish the page again to ensure HubSpot recognizes the connection.
You also have to change the table id set in your module or template e.g. {% for row in hubdb_table_rows(right_table_id) %} <li><a href="{{ request.path }}/{{ row.hs_path }}">{{ row.hs_name }}</a></li> {% endfor %}
Hi @likwid, Here are some steps to ensure the old dynamic pages are removed:
Reconnect the HubDB Table - Go to the Page Editor where the dynamic pages are set up. - Change the Data Source back to the HubDB table. - Publish the page again to ensure HubSpot recognizes the connection.
You also have to change the table id set in your module or template e.g. {% for row in hubdb_table_rows(right_table_id) %} <li><a href="{{ request.path }}/{{ row.hs_path }}">{{ row.hs_name }}</a></li> {% endfor %}
Thanks for the reply. The dynamic pages were created by setting up a HubDB and filling in the hs_path column with a page path example-page-path.
The creating a component with this line of Hubl {% if dynamic_page_hubdb_row %} and setting up a page with the data source
Then publish the page and go to domain/example-page-path. I published the page the first time with the wrong data source and switch the data source and published the same page. The original pages from the wrong data source are still out there causing problems. I read that if you reattached the wrong data source again and unpublish the page it will remove the dynamic page. The reconnect the right source and publish again. That doesn't seem to be working. Thanks for your help on this.
@likwid I think the only real option would be to create URL redirects to remove them from your Google Console, but I'm not sure there's a way to exclude them from your HubSpot reporting - I'd need to know more about how the dynamic URLs were generated and if you used the same page when you connected the new data source or if you created a clone/new version first.
If my reply answered your question please mark it as a solution to make it easier for others to find.