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

keyword search without javascript enabled results in a 500 error #557

Open
rlskoeser opened this issue Oct 31, 2023 · 0 comments
Open

keyword search without javascript enabled results in a 500 error #557

rlskoeser opened this issue Oct 31, 2023 · 0 comments
Labels

Comments

@rlskoeser
Copy link
Contributor

Describe the bug
Submitting a keyword search on the archive page with javascript disabled results in a 500 error

To reproduce
Steps to reproduce the behavior:

  1. Turn off javascript in your browser
  2. Go to https://prosody.princeton.edu/archive/
  3. Type a keyword search term and hit enter to submit the search
  4. See 500 error page

I'm using the Firefox noscript plugin; I gave permission for the things that are listed in the plugin and the page looks fine, but obviously something is not loading properly.

Expected behavior
Search should work even with javascript disabled.

Additional context
Error logs in the server indicate a sort option is not getting set:

    ArchiveSearchQuerySet()
  File "/var/www/ppa/env/lib/python3.9/site-packages/parasolr/query/aliased_queryset.py", line 86, in order_by
    return super().order_by(*args)
  File "/var/www/ppa/env/lib/python3.9/site-packages/parasolr/query/queryset.py", line 508, in order_by
    if sort_option.startswith("-"):
AttributeError: 'NoneType' object has no attribute 'startswith'

A default value should be set server-side if none is submitted (which is what seems to happen in this case).

Likely related problem: the sort option drop-down is not functional without javascript.

@rlskoeser rlskoeser added the bug label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant