You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, I just faced an issue trying to create taxons in the backend.
I figured out why but I can't wrap my head around how to solve it.
I thought it would be easier to just describe it.
Steps to reproduce:
Create a first taxonomy (T1)
Create a first taxon (t1)
Create a second taxonomy (T2)
Create a first taxon (t2)
So you end up having:
Two taxonomies
id
taxonomy
1
T1
2
T2
Four taxons
id
taxons
1
T1
2
t1
3
T2
4
t2
A bug in the coffee script in charge of generating a new taxon causes it to request the creation of the taxon with its parent_id equal to the taxonomy_id instead of the id of the master taxon.
Hello everyone, I just faced an issue trying to create taxons in the backend.
I figured out why but I can't wrap my head around how to solve it.
I thought it would be easier to just describe it.
Steps to reproduce:
So you end up having:
A bug in the coffee script in charge of generating a new taxon causes it to request the creation of the taxon with its parent_id equal to the taxonomy_id instead of the id of the master taxon.
Parameters: {"taxon"=>{"name"=>"New node", "parent_id"=>"2", "child_index"=>"0"}, "taxonomy_id"=>"2"}
When it should be
Parameters: {"taxon"=>{"name"=>"New node", "parent_id"=>"4", "child_index"=>"0"}, "taxonomy_id"=>"2"}
As a result, in the previous example, t2 end up being a child of t1 since it's the second taxon and T2 is the second taxonomy.
The issue is related to the way taxonomy.js.coffee in the get_create_handler handle the call.
Hope it will be helpful enough !
The text was updated successfully, but these errors were encountered: