Can't upload anything anymore due to "DisabledException: 'module' is disabled in this context" error

Hi,

I’ve been working on a HubSpot theme for a client for over three years. I have a layout/base in which I have a global partial header.html. In the header.html I have 7 dnd_areas where the customer can place modules. They have built this header with modules about three years ago.

All of the sudden, every template I adjust and upload gives an the error on the line 7 that loads the layout/base

{% extends "./layouts/base.html" %}

The error is from the a module that is used in the header

- line 7: Error in /twynstragudde-theme/modules/artikelenbox.module/module.html: DisabledException: 'module' is disabled in this context

Now I have a hard time about two things.

  1. I can’t for the love of me figure out how to change the “content_types” in the meta.json for these modules to work in this global template context.
  2. I am bazzled on how something that has been working for over three years and is a large portion of our website all of the sudden (I assume) from HubSpot perspective gets blocked. I can’t find anything about this in the HubSpot development changelog; but it certainly looks like this is the case.

Kindly get back to me.

Luuk van Aggelen

Hi @LvanAggelen,
Thank you for posting to the Community!
I’d like to tag in some Subject Experts to see if they will be able to provide some guidance! Hi @MBERARD @Anton and @alyssamwilie Do you have any ideas on this one?
Cassie, Community Manager

I hope someone can help me, maybe someone from the HubSpot CLI development team. The partial is loaded in every template, so I can’t make any changes to templates at all. And the client and website are far too big to start experimenting with changing the header on the live website.

Hey, were you able to figure out a fix fore this? In my case, it’s showing up even for an unused module!

Hi Josef,

Yes, and no. I found a workaround.

  • I empty the module that gives the ‘error’ completely, and upload it empty.
  • after that I upload the changes to the templates, and it works.
  • Then I revert the problematic module, and upload that again.

Let me know if that worked for you.

Hey @LvanAggelen,

I assume your module is embedded something like

{% module 'artikelenbox' path="/twynstragudde-theme/modules/artikelenbox.module/module.html" %}

this can’t work for several reasons:

  1. The .module extension is visible only for local development and because how HubSpot will manage things in the backend
  2. module.html is also is only for HubSpot managing things

Therefore, try this code:

{% module 'artikelenbox' path="/twynstragudde-theme/modules/artikelenbox" %}

simply remove the .module and the /module.html

Personally I’m embedding my modules almost always like this and never had problems.

Maybe the error starts occuring as HubSpot might have changed something on their end

best,

Anton

Hi Anton,

Thanks for your reply! I have not embedded the module; the module is present in a dnd_area that is set in HubSpot in the the global header. It’s been present for some years, but only now is starting to give errors.

Kind regards.