Assets loaded when Cwicly theme isn't being used

I’ve noticed that if you’re using a different theme, gallery.css and maps.js get loaded on your page even if you’re not using a Gallery or Maps element.

If you activate the Cwicly theme, then those assets no longer get loaded (correct behavior).

Here’s a video: Loom | Free Screen & Video Recording Software | Loom

Hey @sunny,

Indeed, I remember you bringing this up a couple of months ago! Thanks for bringing this up here.

It would seem that the Gutenberg “only load assets when needed” that we apply for these two elements doesn’t work as well as our own implementation :wink: that is used for other Cwicly scripts/stylesheets.

Please bear with me while I take a look at this and see if that’s the case.

1 Like

No problem. I saw them in my Asset Cleanup rules, so I figured I’d see if I could make it easier to reproduce :slight_smile:

I don’t envy you for having to battle against Gutenberg sometimes!


Hi @sunny,

Thanks for the report.
This should be fixed in 1.2.2.

If you still experience asset loading when blocks aren’t present, I’d be grateful if you could let us know :slight_smile:


1 Like

Looks to be working perfectly so far!

1 Like