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

[Bug]: New Taxon Name, Edit Taxon Name #4159

Open
weevil-see opened this issue Dec 18, 2024 · 0 comments
Open

[Bug]: New Taxon Name, Edit Taxon Name #4159

weevil-see opened this issue Dec 18, 2024 · 0 comments
Labels
bug An existing function is broken.

Comments

@weevil-see
Copy link

Steps to reproduce the bug

I tried to create some higher taxa. First it worked fine, I created "Coleoptera", "Polyphaga", and "Cucujiformia", but when I tried to create "Curculionoidea", I got an error which I could not record. So I started again, and this is when my report starts:
1. I am running a docker container of TaxonWorks DEVELOPMENT v0.44.3
2. Start the method "New Taxon Name".
3. I click the field for parent and choose Cucujiformia, a taxon which I previously created
4. I write "Curculionoidea" into the "Name" field
5. Two lines with Curculionoidea show up. Apparently I have created this taxon before. This is not the first time I tried to create the taxon. Before, I got errors, also a box with quite a lot of text, but it disappeared towards the lower end of the screen before I could read or screenshot it.
6. I click one of the two "Curculionoidea" lines
7. A new tab opens in my browser, "Edit taxon name". This would be convenient (to delete one of the duplicates), but the page immediately gets replaced by an error (see second screenshot).
This is the text:

Uncaught runtime errors:
ERROR
Request failed with status code 500
AxiosError@http://127.0.0.1:3000/packs/js/vendors-node_modules_geoman-io_leaflet-geoman-free_dist_leaflet-geoman_js-node_modules_sfgrp_-afa859.js:124686:19
settle@http://127.0.0.1:3000/packs/js/vendors-node_modules_geoman-io_leaflet-geoman-free_dist_leaflet-geoman_js-node_modules_sfgrp_-afa859.js:125465:12
onloadend@http://127.0.0.1:3000/packs/js/vendors-node_modules_geoman-io_leaflet-geoman-free_dist_leaflet-geoman_js-node_modules_sfgrp_-afa859.js:123940:66

8. To check if the problem is specific to the two duplicates of "Curculionoidea", I wanted to test another taxon. I went back to the main page, selected "New taxon name" again, and selected as parent a genus (Otiorhynchus) which I have loaded into the database as part of a batch upload from csv before. I write the same name as parent into the "name" field (see screenshot). Some subgenera appear, I can scroll through the list. Interestingly, Otiorhynchus subgenus Otiorhynchus is missing in the list, even though it is in the csv file which I used for the batch upload. I can click all of them, and the "Edit taxon name" tab appears without errors.

9. I want to test if the "Curculionoidea" duplicates make problems in other methods as well. In the "Data" tab, I click "Taxon names". Curculionoidea is showing up on top of list of recent changes. I click the first one (screenshot)

10. I click the first one. I get an error page (screenshot)
Heres the text:

NoMethodError in TaxonNames#show

Showing /app/app/views/shared/data/all/show/_soft_validation_list.html.erb where line #1 raised:

undefined method `id' for nil

Extracted source (around line #324):

322
323
324
325
326
327
              

	

      self
    else
      parents = list.collect{|i| i.parent.id}
      list.detect{|t| !parents.include?(t.id)}
    end
  end

Trace of template inclusion: #<ActionView::Template app/views/shared/data/all/show/_soft_validation.html.erb locals=["object"]>, #<ActionView::Template app/views/shared/data/project/_show.html.erb locals=["object"]>, #<ActionView::Template app/views/taxon_names/show.html.erb locals=[]>

Rails.root: /app
Application Trace | Framework Trace | Full Trace
app/models/protonym.rb:324:in `block in lowest_rank_coordinated_taxon'
app/models/protonym.rb:324:in `collect'
app/models/protonym.rb:324:in `lowest_rank_coordinated_taxon'
app/models/protonym.rb:536:in `block in reduce_list_of_synonyms'
app/models/protonym.rb:536:in `reduce_list_of_synonyms'
app/models/protonym/soft_validation_extensions.rb:1359:in `sv_potential_family_homonyms'
lib/soft_validation.rb:322:in `block in soft_validate'
lib/soft_validation.rb:321:in `each'
lib/soft_validation.rb:321:in `soft_validate'
app/views/shared/data/all/show/_soft_validation_list.html.erb:1
app/views/shared/data/all/show/_soft_validation.html.erb:7
app/views/shared/data/project/_show.html.erb:92
app/views/taxon_names/show.html.erb:35
Request

Parameters:

{"id"=>"740"}

Toggle session dump
Toggle env dump
Response

Headers:
None

Screenshot

Screenshot_20241219_001251

Screenshot_20241219_001734

Screenshot_20241219_002353

Screenshot_20241219_003415

Screenshot_20241219_003605

Expected behavior

No response

Additional Screenshots

No response

Environment

Development (docker)

Sandbox Used

No response

Version

DEVELOPMENT v0.44.3

Browser Used

Firefox

@weevil-see weevil-see added the bug An existing function is broken. label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing function is broken.
Projects
None yet
Development

No branches or pull requests

1 participant