CMS Development

Track
Member

Blog Post body not appearing or editable

So after a long, troubleshooting day with trying to find out why the heck I can't edit or see a Blog Post body I've discovered the following:

 

First off, we have the Blog Post template(/templates/blog-post.html).
This contains both 

<h1>{{ content.name }}</h1>
and 
{{ content.post_body }}
wheras it with some 'behind the scenes black magic' turns them into edtiable fields of (unknown/undocumented sort).

The issue I faced was that no matter what I did I could not get any GUI editorial options or clickable areas for the "post_body" - even though it was appearing in the left-hand-side Content tab. Clicking on it did nothing beside putting me back to the "Add" tab.
Track_1-1679068956477.png


I spent hours trying to remove our custom css, overwritten default modules, copy pasted all possible blog-related files from the boilerplate project - everything was basically stock at this point.

I was giving up and on a path to ignore that 'black magic {{ content.post_body }}' and just manually insert a default rich-text module. 
And while having both active in the code;

{{ content.post_body }}

{% module "rt"
 path="@hubspot/rich_text",
 label="rt"
%}

 

 

 the tarnation post_body start appearing above the rich-text module.....
So that told me that whatever black magic is behind that 'content.post_body' it  sure as **bleep** is dependent on the default rich-text module - and it's not getting it unless I f.e. add one manually in on the template with it.

So with that I could stop looking for "blog"-related things and look for "rich-text"-related. And soon after I find this in our theme.json:

 

"hidden_modules": [
 "@hubspot/header",
 "@hubspot/rich_text"
]

 

Now this is your way of allowing us to hide your default modules from the HS GUI. (doc)
But guess what, it also hides it from your own internal blog post! The doc only explains that it will "just hide it from the editors", but here we are. God, I hate black magic stuff

0 Replies 0

0 Replies

No replies on this post just yet

No one has replied to this post quite yet. Check back soon to see if someone has a solution, or submit your own reply if you know how to help! Karma is real.

Reply to post

Need help replying? Check out our Community Guidelines