[Archivesspace_Users_Group] updating and plugins question

Joshua D. Shaw Joshua.D.Shaw at dartmouth.edu
Thu Feb 16 09:30:50 EST 2023


Hi Robert

Taking my cue from the version from UMD (https://github.com/umd-lib/aspace_yale_accessions) - the main issue was in the backend controller which needed the repo_id explicitly set for the GET request.

The UMD version is configured for their use case (four part identifiers and resources) and still has a few little niggles, so I forked that and pulled in some of the original plugin changes and then added some updates https://github.com/dartmouth-dltg/aspace_identifiers

The new plugin can be configured to run like the original Yale plugin or the UMD version and can optionally enable the identifiers scripting on resources (ala UMD). It also fixes some squirrely behavior in creating the plugin menu, updates some of the js, can be run under a proxy, and makes the plugin less 'Yale' specific.

Feel free to fork and update for your local use. I think it should work for versions of AS post 3.x (and maybe post 2.8.x), but I only tested it under 3.3.1.

jds
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Robert T. Wilson <rtwilson at cornell.edu>
Sent: Wednesday, February 15, 2023 3:30 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] updating and plugins question

You don't often get email from rtwilson at cornell.edu. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
Hey Joshua,

Thanks again for your help with this. I've got all but two plugins working on 3.3.1, but I'm wondering if you or anyone here can help me troubleshoot an issue with the yale_accessions plugin that's maybe a view issue?

https://github.com/quoideneuf/aspace_yale_accessions<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fquoideneuf%2Faspace_yale_accessions&data=05%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7Cf5051b0e3694437e34ee08db0f938f1b%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C638120898669162866%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=4y0D6ro6%2BfOZr1aBvA%2FK5X6cmJ%2F2ncGI7bSvylh5SSc%3D&reserved=0>

Trying to retrieve the department code list in browser gives an error page, and if I do a GET request through API, it's just an empty [] response. Tables in DB are populated.

This is browser-based request detail in archivesspace.out.

By no means a Ruby person, so I appreciate any suggestions.

I, [2023-02-15T10:45:41.582660 #12321]  INFO -- : Started GET "/plugins/yale_accessions/department_codes" for 108.88.18.68 at 2023-02-15 10:45:41 -0500
D, [2023-02-15T10:45:41.582888 #12321] DEBUG -- : Thread-3500: Post-processed params: {"last_sequence"=>1676471646}
I, [2023-02-15T10:45:41.587421 #12321]  INFO -- : Processing by YaleAccessionsController#department_list as HTML
D, [2023-02-15T10:45:41.766294 #12321] DEBUG -- : Thread-3464: GET /repositories/2/department_lists [session: #<Session:0x1c7dae2f @store={:user=>"admin", :login_time=>2023-02-15 10:45:32 -0500, :expirable=>true}, @system_mtime=2023-02-15 15:45:41 UTC, @id="a6e714f4cbd399725a3efeb2dfc6bb29154355ddfb957e56598eee8efb66e2ba">]
D, [2023-02-15T10:45:41.775582 #12321] DEBUG -- : Thread-3464: Post-processed params: {"repo_id"=>2}
D, [2023-02-15T10:45:41.784276 #12321] DEBUG -- : Thread-3464: Responded with [200, {"Content-Type"=>"application/json", "Cache-Control"=>"private, must-revalidate, max-age=0", "Content-Length"=>"3"}, ["[]\n"]]... in 19ms
I, [2023-02-15T10:45:41.819623 #12321]  INFO -- :   Rendering /cul/app/archivesspace/plugins/yale_accessions/frontend/views/department_list/edit.html.erb within layouts/application
I, [2023-02-15T10:45:43.140097 #12321]  INFO -- :   Rendered shared/_breadcrumb.html.erb (1283.2ms)
I, [2023-02-15T10:45:43.228309 #12321]  INFO -- :   Rendered /cul/app/archivesspace/plugins/yale_accessions/frontend/views/department_list/edit.html.erb within layouts/application (1408.4ms)
I, [2023-02-15T10:45:43.230910 #12321]  INFO -- : Completed 500 Internal Server Error in 1643ms
F, [2023-02-15T10:45:43.233944 #12321] FATAL -- :
F, [2023-02-15T10:45:43.234047 #12321] FATAL -- : ActionView::Template::Error (undefined method `[]' for nil:NilClass):
F, [2023-02-15T10:45:43.234876 #12321] FATAL -- :     3: <h2><%= I18n.t("plugins.yale_accessions.manage_department_list") %></h2>
    4: <p><%= I18n.t("plugins.yale_accessions.manage_department_list_instructions") %></p>
    5:
    6: <%= form_for @department_list, as: 'department_list', url: '/plugins/yale_accessions/department_codes', :html => { :id => "department_list_#{@department_list['uri'].sub(/.*\//, '')}", :class => "department_list_update" } do |f| %>
    7:
    8:   <% @department_list['codes'].each do |code| %>
    9:
F, [2023-02-15T10:45:43.234968 #12321] FATAL -- :
F, [2023-02-15T10:45:43.235020 #12321] FATAL -- : app/controllers/application_controller.rb:744:in `set_locale'
I, [2023-02-15T10:45:43.295452 #12321]  INFO -- : Started GET "/favicon.ico" for 108.88.18.68 at 2023-02-15 10:45:43 -0500
F, [2023-02-15T10:45:43.298288 #12321] FATAL -- :
F, [2023-02-15T10:45:43.298389 #12321] FATAL -- : ActionController::RoutingError (No route matches [GET] "/favicon.ico"):
F, [2023-02-15T10:45:43.298444 #12321] FATAL -- :
F, [2023-02-15T10:45:43.298493 #12321] FATAL -- : actionpack (5.2.5) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call'

Robert

________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Joshua D. Shaw <Joshua.D.Shaw at dartmouth.edu>
Sent: Wednesday, February 1, 2023 11:06
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] updating and plugins question

PS. Any errors from the AS log would help pinpoint the issue.

If it errors almost immediately on startup, I'm betting on a gem issue. If it errors when you interact with the app, then it could be a view or method issue.

Joshua
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Joshua D. Shaw <Joshua.D.Shaw at dartmouth.edu>
Sent: Wednesday, February 1, 2023 12:01 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] updating and plugins question

Hi Robert

It very much depends on the plugin. Things to check


  1.  If the plugin has a gemfile, make sure that is inline with the core gems - ie update the plugin gem constraints if necessary
  2.  If the plugin overrides any core views, make sure that those overrides incorporate any core changes
  3.  If the plugin overrides any core methods, again make sure that those overrides are compatible with any changes in core

Joshua

________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Robert T. Wilson <rtwilson at cornell.edu>
Sent: Wednesday, February 1, 2023 11:56 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: [Archivesspace_Users_Group] updating and plugins question

You don't often get email from rtwilson at cornell.edu. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
Hi all,

Recently upgraded a dev box from 2.5.1 to 3.3.1. First time I've worked on updating an Archivesspace instance. Everything has gone fairly smoothly but getting plugins sorted.

What is the process for migrating plugins successfully? I couldn't find any documentation for initialize-plugin.sh, but I saw references to it. Ran that successfully on a plugin but starting archivesspace with that plugin listed in config.rb still failed.

Thanks for any assistance.

Robert

Robert Wilson, he/him
Cloud Systems Administrator
Cornell University Library

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20230216/65bcb76f/attachment.html>


More information about the Archivesspace_Users_Group mailing list