# Certain collections not fetching on page load

**URL:** <https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542>\
**Category:** Ask us anything\
**Tags:** bug\
**Created:** [January 22, 2024, 5:52pm UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542 "2024-01-22T17:52:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![aldencarinahealth](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aldencarinahealth](https://community.weweb.io/u/aldencarinahealth)\
**Post date:** [January 22, 2024, 5:52pm UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/1 "2024-01-22T17:52:24Z")

</div>

When I go back into the editor after logging out and coming back one of my filters on the data collection keeps resetting - causing the query to fail. It maintains the actual function but drops the field and operator. Any advice?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/a/ad09ca12ab2dd2f307e774697da322a4c23df49c.png)

---

<div class="post-metadata">

**Author:** ![aldencarinahealth](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aldencarinahealth](https://community.weweb.io/u/aldencarinahealth)\
**Post date:** [January 22, 2024, 6:32pm UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/2 "2024-01-22T18:32:46Z")

</div>

Ok I think this was unrelated to the query - I had a dropdown component that wasn’t setting values correctly. It expressed in a way, here, that wasn’t super intuitive to me, but working on a separate fix 🙂

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 22, 2024, 8:06pm UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/3 "2024-01-22T20:06:03Z")

</div>

You need to fetch the collection first time in order to be able to see the data. The way WeWeb handles this is after the fetch it “analyses” your data and proposes filters. It can’t foresee your data before you show it to it.

---

<div class="post-metadata">

**Author:** ![aldencarinahealth](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aldencarinahealth](https://community.weweb.io/u/aldencarinahealth)\
**Post date:** [January 22, 2024, 10:03pm UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/4 "2024-01-22T22:03:20Z")

</div>

To clarify - this was a query that had already been working, and that I had built components around

What was happening (and is still something I’m investigating a bit), is that this query was based on the result from another query, which wasn’t updating automatically.

I assumed that all the collections would refresh during every page load, so trying to debug why they arent…

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 22, 2024, 11:22pm UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/5 "2024-01-22T23:22:37Z")

</div>

Collections “update” - a.k.a fetch only if they’re used in a page. - This is how WeWeb actually does it, and it’s a feature. A workaround might be binding that collection to something invisible, or fetching the collection on Page Load with a workflow.

---

<div class="post-metadata">

**Author:** ![aldencarinahealth](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aldencarinahealth](https://community.weweb.io/u/aldencarinahealth)\
**Post date:** [January 23, 2024, 12:55am UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/6 "2024-01-23T00:55:25Z")

</div>

that makes sense - and that is a great feature. I do use it in my page though, so not sure that explains it. The query in particular that isn’t fetching is one that using the auth.uid - do you think that might have special handling?

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 23, 2024, 8:10am UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/7 "2024-01-23T08:10:54Z")

</div>

If you want to fetch a collection on page load and you’re not using it in that page, just fetch it via a Workflow on page load 🙂

---

<div class="post-metadata">

**Author:** ![aldencarinahealth](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aldencarinahealth](https://community.weweb.io/u/aldencarinahealth)\
**Post date:** [January 23, 2024, 4:07pm UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/8 "2024-01-23T16:07:29Z")

</div>

I am using it in the page, or at least I’m using it in one of the components (a drop-down menu) is that sufficient?

---

<div class="post-metadata">

**Author:** ![aldencarinahealth](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aldencarinahealth](https://community.weweb.io/u/aldencarinahealth)\
**Post date:** [January 23, 2024, 6:30pm UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/9 "2024-01-23T18:30:43Z")

</div>

ok for now I just created a page workflow that triggers all the collections. Seems like a bug to me that the page isn’t doing this already

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/758984ad8cae67a592413737aea952b40b71ad57.png)

---

<div class="post-metadata">

**Author:** ![sam1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sam1/32/6724_2.png) [@sam1](https://community.weweb.io/u/sam1)\
**Post date:** [January 23, 2024, 9:37pm UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/10 "2024-01-23T21:37:15Z")

</div>

There’s a fetch collections in parallel option that can make that easier.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 23, 2024, 9:44pm UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/11 "2024-01-23T21:44:56Z")

</div>

Not only easier, but also faster 🙂

---

<div class="post-metadata">

**Author:** ![EduardoChaves](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/eduardochaves/32/12460_2.png) [@EduardoChaves](https://community.weweb.io/u/EduardoChaves)\
**Post date:** [March 5, 2025, 7:50pm UTC](https://community.weweb.io/t/certain-collections-not-fetching-on-page-load/6542/12 "2025-03-05T19:50:59Z")

</div>

I also have a collection used inside a component and for some reason it isn’t automatically fetched. I needed a “on mount” workflow to do this manually.

Not sure if it is a limitation that a collection doesn’t detects its usage inside components.
