GuideFix itContent Hub

HubSpot system pages: the templates a theme needs, and a 404 page pointing at a deleted template

My own portal's 404, 500 and search results pages were set to HubSpot templates that HubSpot now reports as deleted. Nothing flagged it until I opened the setting.

Subscription
Content Hub; Starter portals use HTML + HubL system templates
Permissions
Super Admin or Website settings access; Design Manager access
Time
7 min · Intermediate
Last verified

Short answer

A theme should ship system templates for errors (error_page, used for 404 and 500), password_prompt_page, search_results_page, and the email subscription pages (email_subscription_preferences_page, email_backup_unsubscribe_page, email_subscriptions_confirmation_page). Shipping them is half the job. You also assign them in Settings > Content > Pages > System Pages. In my portal that tab showed the 404 page set to a @hubspot/session template with the message that it had been deleted.

1. What I found

While checking my theme, I opened System Pages. The 404 dropdown showed @hubspot/session/templates/system/404.html with the message "This template has been deleted." The 500 and search results pages were set the same way. Nothing else in the portal had warned me.

System Pages tab with the 404 error page dropdown set to a deleted @hubspot/session template
System Pages (1), the 404 dropdown (2), and the deleted template warning (3).

2. The template types

HubSpot's developer docs list these system template types. The value goes in the template's annotation as templateType:

  • error_page: 404 and 500 pages.
  • password_prompt_page: shown before a password protected page.
  • search_results_page: the built-in site search listing.
  • email_subscription_preferences_page: must contain the email_subscriptions tag.
  • email_backup_unsubscribe_page: must contain the email_simple_subscription tag.
  • email_subscriptions_confirmation_page: where unsubscribe_link_all sends people.
  • Membership pages (login, register, reset) if you use memberships.

The three email types need the _page suffix. I learned that from the upload validator, covered in theme upload validation errors.

404.html in the Design Manager with the templateType error_page annotation highlighted
My theme's 404 template. The annotation (1) sets templateType to error_page.

3. Assign them

  1. Go to Settings > Content > Pages and click System Pages.
  2. Use the dropdowns for 404 error page, 500 error page, Password prompt page and Search results page.
  3. Click Save.

HubSpot's article notes that custom system templates can be selected for any domain connected as a primary domain, and that Content Hub Starter uses HTML + HubL templates for system pages instead of drag and drop.

4. Test it

Visit a made-up URL on your domain. If you get HubSpot's generic page instead of yours, the setting did not save or the domain has its own setting. The domain picker at the top of that settings page switches between the default and each domain.

Sources

New field notes by email

One email when a new article publishes.

Still stuck?

If this did not fix it, the problem is probably specific to your setup. Book a call and we will look at it together.

Book a call with Sam