mgGetTags caching?

Just finally got around to replacing a standard modx gallery with more gallery and must say its excellent :smile:

One thing I’m stuck on - I’ve used mgGetTags to pull the used tags from a gallery and I’m using them with an existing sortable masonry / isotope layout - and all good…

However, I changed one of the tags slightly on an image and now the list includes the old one and new one in the sort menu - I can’t seem to make it forget the old one…

I’ve emptied local caches, modx caches, and swapped browsers to no avail - am I missing something ?

Many thanks!

1 Like

There’s caching in core/cache/moregallery/, but that should get automatically cleared when you make a change anyway, so that’s probably not it.

Perhaps you’re listing all tags and not just tags that have images assigned? If so, tags are stored separately and removing the last usage of a tag does not remove the tag record itself, meaning you might see both tags in the front- and back-end.

Hi Mark,

Ok that’s maybe it - is there a distinction in the call ?

Currently I’m bringing in the tag menu via [[!mgGetTags? &tpl=GalleryFilterMG-TAG]]

my tpl is just:


Should I have something different to just pull assigned tags - of which there are currently just two ?

(I did delete the old one, yes).


That should get filtered on the current resource by default (, but you could see if it works better when you add the resource param:

[[!mgGetTags? &tpl=`GalleryFilterMG-TAG` &resource=`[[*id]]`]]

Hi Mark,

Yep that did the trick straight way :slight_smile:

Thank you!

1 Like

Just stumbled upon this. For me it’s also necessary to provice


Otherwise it would take also “dead” tags.

Speaking of “tags are stored separatedly”:
is there a way to access/clean them (other than db/gitify)?