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

Don't list /preferences in recentchanges since they can't be viewed #9197

Closed
cdrini opened this issue Apr 30, 2024 · 6 comments · Fixed by #9317
Closed

Don't list /preferences in recentchanges since they can't be viewed #9197

cdrini opened this issue Apr 30, 2024 · 6 comments · Fixed by #9317
Assignees
Labels
Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Needs: Response Issues which require feedback from lead Priority: 3 Issues that we can consider at our leisure. [managed] Type: Bug Something isn't working. [managed]

Comments

@cdrini
Copy link
Collaborator

cdrini commented Apr 30, 2024

Reproducing the bug

  1. Go to https://openlibrary.org/recentchanges
  2. Click on one of the many /preferences links
  • Expected behavior: Shows something
  • Actual behavior: Errors with a 401 unauthorized

Context

  • Browser (Chrome, Safari, Firefox, etc): FF
  • OS (Windows, Mac, etc): Win10
  • Logged in (Y/N): N
  • Environment (prod, dev, local): prod

Notes from this Issue's Lead

Proposal & constraints

Related files

Stakeholders

@cdrini cdrini added Type: Bug Something isn't working. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Apr 30, 2024
@SivanC
Copy link
Contributor

SivanC commented May 5, 2024

@cdrini Hi again, I'd be happy to work on this if it's a good fit! There's a bit of a disconnect between the expected behavior and issue title, I assume the implied solution is to filter out recent user preference changes and not to make them accessible, right?

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label May 6, 2024
@mekarpeles mekarpeles added Priority: 3 Issues that we can consider at our leisure. [managed] Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] and removed Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels May 6, 2024
@mekarpeles
Copy link
Member

@SivanC sure! Thank you! And @jimchamp, @cdrini, and I can answer questions if you have any :)

@mekarpeles mekarpeles removed the Needs: Response Issues which require feedback from lead label May 20, 2024
@SivanC
Copy link
Contributor

SivanC commented May 21, 2024

@mekarpeles @jimchamp @cdrini Sorry to ping you all couldn't decide 😅 Wondering how I can access user preferences on a dummy account so I can test properly? I managed to set up the account but just like admin I get a template error when trying to access settings.

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label May 22, 2024
@jimchamp
Copy link
Collaborator

http://localhost:8080/people/openlibrary/preferences will take you to the preferences of the default dev account, if logged in. If you get a 404, just change your safe_mode setting and revisit the page (if I recall, the preferences object doesn't exist until the patron modifies their preferences).

@jimchamp jimchamp removed the Needs: Response Issues which require feedback from lead label May 22, 2024
@jimchamp
Copy link
Collaborator

I assume the implied solution is to filter out recent user preference changes and not to make them accessible, right?

Sorry that we missed this question! This is correct. Let me know if you need any help finding the related code for this.

@SivanC
Copy link
Contributor

SivanC commented May 22, 2024

@jimchamp Thanks for the support!

If you get a 404, just change your safe_mode setting and revisit the page

Changing my safe mode brings me to the "Sorry. There seems to be a problem with what you were just looking at." page, and I still get the below error when trying to access settings on the admin account:
/openlibrary/openlibrary/templates/account.html: error in processing template: UndefinedTable: relation "follows" does not exist LINE 1: SELECT count(*) as count FROM follows WHERE publisher='openl... ^ (falling back to default template)

Any idea what I'm doing wrong? I should mention I wasn't getting a 404 before but instead also this template error. When I was creating a dummy account I had to use a REPL inside one of the docker containers to talk to the site, maybe there's a way to activate preferences in there?

EDIT: Turns out trying to save my preferences was enough to generate a change in the recentchanges, so that solves my problem for this issue at least!

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Needs: Response Issues which require feedback from lead Priority: 3 Issues that we can consider at our leisure. [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants