Closed karenmajewicz closed 8 months ago
Debugging this issue now...
Turning GeoDev production.log level to :debug
and I'm seeing a lot of these in the log:
BULK ACTION BAD DOC: #<Document id: "c0edda7d-81d0-4ff2-8096-466b2aa8b653"...
These errors originate from the rescue
clause here in the codebase:
https://github.com/geobtaa/geoblacklight_admin/blob/6931a95953004013e9bf8dbdcc0e32168184fe09/app/models/bulk_action.rb#L76-L86
Testing one of those bad docs and I'm finding this doc.current_version
method call errors:
(irb):8:in `<main>': undefined method `index' for nil:NilClass (NoMethodError)
So! We have documents in the database that (for whatever reason?) have no PaperTrail version history. Without doc.current_version
these docs fail to create BulkActionDocument objects and toss the error.
Working on a fix.
Okay! I have a branch running a bug fix on GeoDev. It's working as I expect now, but can you give things a try on your end and let me know how things look to you?
GeoDev is running:
The fix seems to work - I was able to unpublish that set of records just now. Maybe this happened because we copied the Solr database into Admin instead of ingesting via the interface?
Thanks for the feedback. Tomorrow, (Monday) I'll cut a release and push these changes into production.
This has me thinking that we might want to revisit how PaperTrail is configured in the application -- make sure we have sane defaults and limit the number of versions we store.
Working in geodev/admin and finding I cannot change the publication state for some things via the bulk actions interface. This is working fine most of the time, but I sometimes come across a set of records that do not respond. Maybe I am seeing a lag between changing the publication state and what messages are shown in the interface?
To replicate: