Bug on Search in associated collections

Hi team,

I have discovered a bug that I can reproduce easily.

Try this please:

  • display a collection that has associated one to many relations
  • access one associated relation that has more than one page of rows
  • When staying on the 1st page, the search bar is running fine
  • When navigating to another page, then using the search bar, it does not work any more.

Please have a look at the following video: it shows how it works on the first page of transactions, and how it does not find any result when looking for the same string, if the search is operated from the 2nd page.

Thanks in advance for your help.

Here is my setup

    "database_type": "postgres",
    "liana": "forest-express-sequelize",
    "liana_version": "6.3.15",
    "engine": "nodejs",
    "engine_version": "12.13.1",
    "framework": "express",
    "framework_version": "^4.17.1",
    "orm_version": "5.22.3"
1 Like

Hi @Louis-Marie !
Thanks for your post :slight_smile: I tried to reproduce but couldn’t :face_with_monocle:
Do you have any error in your logs ?

Hi @Nicolas_Sailly

No, there is no error.

But I think I may have found it.

The query sent to my server when trying to search from page 2 is the following (I reduced it a bit):

https://..../forest/users/e464f019-b729-4904-961b-acb127656e48/relationships/transactions?fields%5Btransactions%5D=type%2Ccreated_at%2Clabel%2Cterm_city%2Ccredit%2Cdebit%2Ccurrency%2Cfees%2Ccurrency_fee%....%5D=RecipientInfo&fields%5Buser%5D=fullname&fields%5Bcard%5D=CHID_and_status&fields%5Bdevice_detail%5D=device_id&fields%5Buser_ip_log%5D=ip&page%5Bnumber%5D=2&page%5Bsize%5D=20&timezone=Europe%2FParis&sort=-created_at&search=testeur&searchExtended=0

You can see that the “page%5Bnumber%5D=2” parameter is passed.

But the count query is returning only 9 rows, so it cannot serve the 2nd page when there is 20 rows per page.
From my point of view, the search query in the first search occurrence, should not ask for the page number of origin.

Hoping this will help.

1 Like

Thanks for figuring this out ! :+1:
I’ll create a ticket right away :slight_smile:

1 Like

Hello @Louis-Marie!

The fix for the issue was released several days ago :rocket:

Could you please test it on your end and confirm that now everything works as expected?

Thank you

Hi @olesyak

I confirm that this issue is solved now.

Thanks.