Skip to content
  • There are no suggestions because the search field is empty.

How to Fix Module Code Showing Instead of Text in Blog Post Preview

MThis article explains why module code may appear in related blogs or preview listings and provides guidance on how to resolve this issue.

Understanding the Issue

When module code is displayed instead of the expected content in the related articles section of blog posts, it is typically due to a bug in the HubSpot platform. This issue arises when custom modules are added directly into the main body of a blog post.

Causes of Module Code Display

  • HubSpot Bug: The current behavior is linked to how HubSpot parses custom modules within blog post content. When these modules are included in the main body, the system may not handle them correctly, leading to the display of raw code instead of formatted content.
  • Improper Module Placement: Adding custom modules, such as the PWR-sec text module, directly into the blog post body can cause parsing issues, resulting in code being shown in listings.

Recommended Solutions

To prevent module code from appearing in your blog post previews, consider the following options:

  1. Remove Custom Modules: Avoid placing custom modules in the main body of your blog posts. Instead, use standard text and image elements that are compatible with HubSpot's parsing.
  2. Adjust Blog Listing Settings: Change your blog listing settings to utilize the meta description instead of the blog post content. This can be done by navigating to your Theme Settings:
    • Go to Blog > Blog Listing
    • Select Get summary from and choose Meta description.

Conclusion

If you encounter module code in your related blog listings, it is likely due to a parsing issue with custom modules in the blog post body. By removing these modules or adjusting your blog listing settings, you can resolve this issue and ensure that your content displays correctly. If the problem persists, it is advisable to stay updated on any fixes from HubSpot regarding this bug.