spraakbanken / korp-frontend

Frontend for Korp, a tool using the IMS Open Corpus Workbench (CWB).
https://spraakbanken.gu.se/en/tools/korp
MIT License
16 stars 8 forks source link

Paging broken in word picture example search #383

Closed arildm closed 3 months ago

arildm commented 3 months ago

This testcase from testcases.md fails:

Pagination when opening KWIC from word picture

https://spraakbanken.gu.se/korplabb/#?lang=eng&cqp=%5B%5D&page=0&result_tab=3&word_pic&search=lemgram%7Chund%5C.%5C.nn%5C.1&corpus=aspacsv,romi,romii,rom99,storsuc,romg

  • Follow link
  • Click the first result in wordpicture, "med" with 200 occurences
  • A KWIC should open up
  • Go to page 6 using the "Go to page" input box
  • First hit on this page should be the two last hits from "Bonniersromaner II"

The second instruction makes a /relations_sentences API call, but the fourth makes a /query call and I think it doesn't have the right parameters? The GUI ends up with a dead bird.

arildm commented 3 months ago

Looks like this was introduced in c2e8427d: In the makeRequest method of KWICProxy, the parameters used to be copied to a data variable, from which the command property was later removed. Since the rewrite, the parameters object is being used directly, so the command property is removed from the same object that is used in ExampleCtrl and other places.