From 7bae9fb09ea666e46ffbeb2d271c3ac7c15d40c0 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sun, 26 Feb 2017 22:29:46 +0200 Subject: [PATCH] Add notes for 2017-02-26 --- content/post/2017-02.md | 13 +++++++++++++ public/2017-02/index.html | 18 +++++++++++++++++- public/index.xml | 16 ++++++++++++++++ public/post/index.xml | 16 ++++++++++++++++ public/tags/notes/index.xml | 16 ++++++++++++++++ 5 files changed, 78 insertions(+), 1 deletion(-) diff --git a/content/post/2017-02.md b/content/post/2017-02.md index 585e115af..78e314fcf 100644 --- a/content/post/2017-02.md +++ b/content/post/2017-02.md @@ -216,3 +216,16 @@ filter.org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter.inputFormats = A - Atmire said I can add `dspace.internalUrl` to my build properties and the error will go away - It should be the local URL for accessing Tomcat from the server's own perspective, ie: http://localhost:8080 + +## 2017-02-26 + +- Find all fields with "http://hdl.handle.net" values (most are in `dc.identifier.uri`, but some are in other URL-related fields like `cg.link.reference`, `cg.identifier.dataurl`, and `cg.identifier.url`): + +``` +dspace=# select distinct metadata_field_id from metadatavalue where resource_type_id=2 and text_value like 'http://hdl.handle.net%'; +dspace=# update metadatavalue set text_value = regexp_replace(text_value, 'http://hdl.handle.net', 'https://hdl.handle.net') where resource_type_id=2 and metadata_field_id IN (25, 113, 179, 219, 220, 223) and text_value like 'http://hdl.handle.net%'; +UPDATE 58633 +``` + +- This works but I'm thinking I'll wait on the replacement as there are perhaps some other places that rely on `http://hdl.handle.net` (grep the code, it's scary how many things are hard coded) +- Send message to dspace-tech mailing list with concerns about this diff --git a/public/2017-02/index.html b/public/2017-02/index.html index bd208eb5e..92d6dcc17 100644 --- a/public/2017-02/index.html +++ b/public/2017-02/index.html @@ -92,7 +92,7 @@ Looks like we’ll be using cg.identifier.ccafsprojectpii as the field name "headline": "February, 2017", "url": "https://alanorth.github.io/cgspace-notes/2017-02/", - "wordCount": "1492", + "wordCount": "1595", "datePublished": "2017-02-07T07:04:52-08:00", @@ -421,6 +421,22 @@ filter.org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter.inputFormats = A
  • It should be the local URL for accessing Tomcat from the server’s own perspective, ie: http://localhost:8080
  • +

    2017-02-26

    + + + +
    dspace=# select distinct metadata_field_id from metadatavalue where resource_type_id=2 and text_value like 'http://hdl.handle.net%';
    +dspace=# update metadatavalue set text_value = regexp_replace(text_value, 'http://hdl.handle.net', 'https://hdl.handle.net') where resource_type_id=2 and metadata_field_id IN (25, 113, 179, 219, 220, 223) and text_value like 'http://hdl.handle.net%';
    +UPDATE 58633
    +
    + + + diff --git a/public/index.xml b/public/index.xml index cde6cc2f3..e846fecc4 100644 --- a/public/index.xml +++ b/public/index.xml @@ -267,6 +267,22 @@ filter.org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter.inputFormats = A <ul> <li>Atmire said I can add <code>dspace.internalUrl</code> to my build properties and the error will go away</li> <li>It should be the local URL for accessing Tomcat from the server&rsquo;s own perspective, ie: <a href="http://localhost:8080">http://localhost:8080</a></li> +</ul> + +<h2 id="2017-02-26">2017-02-26</h2> + +<ul> +<li>Find all fields with &ldquo;<a href="http://hdl.handle.net&quot;">http://hdl.handle.net&quot;</a> values (most are in <code>dc.identifier.uri</code>, but some are in other URL-related fields like <code>cg.link.reference</code>, <code>cg.identifier.dataurl</code>, and <code>cg.identifier.url</code>):</li> +</ul> + +<pre><code>dspace=# select distinct metadata_field_id from metadatavalue where resource_type_id=2 and text_value like 'http://hdl.handle.net%'; +dspace=# update metadatavalue set text_value = regexp_replace(text_value, 'http://hdl.handle.net', 'https://hdl.handle.net') where resource_type_id=2 and metadata_field_id IN (25, 113, 179, 219, 220, 223) and text_value like 'http://hdl.handle.net%'; +UPDATE 58633 +</code></pre> + +<ul> +<li>This works but I&rsquo;m thinking I&rsquo;ll wait on the replacement as there are perhaps some other places that rely on <code>http://hdl.handle.net</code> (grep the code, it&rsquo;s scary how many things are hard coded)</li> +<li>Send message to dspace-tech mailing list with concerns about this</li> </ul> diff --git a/public/post/index.xml b/public/post/index.xml index b841fc0ff..d5381548e 100644 --- a/public/post/index.xml +++ b/public/post/index.xml @@ -267,6 +267,22 @@ filter.org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter.inputFormats = A <ul> <li>Atmire said I can add <code>dspace.internalUrl</code> to my build properties and the error will go away</li> <li>It should be the local URL for accessing Tomcat from the server&rsquo;s own perspective, ie: <a href="http://localhost:8080">http://localhost:8080</a></li> +</ul> + +<h2 id="2017-02-26">2017-02-26</h2> + +<ul> +<li>Find all fields with &ldquo;<a href="http://hdl.handle.net&quot;">http://hdl.handle.net&quot;</a> values (most are in <code>dc.identifier.uri</code>, but some are in other URL-related fields like <code>cg.link.reference</code>, <code>cg.identifier.dataurl</code>, and <code>cg.identifier.url</code>):</li> +</ul> + +<pre><code>dspace=# select distinct metadata_field_id from metadatavalue where resource_type_id=2 and text_value like 'http://hdl.handle.net%'; +dspace=# update metadatavalue set text_value = regexp_replace(text_value, 'http://hdl.handle.net', 'https://hdl.handle.net') where resource_type_id=2 and metadata_field_id IN (25, 113, 179, 219, 220, 223) and text_value like 'http://hdl.handle.net%'; +UPDATE 58633 +</code></pre> + +<ul> +<li>This works but I&rsquo;m thinking I&rsquo;ll wait on the replacement as there are perhaps some other places that rely on <code>http://hdl.handle.net</code> (grep the code, it&rsquo;s scary how many things are hard coded)</li> +<li>Send message to dspace-tech mailing list with concerns about this</li> </ul> diff --git a/public/tags/notes/index.xml b/public/tags/notes/index.xml index e38fa26fe..78eb76821 100644 --- a/public/tags/notes/index.xml +++ b/public/tags/notes/index.xml @@ -266,6 +266,22 @@ filter.org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter.inputFormats = A <ul> <li>Atmire said I can add <code>dspace.internalUrl</code> to my build properties and the error will go away</li> <li>It should be the local URL for accessing Tomcat from the server&rsquo;s own perspective, ie: <a href="http://localhost:8080">http://localhost:8080</a></li> +</ul> + +<h2 id="2017-02-26">2017-02-26</h2> + +<ul> +<li>Find all fields with &ldquo;<a href="http://hdl.handle.net&quot;">http://hdl.handle.net&quot;</a> values (most are in <code>dc.identifier.uri</code>, but some are in other URL-related fields like <code>cg.link.reference</code>, <code>cg.identifier.dataurl</code>, and <code>cg.identifier.url</code>):</li> +</ul> + +<pre><code>dspace=# select distinct metadata_field_id from metadatavalue where resource_type_id=2 and text_value like 'http://hdl.handle.net%'; +dspace=# update metadatavalue set text_value = regexp_replace(text_value, 'http://hdl.handle.net', 'https://hdl.handle.net') where resource_type_id=2 and metadata_field_id IN (25, 113, 179, 219, 220, 223) and text_value like 'http://hdl.handle.net%'; +UPDATE 58633 +</code></pre> + +<ul> +<li>This works but I&rsquo;m thinking I&rsquo;ll wait on the replacement as there are perhaps some other places that rely on <code>http://hdl.handle.net</code> (grep the code, it&rsquo;s scary how many things are hard coded)</li> +<li>Send message to dspace-tech mailing list with concerns about this</li> </ul>