CMS Development

mdurchholz
Participant

My "live" theme is using modules from my "staging" theme

I have a unique scenario where we took on some work for a client who had an existing hubspot site. In order to incorporate some new designs, we decided to clone the original template to create a "staging" theme. After successfully getting the new designs to live, I am now noticing that the live theme is still using the modules from the staging theme.

 

Is this a bug in hubspot, or do pages reference the modules that they were built with? I assumed that when I switched the theme to use the "live" version that the modules under the chosen theme would be used. Is there a preferred method for extending modules to include updated designs without effecting what is on the live site?

7 Replies 7
mdurchholz
Participant

My "live" theme is using modules from my "staging" theme

Thank you for the detailed response, Jennifer!

 

One question I have is if we primarily use the child theme for development/sandbox purposes, does the page content still need to be rebuilt when moving the content to a page using the parent theme? I am trying my best to utilize the "Content Staging" environment as well so that I can simply push pages live once completed. Does the child theme module get assigned a new "module reference ID", or does it utilize the reference ID from the parent theme?

Jnix284
Most Valuable Member | Elite Partner
Most Valuable Member | Elite Partner

My "live" theme is using modules from my "staging" theme

You're welcome @mdurchholz, happy to help!

 

If you use the child theme for development, you'd want to also use it for your live pages - that's where determining whether the content is available on the front-end comes into play.

 

Depending on the complexity of your current theme configuration, it might not make sense to switch to building with a child theme.

 

The child theme module, if unique from the parent, would still have a unique ID.

 

I worked with a phenomenal freelance developer (back when I worked with the agency that created POWER Pro theme, the second top-selling theme in the marketplace) who created a script to overwrite the module ID when support ran into a similar situation with a user.

 

He created a separate product called SpaceRockX that makes updating child theme modules easier when they've been customized - I don't think your situation is identical to the solution this product provides, but considering I learned nearly everything I've shared with you from him, I think it would be best to reach out directly via their contact form to see if his team can help directly.

 

I imagine he could write a script that you could use to overwrite the module IDs between your production and live accounts if you're willing to pay for help.

 


If my reply answered your question please mark it as a solution to make it easier for others to find.



Jennifer Nixon - Delivery Lead at Aptitude 8

connect with Jen on Linkedin

mdurchholz
Participant

My "live" theme is using modules from my "staging" theme

So now that I am working on building out a child theme, does that mean that the global headers and footers also need to be rebuilt? I am noticing that the page using the child theme is not inheriting the global header/footer data from the parent theme.

Jnix284
Most Valuable Member | Elite Partner
Most Valuable Member | Elite Partner

My "live" theme is using modules from my "staging" theme

Hi @mdurchholz that's correct, a few things about child themes:

 

1 - will inherit theme settings at time of creation from parent, once created each are individual and updates to one do not apply to the other

 

2 - any global content is separate and has to be configured/updated separately

 

3 - any file overwritten in the child theme (with same name as the file in the parent theme) will no longer receive updates from changes made to that file in the parent theme

 

4 - custom modules in the child theme are independent of the parent, if they have unique file names, they are only connected to the parent via any macros, CSS, JS that is not overwritten in the child

 

Hope this helps further clarify!

 


If my reply answered your question please mark it as a solution to make it easier for others to find.



Jennifer Nixon - Delivery Lead at Aptitude 8

connect with Jen on Linkedin

0 Upvotes
mdurchholz
Participant

My "live" theme is using modules from my "staging" theme

Does the same thing go for "saved sections"? I am noticing that a saved section in the parent theme is not appearing as an option within the child theme.

Jnix284
Most Valuable Member | Elite Partner
Most Valuable Member | Elite Partner

My "live" theme is using modules from my "staging" theme

Hi @mdurchholz, yes, saved sections are per theme - they can also be coded into the theme directly as a section template if you need to migrate them from your parent to child theme


If my reply answered your question please mark it as a solution to make it easier for others to find.



Jennifer Nixon - Delivery Lead at Aptitude 8

connect with Jen on Linkedin

0 Upvotes
Jnix284
Most Valuable Member | Elite Partner
Most Valuable Member | Elite Partner

My "live" theme is using modules from my "staging" theme

Hi @mdurchholz happy to help clarify, this isn't a bug.

 

Modules can come from any theme or even stand-alone assets, so changing the theme for the page you built doesn't change the modules to that theme - every module has a unique ID number.

 

If you want to use the live version of the theme and the corresponding live modules, you'd need to not only swap the theme, but also rebuild the modules in the drag and drop editor using the live theme version of the modules.

 

One way around this is to copy the hubL code from your staging theme and create a template in your live theme that references your live theme modules (replacing the staging theme modules), then build out your pages live.

 

Rather than making a "copy" and having a staging theme, you can use a child theme which is dependent on your main theme and you can then make modifications there - this will allow you to retain access to the main theme elements while extending them (and with setting the content availability to false, you can wait to make them available on the front end until you're ready).

 


If my reply answered your question please mark it as a solution to make it easier for others to find.



Jennifer Nixon - Delivery Lead at Aptitude 8

connect with Jen on Linkedin