fromthepage icon indicating copy to clipboard operation
fromthepage copied to clipboard

Metadata description problems for not-logged-in users

Open benwbrum opened this issue 2 years ago • 1 comments

If a user is not logged in, the following problems occur for metadata projects:

  • 500 error on the metadata overview screen example
  • Users are able to see the metadata description screen without logging in (I have no idea what happens if they try to save) example

benwbrum avatar Sep 09 '22 14:09 benwbrum

Error from the log file:

I, [2022-09-09T07:26:45.181469 #32087]  INFO -- :   Rendered work/describe.html.slim within layouts/application (Duration: 
113.9ms | Allocations: 58402)
I, [2022-09-09T07:26:45.182787 #32087]  INFO -- : Completed 500  in 136ms (ActiveRecord: 37.5ms | Allocations: 68001)
F, [2022-09-09T07:26:45.193319 #32087] FATAL -- :   
ActionView::Template::Error (undefined method `+' for nil:NilClass):
    36:             =svg_symbol '#icon-arrow-left', class: 'icon', title: 'Previous page'
    37: 
    38:           span.page-nav_info = t('.metadata')
    39:           -next_works = @collection.works.to_a[index+1..]
    40:           -next_work = next_works.detect {|candidate| candidate.pages.where(status: [nil, Page::STATUS_INCOMPLETE]).first || candidate.description_status == Work::DescriptionStatus::UNDESCRIBED }
    41:           -if next_work
    42:             -next_page = next_work.pages.where(status: [nil, Page::STATUS_INCOMPLETE]).first
  

benwbrum avatar Sep 09 '22 14:09 benwbrum

@benwbrum This issue is related to this and is fixed.

symmetrically avatar May 19 '23 11:05 symmetrically

Fixed and deployed.

benwbrum avatar May 29 '23 14:05 benwbrum