Oct 14, 202410:57 AM - edited Oct 14, 202410:59 AM
Contributor
Modules Disappearing After Edits in Editor
SOLVE
Hi there,
I am developing a blog post template using a series of custom modules. It appears that if I change the value of a text field within a module, the rest of the text fields in that module disappear on the page and don't reappear until the page or module is reloaded.
For example, each of the fields in the blog banner in the following screenshot are editable via the HubSpot content editor.
When I make a modification to a single one of the fields, 1-2 other fields will disappear from the screen. Below, I will change the 'Summary Text' field to add a single extra character:
You can see that the title field has completely disappeared and the subtitle field has reverted to a different date without the user making edits to that field.
I am using macros to develop some of these so I'm wondering if those only fire on page load or something along those lines? What could be causing these elements to disappear/change?
@bearons, this is not related to the macros; I tested rending the content variables outside of the macro and they reverted to defualt values as well. However, I did confirmed this is related to the content variables. So, this appears to have something to do with the timing of the module refresh and its access to the global content variable.
Thanks for flagging this to the HubSpot Community. To help troubleshoot, could you let us know:
- Which editor are you using (email, landing page, website)? - Does this happen to specific modules or any module you edit? - Are there any error messages or warnings?
@bearons, this is not related to the macros; I tested rending the content variables outside of the macro and they reverted to defualt values as well. However, I did confirmed this is related to the content variables. So, this appears to have something to do with the timing of the module refresh and its access to the global content variable.
Hi @JTBuys , that code is the same exact code as the textElementBANNER macro listed at the top of the included code. The only difference is that the STL_macros.textElement macro exists in a separate file containing only macros that is being loaded in via an 'includes' statement at the top of the current file, as such: