# BUG? - "current selected user" ID is correct, but the collection doesn't reflect that

**URL:** <https://community.weweb.io/t/bug-current-selected-user-id-is-correct-but-the-collection-doesnt-reflect-that/2098>\
**Category:** Ask us anything\
**Created:** [March 22, 2023, 8:07am UTC](https://community.weweb.io/t/bug-current-selected-user-id-is-correct-but-the-collection-doesnt-reflect-that/2098 "2023-03-22T08:07:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmbroiseDhenain](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ambroisedhenain/32/2609_2.png) [@AmbroiseDhenain](https://community.weweb.io/u/AmbroiseDhenain)\
**Post date:** [March 22, 2023, 8:07am UTC](https://community.weweb.io/t/bug-current-selected-user-id-is-correct-but-the-collection-doesnt-reflect-that/2098/1 "2023-03-22T08:07:10Z")

</div>

Upon clicking on a collection item, I essentially go to another page with a dynamic ID in the url.  
Then, this ID is being used by a collection to fetch only the current selected user.  
But, the ID and the collection’s result are out-of-sync when doing that multiple times in the same session. Refreshing fixes the issue and reload the proper user’s info.

I’m not sure if it’s a bug, a race condition, or something I did wrong.

Video:  
[https://watch.screencastify.com/v/aYvsae4WGVBPvv2blPXZ](https://watch.screencastify.com/v/aYvsae4WGVBPvv2blPXZ)

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [March 24, 2023, 11:27am UTC](https://community.weweb.io/t/bug-current-selected-user-id-is-correct-but-the-collection-doesnt-reflect-that/2098/2 "2023-03-24T11:27:13Z")

</div>

Hi @AmbroiseDhenain 👋

From what I can tell, you did nothing wrong 🙂 Just asked the tech team to look into it.

---

<div class="post-metadata">

**Author:** ![AmbroiseDhenain](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ambroisedhenain/32/2609_2.png) [@AmbroiseDhenain](https://community.weweb.io/u/AmbroiseDhenain)\
**Post date:** [March 29, 2023, 8:38am UTC](https://community.weweb.io/t/bug-current-selected-user-id-is-correct-but-the-collection-doesnt-reflect-that/2098/3 "2023-03-29T08:38:31Z")

</div>

Any news? I didn’t find a way to fix that, yet.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [March 29, 2023, 12:49pm UTC](https://community.weweb.io/t/bug-current-selected-user-id-is-correct-but-the-collection-doesnt-reflect-that/2098/4 "2023-03-29T12:49:57Z")

</div>

It has been added to the developers’ roadmap but yet to be started.

---

<div class="post-metadata">

**Author:** ![AmbroiseDhenain](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ambroisedhenain/32/2609_2.png) [@AmbroiseDhenain](https://community.weweb.io/u/AmbroiseDhenain)\
**Post date:** [April 5, 2023, 2:44pm UTC](https://community.weweb.io/t/bug-current-selected-user-id-is-correct-but-the-collection-doesnt-reflect-that/2098/5 "2023-04-05T14:44:01Z")

</div>

@Joyce I need a solution, it’s been 2 weeks, my client isn’t happy 😬  
Any workaround?

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [April 5, 2023, 3:59pm UTC](https://community.weweb.io/t/bug-current-selected-user-id-is-correct-but-the-collection-doesnt-reflect-that/2098/6 "2023-04-05T15:59:47Z")

</div>

Can you call the action fetchCollection after you updated the currentUser variable ? Your collection filtering on the id should be up to date and the page displaying it too, you can call it on page load after the redirection for example

---

<div class="post-metadata">

**Author:** ![AmbroiseDhenain](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ambroisedhenain/32/2609_2.png) [@AmbroiseDhenain](https://community.weweb.io/u/AmbroiseDhenain)\
**Post date:** [April 5, 2023, 4:55pm UTC](https://community.weweb.io/t/bug-current-selected-user-id-is-correct-but-the-collection-doesnt-reflect-that/2098/7 "2023-04-05T16:55:09Z")

</div>

@Alexis I don’t “update” the `currentUser` variable, it’s provided by WeWeb automatically.

But I managed to do something like that at the page level. 👍

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/1df33346f00891b999cfeaed38cdfb9e0ed47e9f.jpeg)

I wish that wouldn’t be necessary, I’ll need to do it for all of my pages one by one.  
But better than before! 🙂
