openfoodfoundation / openfoodnetwork

Connect suppliers, distributors and consumers to trade local produce.
https://www.openfoodnetwork.org
GNU Affero General Public License v3.0
1.1k stars 714 forks source link

can't edit taxons, taxon structure not stable #2421

Closed tschumilas closed 6 years ago

tschumilas commented 6 years ago

Description

Previously this bug was reported - https://github.com/openfoodfoundation/openfoodnetwork/issues/1965
but the issue reportedly resolved. However, it seems not. I believe since the last version was pushed through, the taxonomy structure is not stable and this same issue is happening. I am unable to edit the taxons (in the configuration menu). Products are correctly associated with taxons, and searching works. But, in the shopfront, for example - a search for 'leafy greens' - brings forward products associated with that taxon. But a search for the parent taxon "vegetables' does not bring forward any of the leafy greens.

Expected Behavior

Search for a parent taxon (vegetables) should bring froward its children (leafy greens) as well as any products associated with the parent. And, the taxons should be editable in the configuration menu.

Actual Behavior

Taxons not editable. Searching on a parent does not bring forward its children.

Steps to Reproduce

1.attach a parent taxon to product A, and a child taxon to product B 2.search for the parent taxon (see the child does not appear) 3.try to edit taxons in configuration - not possible 4.

Animated Gif/Screenshot

Here is the screen in the configuration menu - taxons not editable:

taxonomies ofn administration no children taxonomies ofn administration taxon problem

Context

User cannot properly use the search functions in a shopfront

Severity

s2 - s3: It affects all users of instances using a taxon tree structure. There is no workaround.

Your Environment

Canadian production server: https://openfoodnetwork.ca/

This got broken by a server update in December that contained the last Spree upgrade.

myriamboure commented 6 years ago

@tschumilas I can't reproduce your bug, see https://www.useloom.com/share/15e123a0a7154136af92be9219886168 Which version of the software are you in? @mkllnk probably knows... there was a bug but has been fixed normally. If the bug is on the search feature then you should report this specific bug (which is not the case here). But again for the search I tested it, for instance in France we have only one category called "products" and then lots of childs, but if products are registered under the category "product" I can filter on this category. Spree doesn't handle today the tree dimension of taxonomies, so if we would like to improve it I would open an icebox issue and create a line in the big spreadsheet, as this is not a bug, it is how Spree work today. It would mean we would have to review the UX of the categories tag as well, as today they all appear at the same level, parents an chlids, both when you associate a taxon to a product, and when you filter in a shopfront. Look here in the image "produits" is at the same levels of all the childs... I agree with you that it is not practical, and we should review it, so please open an icebox and add it to the spreadsheet, and reference this GH issue and close it (as this is not a bug, just a feature badly designed). screenshot from 2018-07-03 07-11-01

mkllnk commented 6 years ago

Thank you for testing this @myriamboure. I tested this the other day on our production and staging server and I didn't see the tree structure in the admin interface at all. But now I can. Weird, I must have done something wrong the other day.

@tschumilas I think we should update the version on your server and see if that fixes it. Do you have any concerns updating to the latest version? You can see the currently open bugs at https://github.com/openfoodfoundation/openfoodnetwork/issues?q=is%3Aopen+is%3Aissue+label%3Abug-s2. It's probably unrealistic to wait until all of these bugs are gone.

tschumilas commented 6 years ago

No concerns lets see if the new version fixes. BUT - can you wait until next week? I have fn important pilot with a food hub going on until Friday - and would rather not risk any (more) snags. Next week would be grand if that is possible?

tschumilas commented 6 years ago

Further - I just tried again and the same problem exists. It isn't only a filter/search issue - it is some issue with the creation of taxons. Formerly, in configuration, I created a list of parent and child taxons. Today, I can only create parent taxons. I cannot edit them. I cannot even see the children I formerly created. So today, when a user creates products, the 'old' child taxons I created show as options, and they select them. So these child taxons become attached to products. But they don't seem associated with their parents, as a search for parents doesn't pick up children. I understand what you are saying @myriamboure and it would be fine for me to work just with a set of parent taxons. BUT - how do I get there from where I am? Would I have to go into every single product now and change to a parent taxon? And - the original 'children' I created will keep showing up to the user - and they'll keep selecting child taxons for which we can't properly search/filter. So now I'm wondering if this isn't actually a new problem - maybe it was there before and my 'mistake' was setting up child taxons in the first place. So @mkllnk - lets try a new version and see what happens. Second - if that doesn't work - I need advice re: how do I get rid of the child taxons that aren't searching properly? (And none of this explains why I used to be able to edit taxons in configuration and I can't now - which still seems like a bug to me.)

kirstenalarsen commented 6 years ago

my 2c - i would guess that the version update (NEXT WEEK after your current trial) will fix the ability to edit them in configuration, but maybe not the children. the children have been totally neglected as no one else was using them, so they probably haven't been tested and this change got missed. I'd be guessiong that it happened at the same time as the main problem w spree upgrade. So once you have new version, let's see if you can then edit and what you can edit, and then work out best path from there

other option would be to hop into aus staging which is running a later version and have a play - i'll make you superadmin on there @tschumilas - just be aware that data can be lost so don't invest in it too much :)

mkllnk commented 6 years ago

@tschumilas I just updated your server and it seems to work now: screenshot from 2018-07-10 17-18-44