samvera-labs / nurax-pg

This is a Hyrax application configured to use Postgres for metadata storage instead of ActiveFedora.
Apache License 2.0
0 stars 0 forks source link

Dashboard exception - undefined method `order' for Hyrax::PcdmCollection:Class #43

Closed elrayle closed 2 years ago

elrayle commented 2 years ago

Descriptive summary

When Hyrax.config.collection_model == 'Hyrax::PcdmCollection', accessing the Dashboard results in an exception "undefined method `order' for Hyrax::PcdmCollection:Class".

The log shows the error in the Dashboard :show action at line 24 in app/controllers/hyrax/dashboard_controller.rb. This line tries to execute @collections = Collection.order(date_modified: :desc).

In nurax-pg, the Collection class is defined as Collection = Hyrax::PcdmCollection which is why the error reports that it is Hyrax::PcdmCollection that doesn't have the order method.

Steps to reproduce the behavior

  1. Login
  2. navigate to Dashboard

Will get something went wrong dialog and see the error in the production log.

Related work

Hyrax PR #5089 - Analytics

rjkati commented 2 years ago

@jlhardes, I do not get an error message when navigating to the Dashboard. Does someone need to verify that the production log does not produce an error before this issue is closed?

jlhardes commented 2 years ago

I think if the steps to reproduce the behavior are no longer reproducing the behavior then this issue is resolved on nurax-pg.