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

Ruby dumps core parsing XML file after following Quick Start instructions #1840

Closed
TolstoyDotCom opened this issue Mar 2, 2018 · 4 comments

Comments

@TolstoyDotCom
Copy link

TolstoyDotCom commented Mar 2, 2018

bugreport.txt
I followed the Quick Start instructions and when I visit an individual page for any search result, Ruby crashes. I assume this is related to the "marc_display" field. Even if that XML is bad, it shouldn't cause the whole interpreter to crash. That doesn't speak very highly of Ruby. Feel free to post this elsewhere if you wish.

Rails output attached.

@jcoyne
Copy link
Member

jcoyne commented Mar 2, 2018

I don’t think we’re equipped to handle this. If you want to open an issue at https://bugs.ruby-lang.org/projects/ruby someone there might be able to help.

@jcoyne jcoyne closed this as completed Mar 2, 2018
@TolstoyDotCom
Copy link
Author

I posted the file here: https://bugs.ruby-lang.org/issues/14569

I looked into this and it's related to the call to export_as_openurl_ctx_kev in gems/blacklight-6.14.1/app/views/catalog/_show_main_content.html.erb

That has this comment: "This document_partial_name(@document) business is not quite right, but has been there for a while".

Due to duck typing, it's hard to tell exactly where export_as_openurl_ctx_kev might be located, but it appears to be calling the version of that function in blacklight-marc-6.2.0/app/models/concerns/blacklight/solr/document/marc_export.rb

That has this comment: "TODO: This is wierd and fragile code, it should use ruby OpenURL gem instead to work a lot more sensibly. The "format" argument was in the old marc.marc.to_zotero call, but didn't neccesarily do what it thought it did anyway. Left in for now for backwards compatibilty, but should be replaced by just ruby OpenURL."

Realistically speaking, when do you think someone will be doing that?

@jcoyne
Copy link
Member

jcoyne commented Mar 3, 2018

That code was originally written by @jrochkind 8 years ago: 1a6284e since it hasn't been done in the last 8 years, its unlikely anyone is going to get to it in the near future. That said, if this is important to you, and you want to work on that code, feel free to submit a Pull request. That code is now in the blacklight-marc codebase: https://github.com/projectblacklight/blacklight-marc

@TolstoyDotCom
Copy link
Author

To be frank - and nothing against you or any other contributor - I'm being asked by a client to use this project instead of a modified version of Facetview and I think that's a mistake. While this project definitely has features that Facetview lacks, it seems to me that locking in to Blacklight would be a bad idea. Unlike Facetview, Blacklight can't be embedded in another system without a great deal of work. It's a much larger codebase and - since those maintaining it are at most doing it in their spare time - any problems would have to be fixed without much help from the community. Plus, I've only very rarely seen the Java runtime or PHP interpreter dump core. I've seen Java dump core a few times and I'm sure PHP has too even if I can't recall it. Yet, I can get the Ruby interpreter to reliably dump core.

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