<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hi Steve, </div>
<div><br>
</div>
<div>I tried to implement the patch, but still no luck. My file on line 71 is different than in the patch you provided  (see function below).</div>
<div><br>
</div>
<div>def search(query, page, records_per_page)</div>
<div>
<div>    uri = URI(@base_url)</div>
<div>    start_record = calculate_start_record(page, records_per_page)</div>
<div>    params = default_params.merge('q' => [query.to_s, @scheme],</div>
<div>                                  'count' => records_per_page,</div>
<div>                                  'start' => start_record)</div>
<div><br>
</div>
<div>    uri.query = URI.encode_www_form(params)</div>
<div><br>
</div>
<div>    response = Net::HTTP.get_response(uri)</div>
<div><br>
</div>
<div>    if response.code != '200'</div>
<div>      raise OpenSearchException.new("Error during OpenSearch search: #{response.body}")</div>
<div>    end</div>
<div><br>
</div>
<div>    results = OpenSearchResultSet.new(response.body, query)</div>
<div><br>
</div>
<div>    results.entries.each do |entry|</div>
<div>      marc_uri = URI("#{entry['uri']}.marcxml.xml")</div>
<div>      response = Net::HTTP.get_response(marc_uri)</div>
<div>      if response.code != '200'</div>
<div>        raise OpenSearchException.new("Error during OpenSearch search: #{response.body}")</div>
<div>      end</div>
<div><br>
</div>
<div>      entry['xml'] = response.body.force_encoding("iso-8859-1").encode('utf-8')</div>
<div>    end</div>
<div><br>
</div>
<div>    results</div>
<div>  End</div>
</div>
<div><br>
</div>
<div>-candace</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span><<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">archivesspace_users_group-bounces@lyralists.lyrasis.org</a>> on behalf of "Majewski, Steven Dennis (sdm7g)" <<a href="mailto:sdm7g@eservices.virginia.edu">sdm7g@eservices.virginia.edu</a>><br>
<span style="font-weight:bold">Reply-To: </span>Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org">archivesspace_users_group@lyralists.lyrasis.org</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, June 15, 2017 at 12:26 PM<br>
<span style="font-weight:bold">To: </span>Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org">archivesspace_users_group@lyralists.lyrasis.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Archivesspace_Users_Group] Subject Heading Plugin not working properly 1.4.2<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">It appears to be no longer working in any version. </div>
<div class="">I believe loc has changed the API for the service slightly. Need to investigate further.</div>
<div class="">But trying to reverse engineer the parameters from inspecting the difference in the params used in the web page search vs. what’s embedded in LCNAF plugin, I tried this change, which appears to work for me: </div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; line-height: normal; color: rgb(105, 40, 40); background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures;" class=""><b class=""><font size="2" class="">diff --git a/plugins/lcnaf/frontend/models/opensearcher.rb b/plugins/lcnaf/frontend/models/opensearcher.rb</font></b></span></div>
<div style="margin: 0px; line-height: normal; color: rgb(105, 40, 40); background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><b class=""><font size="2" class="">index 9391ab5..37e2813 100644</font></b></span></div>
<div style="margin: 0px; line-height: normal; color: rgb(105, 40, 40); background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><b class=""><font size="2" class="">--- a/plugins/lcnaf/frontend/models/opensearcher.rb</font></b></span></div>
<div style="margin: 0px; line-height: normal; color: rgb(105, 40, 40); background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><b class=""><font size="2" class="">+++ b/plugins/lcnaf/frontend/models/opensearcher.rb</font></b></span></div>
<div style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219);" class="">
<font size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #24b1bf" class="">@@ -14,7 +14,7 @@</span><span style="font-variant-ligatures: no-common-ligatures" class=""> class OpenSearcher</span></font></div>
<p style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219); min-height: 19px;" class="">
<font size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder">
</font></p>
<div style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">   def initialize(base_url, scheme )</font></span></div>
<div style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">     @base_url = base_url</font></span></div>
<div style="margin: 0px; line-height: normal; color: rgb(188, 48, 28); background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">-    @scheme = scheme</font></span></div>
<div style="margin: 0px; line-height: normal; color: rgb(38, 179, 26); background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">+    @scheme = "cs:" + scheme</font></span></div>
<div style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">   end</font></span></div>
<p style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219); min-height: 19px;" class="">
<font size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder">
</font></p>
<p style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219); min-height: 19px;" class="">
<font size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder">
</font></p>
<div style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219);" class="">
<font size="2" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #24b1bf" class="">@@ -71,7 +71,7 @@</span><span style="font-variant-ligatures: no-common-ligatures" class=""> class OpenSearcher</span></font></div>
<div style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">                                   'start' => start_record)</font></span></div>
<p style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219); min-height: 19px;" class="">
<font size="2" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder">
</font></p>
<div style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">     uri.query = URI.encode_www_form(params)</font></span></div>
<div style="margin: 0px; line-height: normal; color: rgb(188, 48, 28); background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">-</font></span></div>
<div style="margin: 0px; line-height: normal; color: rgb(38, 179, 26); background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">+    p uri</font></span></div>
<div style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">     results = HTTPRequest.new.get(uri) do |response|</font></span></div>
<div style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">       if response.code != '200'</font></span></div>
<div style="margin: 0px; line-height: normal; background-color: rgb(255, 238, 219);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><font size="2" class="">         raise OpenSearchException.new("Error during OpenSearch search: #{response.body}")</font></span></div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">( The other OCLC search has always been unreliable — it’s a test site and not a supported service. ) </div>
<div class=""><br class="">
</div>
<div class="">— Steve Majewski</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jun 15, 2017, at 12:07 PM, Maurice, Candace A <<a href="mailto:cmaurice@tulane.edu" class="">cmaurice@tulane.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">Hello All,</div>
<div class=""><br class="">
</div>
<div class="">We are on version 1.4.2 and we have had a user report that the subject heading plugin is not returning results for either LCNAF or LCSH (OCLC works, however). The user doesn’t receive any error messages when using the plugin,  but tried typing
 in known subject headings for the Library Of Congress and it’s still not returning results. I checked the  Background jobs and logs and there are not error messages. I also went to the LOC website and all appears to be fine when searching subject headings
 on their site. </div>
<div class=""><br class="">
</div>
<div class="">Has anyone else experienced a similar issue? Can you point me in the right direction for resolving this issue? </div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Thanks, </div>
<div class=""><br class="">
</div>
<div class="">Candace </div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div class="">
<div class="">------------------------- </div>
<div class="">Candace Maurice</div>
</div>
<div class="">Web Developer</div>
<div class="">Howard-Tiltion Memorial Library</div>
<div class="">Tulane University </div>
<div class="">504.314.7784</div>
<div class=""><a href="mailto:cmaurice@tulane.edu" class="">cmaurice@tulane.edu</a></div>
<div class=""><span id="cid:AEBAE6F4-D08D-494B-8411-340260C5F8B7"><512DA1AA-B52D-4559-9B7E-FB77BCC5BB86.png></span></div>
</div>
</div>
</div>
_______________________________________________<br class="">
Archivesspace_Users_Group mailing list<br class="">
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" class="">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br class="">
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</span>
</body>
</html>