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

[Orangelight/production] NoMethodError: undefined method `collect' for "()"@5:Parslet::Slice #1656

Closed
eliotjordan opened this issue May 31, 2019 · 1 comment · Fixed by #2642
Assignees

Comments

@eliotjordan
Copy link
Member

Backtrace

line 16 of [PROJECT_ROOT]/app/models/search_builder.rb: cleanup_boolean_operators
line 23 of [PROJECT_ROOT]/app/helpers/blacklight_helper.rb: search_results
line 493 of [PROJECT_ROOT]/app/controllers/catalog_controller.rb: index

View full backtrace and more info at honeybadger.io

@hectorcorrea
Copy link
Member

The culprit is that the query submitted on the request ends with "()" and Blacklight is throwing an exception when trying to parse this query.

The URL in the Honeybadger report is

https://catalog.princeton.edu/catalog?utf8=%E2%9C%93&search_field=all_fields&q=Philipps+Payson+O%E2%80%99Brien%2C+How+the+War+Was+Won%3A+Air-Sea+Power+and+Allied+Victory+in+World+War+II+%28%29

When we decode the q parameter we get:

Philipps Payson O’Brien, How the War Was Won: Air-Sea Power and Allied Victory in World War II ()

Blacklight has some built-in error handling to deal with Parslet exceptions but it seems that this exception is not a Parslet exception per-se (although it happens in Parslet) and Blacklight is just letting the exception bubble all the way to the top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants