Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurs after changing the import search query after paginating #4813

Open
bjester opened this issue Nov 12, 2024 · 6 comments
Open

Error occurs after changing the import search query after paginating #4813

bjester opened this issue Nov 12, 2024 · 6 comments
Assignees
Labels
DEV: frontend help wanted Open source contributors welcome P1 - important Priority: High impact on UX

Comments

@bjester
Copy link
Member

bjester commented Nov 12, 2024

Observed behavior

After performing a search in the Import search modal which produces more than 1 page of results, navigating to subsequent page(s) and then revising the search term with something that would produce less resources, causes the search to fail.
Image

Expected behavior

When the user updates the search term, it should reset the pagination back to page 1.

User-facing consequences

Revising search terms to be more specific after browsing through at least one page should be a well supported feature

Errors and logs

Without resetting the page index, it passes it along to the backend which returns a 404 because the results are unlikely enough to fill up to that page Image

Steps to reproduce the issue

  1. Open the Import search modal
  2. Search for a fairly basic term, e.g. 'dog'
  3. Navigate to page 2
  4. Revise the search term to 'dog drop'
  5. Observe the error
@bjester bjester added DEV: frontend P1 - important Priority: High impact on UX labels Nov 12, 2024
@bjester bjester changed the title Changing the import search query after paginating results in an error Error occurs after changing the import search query after paginating Nov 12, 2024
@MisRob MisRob added the help wanted Open source contributors welcome label Nov 19, 2024
@Arunima22
Copy link

Hey, I would like to work on this! I have read through the frontend documentation and currently going through the backend documentation. Any guidance will be appreciated.

@bjester
Copy link
Member Author

bjester commented Nov 19, 2024

Hi @Arunima22,

Thank you for your interest in contributing. I will assign you this issue.

Once you get your local development environment up and running, you'll have to prepare some data (channels) with which you can use to reproduce this search issue. For background, when you open a channel, there will be an ADD button which has a list of options, one of them being to upload files, and another to 'Import from channels' which will navigate you to the search interface.

First, to prepare some data:

  1. Sign in as the [email protected] user
  2. Add a new channel
  3. Upload several items to it, at least 11, with a common word in the title or description. You'll want to use this common word in testing the search interface later. Documents like PDFs are best to upload because they're small and quick.
  4. Ensure all uploaded content have the necessary fields, which includes the 'License' field-- 'Public domain' is easiest. The uploaded content should have no warnings or errors.
  5. Navigate to the administration interface
  6. Find the channel you created, and "Make it public"
  7. Navigate back to your channel and click Publish

Steps to reproduce:

  1. Add a new channel
  2. Click ADD and choose 'Import from channels'
  3. Search for the common word you added to the uploaded contents in the previous channel
  4. Since you uploaded 11 items, you should get 2 pages of results. Navigate to page 2
  5. Now update your search term to something more specific that wouldn't produce 2 pages of results
  6. Observe the error

I believe the issue originates in this component https://github.com/learningequality/studio/blob/unstable/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchResultsList.vue

Let us know if you need any more assistance, or would like to be unassigned.

@Arunima22
Copy link

I have been able to reproduce the issue. Thank you for the guidance. I will work on this.

@Arunima22
Copy link

Arunima22 commented Nov 25, 2024

Hello @bjester I have encountered an issue where I am not able to upload any pdfs to the channel. Do I need some particular channel settings to upload pdfs?
I have made a screen recording of the issue. Let me know if you need to see it.

@MisRob
Copy link
Member

MisRob commented Nov 25, 2024

Hi @Arunima22, it's always good to attach as much information as you can - recording, logs, all you have :)

@MisRob
Copy link
Member

MisRob commented Dec 17, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: frontend help wanted Open source contributors welcome P1 - important Priority: High impact on UX
Projects
None yet
Development

No branches or pull requests

3 participants