CMS Filters only working after 3-4x page refreshes

Hello Luis and F’insweet,

I’m having a problem where my CMS filters don’t work upon first load, I need to refresh the page a couple of times to make them active.

Here’s a video about the issue

Here’s a read-only link

And here’s the live URL

I found this related support topic but this doesn’t seem to be the case for me I think because all the CMS items load up pretty quickly. What I also noticed is that waiting for a couple of seconds/minutes upon first load won’t solve the issue, it only works after multiple refreshes.

Thanks a lot for looking into the issue! Hopefully you can offer me some solution.

All the bests,
Bence

Hey @de.skaaa!

Adding the Attributes Callbacks to your page I noticed that CMS Filter is finishing loading before CMS Nest has done it’s job, this maybe why on initial page load it seems to take a while for filters to start working correctly.

You might want to take a look at this guide on how to nest large collections → CMS Nest reaching over 100+ CMS items - #2 by Support-Luis additionally you’d need to initialize CMS Filter with this code snippet

<script>
  window.fsAttributes = window.fsAttributes || [];
  window.fsAttributes.push([
    'cmsnest',
    (listInstances) => {
      console.log('cmsnest Successfully loaded!');
      window.fsAttributes.cmsfilter.init();
    },
  ]);
</script>

Let me know if this helps out!

Also, both CMS Nest and CMS Load cache the page info for better performance next time a user visits the page :wink:

1 Like

thanks @Support-Luis, this did the job! you’re the best!

1 Like