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

biomixer_url config variable gets passed as conceptid parameter in some ajax calls, resulting in (undefined method notes' for nil:NilClass): #369

Open
alexskr opened this issue Dec 5, 2024 · 0 comments

Comments

@alexskr
Copy link
Member

alexskr commented Dec 5, 2024

I am observing odd behavior where the value of biomixer_url configuration variable is being passed as the conceptid parameter in some of the AJAX calls. This results in a NoMethodError (undefined method 'notes' for nil:NilClass): error. This issue began appearing with the release of UI v7.0.0

Log:

Started GET "/ontologies/RXNORM/?p=classes&lang=en&conceptid=http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FRXNORM%2F1299852" for 192.168.65.1 at 2024-12-03 21:30:51 +0000
Processing by OntologiesController#show as HTML
  Parameters: {"p"=>"classes", "lang"=>"en", "conceptid"=>"http://purl.bioontology.org/ontology/RXNORM/1299852", "id"=>"RXNORM"}
  Rendering layout layouts/ontology_viewer.html.haml
  Rendering ontologies/visualize.html.haml within layouts/ontology_viewer
  Rendered concepts/_details.html.haml (Duration: 1309.6ms | Allocations: 30887)
  Rendered concepts/_biomixer.html.erb (Duration: 0.1ms | Allocations: 27)
  Rendered notes/_list.html.haml (Duration: 0.2ms | Allocations: 244)
  Rendered mappings/_mapping_table.html.haml (Duration: 0.0ms | Allocations: 78)
  Rendered mappings/_concept_mappings.html.haml (Duration: 0.7ms | Allocations: 277)
  Rendered concepts/_show.html.haml (Duration: 1325.7ms | Allocations: 40086)
  Rendered ontologies/visualize.html.haml within layouts/ontology_viewer (Duration: 1360.2ms | Allocations: 70424)
  Rendered application/_ga_tracking.html.haml (Duration: 0.0ms | Allocations: 16)
  Rendered layouts/_topnav.html.haml (Duration: 4.0ms | Allocations: 1361)
  Rendered layouts/_notices.html.haml (Duration: 0.1ms | Allocations: 35)
  Rendered layouts/_header.html.erb (Duration: 1169.2ms | Allocations: 212000)
  Rendered application/_kgcl_dialogs.html.haml (Duration: 0.0ms | Allocations: 15)
  Rendered layouts/_footer.html.haml (Duration: 22.2ms | Allocations: 6198)
  Rendered layouts/_ontology_viewer.html.haml (Duration: 1263.4ms | Allocations: 268527)
  Rendered layout layouts/ontology_viewer.html.haml (Duration: 2624.7ms | Allocations: 339111)
Completed 200 OK in 2923ms (Views: 2625.8ms | ActiveRecord: 0.0ms | Allocations: 376347)

Started GET "/ontologies/RXNORM/biomixer.stage.bioontology.org/?mode=embed&embed_mode=paths_to_root&ontology_acronym=RXNORM&full_concept_id=http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FRXNORM%2F1299852&userapikey=&restURLPrefix=stagedata.bioontology.org" for 192.168.65.1 at 2024-12-03 21:30:54 +0000
Processing by OntologiesController#show as HTML
  Parameters: {"mode"=>"embed", "embed_mode"=>"paths_to_root", "ontology_acronym"=>"RXNORM", "full_concept_id"=>"http://purl.bioontology.org/ontology/RXNORM/1299852", "userapikey"=>"", "restURLPrefix"=>"stagedata.bioontology.org", "acronym"=>"RXNORM", "purl_conceptid"=>"biomixer.stage.bioontology.org"}
Redirected to http://localhost:3000/ontologies/RXNORM?p=classes&mode=embed&embed_mode=paths_to_root&ontology_acronym=RXNORM&full_concept_id=http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FRXNORM%2F1299852&restURLPrefix=stagedata.bioontology.org&conceptid=biomixer.stage.bioontology.org
Completed 301 Moved Permanently in 2ms (ActiveRecord: 0.0ms | Allocations: 250)


Started GET "/ontologies/RXNORM?p=classes&mode=embed&embed_mode=paths_to_root&ontology_acronym=RXNORM&full_concept_id=http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FRXNORM%2F1299852&restURLPrefix=stagedata.bioontology.org&conceptid=biomixer.stage.bioontology.org" for 192.168.65.1 at 2024-12-03 21:30:54 +0000
Started GET "/ajax/classes/treeview?ontology=RXNORM&conceptid=http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FRXNORM%2F1299852&lang=en" for 192.168.65.1 at 2024-12-03 21:30:54 +0000
Processing by OntologiesController#show as HTML
  Parameters: {"p"=>"classes", "mode"=>"embed", "embed_mode"=>"paths_to_root", "ontology_acronym"=>"RXNORM", "full_concept_id"=>"http://purl.bioontology.org/ontology/RXNORM/1299852", "restURLPrefix"=>"stagedata.bioontology.org", "conceptid"=>"biomixer.stage.bioontology.org", "id"=>"RXNORM"}
Processing by ConceptsController#show_tree as HTML
  Parameters: {"ontology"=>"RXNORM", "conceptid"=>"http://purl.bioontology.org/ontology/RXNORM/1299852", "lang"=>"en"}
Completed 500 Internal Server Error in 27ms (ActiveRecord: 0.0ms | Allocations: 39591)

NoMethodError (undefined method `notes' for nil:NilClass):

app/controllers/ontologies_controller.rb:147:in `classes'
app/controllers/ontologies_controller.rb:295:in `show'
  Rendered ontologies/_treeview.html.haml (Duration: 63.0ms | Allocations: 126535)
Completed 200 OK in 84ms (Views: 63.8ms | ActiveRecord: 0.0ms | Allocations: 162400)
From: /app/app/controllers/ontologies_controller.rb @ line 145 :

    140:     end
    141:
    142:     @current_purl = @concept.purl if Rails.configuration.settings.purl[:enabled]
    143:
    144:     unless @concept.id == "bp_fake_root"
 => 145:       binding.irb
    146:       @notes = @concept.explore.notes
    147:       @mappings = get_concept_mappings(@concept)
    148:       @delete_mapping_permission = check_delete_mapping_permission(@mappings)
    149:     end
    150:

irb(#<OntologiesController:0x0000...):004> @concept
=> #<OpenStruct links=nil, context=nil, errors=["The input class id 'biomixer.stage.bioontology.org' is not a valid IRI"], status=400, children=[]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant