fromthepage icon indicating copy to clipboard operation
fromthepage copied to clipboard

Subject categories with no subjects should behave better in listing

Open benwbrum opened this issue 2 years ago • 3 comments

If you view the subject listing and select a category that does not have any subjects, the page never appears to refresh. I suspect that this is due to the javascript not find any subject to replace the current listing with.

See http://localhost:3000/woodruff/woodruffpapers/subjects#category-3231 for a possible example.

(Notify WWP when fixed)

benwbrum avatar Mar 30 '22 19:03 benwbrum

This appears to have been caused by adding categories while in a document set. We now have categories with a collection_id which does not patch their parent category's collection_id, but rather a document set that's a member of the of the parent collection.

benwbrum avatar Apr 06 '22 18:04 benwbrum

This needs to be fixed from the data creation side and the data also needs remediation.

benwbrum avatar Apr 06 '22 18:04 benwbrum

I can't actually reproduce this issue, when I create a category in a document set it behaves as expected. Prying into the category shows that it's collection_id is the parent collection's id, not the document set.

Also, see this code: https://github.com/benwbrum/fromthepage/blob/db22ed0aced61230d34c7ea9919c9d33846cd3c8/app/controllers/category_controller.rb#L22-L25 It seems like categories are appropriately created when in a document set. Something else must have caused this issue.

sylvieed avatar Aug 25 '22 21:08 sylvieed