<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I didn’t know you could do this: break the app using the backend API. <div class=""><br class=""></div><div class=""><br class=""></div><div class="">Attempting to figure out the parameters to post an import job to the backend,</div><div class="">I got the JSON parameters wrong or incomplete, and now all I get from trying to </div><div class="">GET /repository/$REPO/jobs?page=1 in the backend is:</div><div class=""><br class=""></div><div class=""><div class="">{</div><div class=""> "error": "Had some trouble parsing your request: unexpected token at 'null'"</div><div class="">}</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">And accessing jobs in the frontend browser returns this page:</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><h1 style="color: rgb(51, 51, 51); font-family: helvetica, verdana, arial, sans-serif; line-height: 18px; background-color: rgb(255, 255, 255);" class="">NoMethodError in Jobs#index</h1><p style="font-family: helvetica, verdana, arial, sans-serif; font-size: 13px; line-height: 18px; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);" class="">Showing <i class="">/projects/Archivespace/1archivesspace/data/tmp/jetty-0.0.0.0-8088-frontend.war-_-any-/webapp/WEB-INF/app/views/jobs/index.html.erb</i> where line <b class="">#25</b> raised:</p><pre style="background-color: rgb(238, 238, 238); padding: 10px; font-size: 11px; white-space: pre-wrap; color: rgb(51, 51, 51); line-height: 18px;" class=""><code class="">undefined method `[]' for nil:NilClass</code></pre><div style="font-family: helvetica, verdana, arial, sans-serif; font-size: 13px; line-height: 18px; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);" class=""><br class="webkit-block-placeholder"></div><p style="font-family: helvetica, verdana, arial, sans-serif; font-size: 13px; line-height: 18px; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);" class="">Extracted source (around line <b class="">#25</b>):</p><pre style="background-color: rgb(238, 238, 238); padding: 10px; font-size: 11px; white-space: pre-wrap; color: rgb(51, 51, 51); line-height: 18px;" class=""><code class="">22: <% end %>
23:
24: <h3><%= I18n.t("job._frontend.section.archived_jobs") %></h3>
25: <% if @search_data['results'].length > 0 %>
26: <%= render_aspace_partial :partial => "jobs/listing", :locals => {:jobs => @search_data['results']} %>
27: <%= render_aspace_partial :partial => "shared/pagination" %>
28: <% else %>
</code></pre><div style="font-family: helvetica, verdana, arial, sans-serif; font-size: 13px; line-height: 18px; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);" class=""><br class="webkit-block-placeholder"></div><div style="font-family: helvetica, verdana, arial, sans-serif; font-size: 13px; line-height: 18px; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);" class=""><br class="webkit-block-placeholder"></div><p style="font-family: helvetica, verdana, arial, sans-serif; font-size: 13px; line-height: 18px; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);" class=""><code class="">Rails.root: /projects/Archivespace/1archivesspace/data/tmp/jetty-0.0.0.0-8088-frontend.war-_-any-/webapp/WEB-INF</code></p><div id="traces" style="color: rgb(51, 51, 51); font-family: helvetica, verdana, arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(255, 255, 255);" class=""><a href="http://localhost:8088/jobs#" style="color: rgb(102, 102, 102);" class="">Application Trace</a> | <a href="http://localhost:8088/jobs#" style="color: rgb(102, 102, 102);" class="">Framework Trace</a> | <a href="http://localhost:8088/jobs#" style="color: rgb(102, 102, 102);" class="">Full Trace</a><div id="Application-Trace" class=""><pre style="background-color: rgb(238, 238, 238); padding: 10px; font-size: 11px; white-space: pre-wrap;" class=""><code class="">app/views/jobs/index.html.erb:25:in `_app_views_jobs_index_html_erb__573411897_16740'</code></pre><div class=""><code class=""><br class=""></code></div></div></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Luckily, I was working on a test instance where I can blow away the database and start over if necessary.</div><div class="">But deleting the last row in the mysql ‘job’ table appears to have fixed it. </div><div class=""><br class=""></div><div class="">— Steve Majewski</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>