"Like" button UI doesn't update correctly after page reload and unlike action

Hi everyone,

I’ve implemented a “Like” system in my app where clicking the like button creates a Like record, and clicking it again (if already liked) deletes that record — effectively unliking the post.
Everything works fine without a page reload: the like and unlike actions reflect immediately in the UI.

However, there’s a strange behavior when I reload the page:

  1. After clicking “Like”, the record is created properly.
  2. I then reload the page.
  3. When I click again to unlike:
  • The Like record is correctly deleted from the database (confirmed in the data tab).
  • But the button’s visual state does not update immediately — it still shows as if it’s “liked”.
  • Sometimes, clicking again creates a second like, even though there should be only one per user/publication.
  1. After manually reloading the page again, everything appears correct.
    It seems like Bubble is caching the result of the Search for Likes query, and not updating it after the deletion — at least not fast enough to reflect in the interface.

I’ve tried:

  • Displaying data again in the repeating group or cell.
  • Filtering from a list of Likes loaded at page load.
  • Using :count > 0, :first item is not empty, and :some item's publication is current cell's publication for conditional display.
  • Preventing duplicate Likes using conditional checks before creation.

None of these fully solved the issue when a page reload is involved before unliking.
Has anyone run into this before, and found a way to force the UI or the search to refresh properly after a delete action?

Thanks a lot in advance!

Actually, several people have been reporting this as well as seeing this myself too. I think it is actually a bug that needs to be reported. It’s something wrong with the conditional. @fede.bubble

This shouldn’t be an issue. But it is an issue as of today. Saw this when creating a test app for someone as well. Had to do a weird workaround to get it to work.

1 Like

Can you share your workflow actions and the conditional tab of this element?
Or a video, maybe. It will help a lot.

1 Like

Hello @rpetribu, Thank you very much for your reply
Here are some screenshots that may help


Hello, thank you very much for your reply.

Could you please tell us what solution you used to get around this?

Everything seems to be fine for me :upside_down_face:.

How did you configure the button to CREATE the “Like Publication” ?
I can only see the delete action…

When I clic on a group, its create a new thing “Like publication”
Publication = Parents group publication

Did you insert any “Only When” condition to this?

Only When Do a search for Like Publications: first item is empty?

Can you share a screenshot of the other workflow for us?

Hi @andrianirinaovan

You could try not hard deleting the Like record, but creating a Flag field “Deleted” (yes/no) and marking the deleted Like as deleted = yes. Then only show likes where deleted = no.

Alternatively you could have a Likes field (“list of Users”) on the Post, and add/subtract Users from this list (the only caveat being this list cannot hold more than 10,000 values).

ps I think this has been normal behaviour as long as I can remember (since 2020!)

1 Like

Thank you very much!
Everything is working perfectly now using your method with a yes/no field.
I needed something flexible, so a list wouldn’t have worked for me.
Thanks again and Thanks for everyone who tried to help🙏

1 Like