Aug 17, 20225:23 AM - edited Aug 17, 20225:25 AM
Contributor
How convert a custom local module to a global module?
SOLVE
Hi guys, I'm new to HubSpot. I have a custom local module, I need to make it global. I read this but it doesn't work for me, I don't see any more buttons in the inspector where I can convert my module
How convert a custom local module to a global module?
SOLVE
Thanks for the solution, but I'm not using local development yet. Therefore, I solved my problem like this: I created a new global module, copied the code there and created the necessary fields))). It wasn't difficult because my custom module has few fields, but if there were a lot of them, this method wouldn't work. So thanks for the tips, I'll try to use them
Aug 17, 20227:38 AM - edited Aug 17, 20227:46 AM
Top Contributor
How convert a custom local module to a global module?
SOLVE
The local dev method @Anton suggests is the way to go!
A quick note though, if you think there's a posibility that you'll need the local version again down the line, I'd save a copy of it.
There's a bug a few of us have encountered in that scenario. Quoting @Stephanie-OG who described the bug succinctly:
When you change a module's parameter from "global": true to "global": false in the meta.json file, in the editor it's no longer showing the global overlay, but when you click into it it has the "The creator of this template prevented editing this module in the content editors." message.
Don't know if that bug still exists. But it did 3 months ago and a year ago in my case.
I was able to use revision history to roll back to a pre-bug state, but that might be a pain in the **bleep** if you've made substantial changes to your module by then.
How convert a custom local module to a global module?
SOLVE
I feel your pain. The bug is still there, although.....
When you open the JSON file of that module, it will have for every subsection a parameter "locked: true". In my case, I just went through the file and marked it all as "locked: false"
How convert a custom local module to a global module?
SOLVE
Thanks for the solution, but I'm not using local development yet. Therefore, I solved my problem like this: I created a new global module, copied the code there and created the necessary fields))). It wasn't difficult because my custom module has few fields, but if there were a lot of them, this method wouldn't work. So thanks for the tips, I'll try to use them