Skip to main content

Supported products

Requires one of the following products or higher.

  • Content Hub -Enterprise

Code alerts provide a centralized location for developers and IT managers to see an overview listing of issues that are identified inside of your HubSpot CMS. By fixing the issues that are identified in Code Alerts it can help to optimize your website by helping to improve your customers experience and your sites performance as a whole.

Dashboard for code alerts

View your code alerts for your entire portal by clicking on the Sprocket Menu from any published CMS page you are authenticated to and choosing View Code Alerts or go directly to Code Alerts.

View Code Alerts from the Sprocket Menu

There are multiple types of assets that code alerts can scan within your HubSpot CMS website. These are listed below.

Asset typeDescription
Blog PostA blog post from one of your HubSpot blogs.
Site PageA website page on the HubSpot CMS.
Landing PageA website page with a specific purpose — the objective of a landing page is to convert visitors into leads.
BlogYour HubSpot blog listing page.
ModuleReusable components that can be used in templates or added to pages.
TemplateTemplates are reusable page or email wrappers that generally place modules and partials into a layout.
CSSA Cascading Style Sheet file.
Knowledge ArticleAn article from your HubSpot Knowledge Base.
UnknownWhen an asset type is unknown.

There are multiple types of issues that your assets can have. If your asset has more than one issue it will be listed multiple times inside of your code alert dashboard.

IssueExampleDescription
HubL limitThe HubL function blog_recent_tag_posts is used 11 times on this page. blog_recent_tag_posts has a limit of 5 uses per page.Certain HubL functions have limits to their usage. If your function exceeds its limits, you will be shown this issue.
CSS combiningThere is a syntax error in a line of code that is preventing the CSS files from being combined.Identifies CSS files that contain issues that would prevent the minification/combining of the file. There is also an option to Show syntax errors that are related to this asset.
Output too bigThis page is 10446 Kilobytes. The size limit is 9765 Kilobytes.The generated HTML for the page has reached more than the limit. This may result in seeing a blank or partial page.
Template errorThere is an error in the code that is preventing this template from being rendered.Identifies errors in your template code that prevent the template from being rendered.
UnknownUnknown issueWhen the system has a hard time identifying the error in the asset, an unknown issue will be assigned.

Code alerts include deep linking to assets where alerts are detected. When hovering over a row, you will be provided with the following options per asset type.

The actions button will provide you with a link to open the corresponding template or module in the design manager.

Template and Module Issues

The actions button will provide you with a link to open the corresponding stylesheet in the design manager, view your file with debugging info, or show you the syntax errors.

CSS Issues

When choosing “Show syntax error” you will be shown a modal window with additional details about the syntax error along with the line number where the error exists.

Syntax errors details modal