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

[scihist_digicoll/production] NoMethodError: undefined method `order!' for class Work Did you mean? order #2783

Open
honeybadger bot opened this issue Nov 14, 2024 · 3 comments
Assignees

Comments

@honeybadger
Copy link

honeybadger bot commented Nov 14, 2024

@jrochkind reports:
I did this one messing with admin Work screen, trying to search for "child works: yes".

More disturbing is that I did NOT get the custom error page we intend, I just got a blank white page with small type "Server Error". So our custom error pages may be broken?

Backtrace

line 706 of [PROJECT_ROOT]/app/controllers/admin/works_controller.rb: build_search
line 22 of [PROJECT_ROOT]/app/controllers/admin/works_controller.rb: index
line 28 of [PROJECT_ROOT]/app/controllers/application_controller.rb: block in batch_kithe_indexable

View full backtrace and more info at honeybadger.io

@eddierubeiz
Copy link
Contributor

eddierubeiz commented Nov 15, 2024

Our custom error pages are fine, but the admin works controller is using a reserved word as a parameter: format, which causes the errors controller to render the text template instead of errors/internal_error.html.erb.

See: https://stackoverflow.com/questions/70726614/ruby-on-rails-use-format-as-a-url-get-parameter

@eddierubeiz
Copy link
Contributor

I'm going to rename that parameter from format to work_format and add a regression test.

@jrochkind
Copy link
Contributor

jrochkind commented Nov 15, 2024

Our custom error pages are fine, but the admin works controller is using a reserved word as a parameter: format,

I just ran into something similar with Oral History controllers when I tried to upgrade Rails to latest, except it was actually an error about calling format on an object that didn't have such a method; I just rolled back cause I wasn't planning on dealing with it now, but that's interesting.

Thanks for fixing it here! And nice job diagnosing!

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

No branches or pull requests

2 participants