diff --git a/content/posts/2019-05.md b/content/posts/2019-05.md new file mode 100644 index 000000000..034710a46 --- /dev/null +++ b/content/posts/2019-05.md @@ -0,0 +1,61 @@ +--- +title: "May, 2019" +date: 2019-05-01T07:37:43+03:00 +author: "Alan Orth" +tags: ["Notes"] +--- + +## 2019-05-01 + +- Help CCAFS with regenerating some item thumbnails after they uploaded new PDFs to some items on CGSpace +- A user on the dspace-tech mailing list offered some suggestions for troubleshooting the problem with the inability to delete certain items + - Apparently if the item is in the `workflowitem` table it is submitted to a workflow + - And if it is in the `workspaceitem` table it is in the pre-submitted state +- The item seems to be in a pre-submitted state, so I tried to delete it from there: + +``` +dspace=# DELETE FROM workspaceitem WHERE item_id=74648; +DELETE 1 +``` + +- But after this I tried to delete the item from the XMLUI and it is *still* present... + + + +- I managed to delete the problematic item from the database + - First I deleted the item's bitstream in XMLUI and then ran `dspace cleanup -v` to remove it from the assetstore + - Then I ran the following SQL: + +``` +dspace=# DELETE FROM metadatavalue WHERE resource_id=74648; +dspace=# DELETE FROM workspaceitem WHERE item_id=74648; +dspace=# DELETE FROM item WHERE item_id=74648; +``` +- Now the item is (hopefully) really gone and I can continue to troubleshoot the issue with REST API's `/items/find-by-metadata-value` endpoint + - Of course I run into another HTTP 401 error when I continue trying the LandPortal search from last month: + +``` +$ curl -f -H "Content-Type: application/json" -X POST "http://localhost:8080/rest/items/find-by-metadata-field" -d '{"key":"cg.subject.cpwf", "value":"WATER MANAGEMENT","language": "en_US"}' +curl: (22) The requested URL returned error: 401 Unauthorized +``` + +- The DSpace log shows the item ID (because I modified the error text): + +``` +2019-05-01 11:41:11,069 ERROR org.dspace.rest.ItemsResource @ User(anonymous) has not permission to read item(id=77708)! +``` + +- If I delete that one I get another, making the list of item IDs so far: + - 74648 + - 77708 + - 85079 +- Some are in the `workspaceitem` table (pre-submission), others are in the `workflowitem` table (submitted), and others are actually approved, but withdrawn... + - This is actually a worthless exercise because the real issue is that the `/items/find-by-metadata-value` endpoint is simply designed flawed and shouldn't be fatally erroring when the search returns items the user doesn't have permission to access + - It would take way too much time to try to fix the fucked up items that are in limbo by deleting them in SQL, but also, it doesn't actually fix the problem because some items are *submitted* but *withdrawn*, so they actually have handles and everything + - I think the solution is to recommend people don't use the `/items/find-by-metadata-value` endpoint +- CIP is asking about embedding PDF thumbnail images in their RSS feeds again + - They asked in 2018-09 as well and I told them it wasn't possible + - To make sure, I looked at [the documentation for RSS media feeds](https://wiki.duraspace.org/display/DSPACE/Enable+Media+RSS+Feeds) and tried it, but couldn't get it to work + - It seems to be geared towards iTunes and Podcasts... I dunno + + diff --git a/docs/2015-11/index.html b/docs/2015-11/index.html index 27f3230d0..01b7a697b 100644 --- a/docs/2015-11/index.html +++ b/docs/2015-11/index.html @@ -278,16 +278,16 @@ db.statementpool = true
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2015-12/index.html b/docs/2015-12/index.html index c7c5293e1..a42fec243 100644 --- a/docs/2015-12/index.html +++ b/docs/2015-12/index.html @@ -295,16 +295,16 @@ $ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-01/index.html b/docs/2016-01/index.html index c20da004c..20df3347e 100644 --- a/docs/2016-01/index.html +++ b/docs/2016-01/index.html @@ -210,16 +210,16 @@ $ find SimpleArchiveForBio/ -iname “*.pdf” -exec basename {} \; | so
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-02/index.html b/docs/2016-02/index.html index 1fa188861..bc24031d2 100644 --- a/docs/2016-02/index.html +++ b/docs/2016-02/index.html @@ -463,16 +463,16 @@ Bitstream: tést señora alimentación.pdf
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-03/index.html b/docs/2016-03/index.html index 76a89f194..0f896e6ac 100644 --- a/docs/2016-03/index.html +++ b/docs/2016-03/index.html @@ -363,16 +363,16 @@ Reinstall my local (Mac OS X) DSpace stack with Tomcat 7, PostgreSQL 9.3, and Ja
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-04/index.html b/docs/2016-04/index.html index b15e23d65..96ab663da 100644 --- a/docs/2016-04/index.html +++ b/docs/2016-04/index.html @@ -580,16 +580,16 @@ dspace.log.2016-04-27:7271
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-05/index.html b/docs/2016-05/index.html index e60736c2a..35f1f4cfa 100644 --- a/docs/2016-05/index.html +++ b/docs/2016-05/index.html @@ -430,16 +430,16 @@ sys 0m20.540s
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-06/index.html b/docs/2016-06/index.html index 7c1cc9e0b..6e55bd771 100644 --- a/docs/2016-06/index.html +++ b/docs/2016-06/index.html @@ -475,16 +475,16 @@ $ ./delete-metadata-values.py -f dc.contributor.corporate -i Corporate-Authors-D
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-07/index.html b/docs/2016-07/index.html index d1869f589..a4c1a17dc 100644 --- a/docs/2016-07/index.html +++ b/docs/2016-07/index.html @@ -393,16 +393,16 @@ discovery.index.authority.ignore-variants=true
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-08/index.html b/docs/2016-08/index.html index 0927a1e90..f30927bbd 100644 --- a/docs/2016-08/index.html +++ b/docs/2016-08/index.html @@ -466,16 +466,16 @@ $ JAVA_OPTS="-Dfile.encoding=UTF-8 -Xmx512m" /home/cgspace.cgiar.org/b
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-09/index.html b/docs/2016-09/index.html index 0cd909035..eab49c2c8 100644 --- a/docs/2016-09/index.html +++ b/docs/2016-09/index.html @@ -766,16 +766,16 @@ $ ./delete-metadata-values.py -i ilrisubjects-delete-13.csv -f cg.subject.ilri -
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-10/index.html b/docs/2016-10/index.html index 03764a35e..25950c863 100644 --- a/docs/2016-10/index.html +++ b/docs/2016-10/index.html @@ -451,16 +451,16 @@ dspace=# update metadatavalue set text_value = regexp_replace(text_value, 'http:
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-11/index.html b/docs/2016-11/index.html index d046545db..8f342f85f 100644 --- a/docs/2016-11/index.html +++ b/docs/2016-11/index.html @@ -668,16 +668,16 @@ org.dspace.discovery.SearchServiceException: Error executing query
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2016-12/index.html b/docs/2016-12/index.html index 33c8f2812..193e9d033 100644 --- a/docs/2016-12/index.html +++ b/docs/2016-12/index.html @@ -904,16 +904,16 @@ $ exit
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-01/index.html b/docs/2017-01/index.html index af458c3d5..12c8f1c7b 100644 --- a/docs/2017-01/index.html +++ b/docs/2017-01/index.html @@ -449,16 +449,16 @@ $ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-02/index.html b/docs/2017-02/index.html index a0bdda7a0..8712981d1 100644 --- a/docs/2017-02/index.html +++ b/docs/2017-02/index.html @@ -521,16 +521,16 @@ COPY 1968
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-03/index.html b/docs/2017-03/index.html index 43ec229b3..1ce429183 100644 --- a/docs/2017-03/index.html +++ b/docs/2017-03/index.html @@ -435,16 +435,16 @@ $ ./delete-metadata-values.py -i Investors-Delete-121.csv -f dc.description.spon
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-04/index.html b/docs/2017-04/index.html index fb7754e08..c4342b636 100644 --- a/docs/2017-04/index.html +++ b/docs/2017-04/index.html @@ -714,16 +714,16 @@ $ gem install compass -v 1.0.3
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-05/index.html b/docs/2017-05/index.html index 14df4b7fb..1d11d2f01 100644 --- a/docs/2017-05/index.html +++ b/docs/2017-05/index.html @@ -474,16 +474,16 @@ UPDATE 187
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-06/index.html b/docs/2017-06/index.html index fd33e1165..bdc2710a7 100644 --- a/docs/2017-06/index.html +++ b/docs/2017-06/index.html @@ -292,16 +292,16 @@ $ JAVA_OPTS="-Xmx1024m -Dfile.encoding=UTF-8" [dspace]/bin/dspace impo
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-07/index.html b/docs/2017-07/index.html index 1ae1a2aa5..df2732e6a 100644 --- a/docs/2017-07/index.html +++ b/docs/2017-07/index.html @@ -321,16 +321,16 @@ delete from metadatavalue where resource_type_id=2 and metadata_field_id=235 and
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-08/index.html b/docs/2017-08/index.html index 3bd056573..81c3742c2 100644 --- a/docs/2017-08/index.html +++ b/docs/2017-08/index.html @@ -607,16 +607,16 @@ org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-09/index.html b/docs/2017-09/index.html index 5be3c17be..26de9b713 100644 --- a/docs/2017-09/index.html +++ b/docs/2017-09/index.html @@ -779,16 +779,16 @@ Cert Status: good
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-10/index.html b/docs/2017-10/index.html index d85debfcc..625d64b64 100644 --- a/docs/2017-10/index.html +++ b/docs/2017-10/index.html @@ -544,16 +544,16 @@ session_id=6C30F10B4351A4ED83EC6ED50AFD6B6A
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-11/index.html b/docs/2017-11/index.html index 038d7bb4b..e272e53fc 100644 --- a/docs/2017-11/index.html +++ b/docs/2017-11/index.html @@ -1188,16 +1188,16 @@ $ cat dspace.log.2017-11-28 | grep -o -E 'session_id=[A-Z0-9]{32}' | sort -n | u
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2017-12/index.html b/docs/2017-12/index.html index 5a2e494da..fee850261 100644 --- a/docs/2017-12/index.html +++ b/docs/2017-12/index.html @@ -953,16 +953,16 @@ DELETE 20
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-01/index.html b/docs/2018-01/index.html index 97f2d989d..32e8879ea 100644 --- a/docs/2018-01/index.html +++ b/docs/2018-01/index.html @@ -1780,16 +1780,16 @@ Catalina:type=Manager,context=/,host=localhost activeSessions 8
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-02/index.html b/docs/2018-02/index.html index d4c06874c..29c7c5a24 100644 --- a/docs/2018-02/index.html +++ b/docs/2018-02/index.html @@ -1299,16 +1299,16 @@ UPDATE 3
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-03/index.html b/docs/2018-03/index.html index 40058f4c6..e7eecc823 100644 --- a/docs/2018-03/index.html +++ b/docs/2018-03/index.html @@ -725,16 +725,16 @@ Fixed 5 occurences of: GENEBANKS
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-04/index.html b/docs/2018-04/index.html index 3177c4112..da11df147 100644 --- a/docs/2018-04/index.html +++ b/docs/2018-04/index.html @@ -723,16 +723,16 @@ $ pg_restore -O -U dspacetest -d dspacetest -W -h localhost /tmp/dspace_2018-04-
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-05/index.html b/docs/2018-05/index.html index c69b9f735..cd3d5da9e 100644 --- a/docs/2018-05/index.html +++ b/docs/2018-05/index.html @@ -602,16 +602,16 @@ $ psql -h localhost -U postgres dspacetest
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-06/index.html b/docs/2018-06/index.html index 01bdb94f6..f7677a31d 100644 --- a/docs/2018-06/index.html +++ b/docs/2018-06/index.html @@ -582,16 +582,16 @@ $ sed '/^id/d' 10568-*.csv | csvcut -c 1,2 > map-to-cifor-archive.csv
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-07/index.html b/docs/2018-07/index.html index ba53a6474..1ca7e4fe4 100644 --- a/docs/2018-07/index.html +++ b/docs/2018-07/index.html @@ -693,16 +693,16 @@ dspace=# select count(text_value) from metadatavalue where resource_type_id=2 an
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-08/index.html b/docs/2018-08/index.html index d9dadda28..d5f4a8f32 100644 --- a/docs/2018-08/index.html +++ b/docs/2018-08/index.html @@ -529,16 +529,16 @@ $ dspace database migrate ignored
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-09/index.html b/docs/2018-09/index.html index f3a29b46d..451e691f3 100644 --- a/docs/2018-09/index.html +++ b/docs/2018-09/index.html @@ -907,16 +907,16 @@ UPDATE metadatavalue SET text_value='ja' WHERE resource_type_id=2 AND metadata_f
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-10/index.html b/docs/2018-10/index.html index 07f864532..0a7e6321a 100644 --- a/docs/2018-10/index.html +++ b/docs/2018-10/index.html @@ -810,16 +810,16 @@ $ curl -X GET -H "Content-Type: application/json" -H "Accept: app
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-11/index.html b/docs/2018-11/index.html index d2996d212..453dd705a 100644 --- a/docs/2018-11/index.html +++ b/docs/2018-11/index.html @@ -668,16 +668,16 @@ $ dspace dsrun org.dspace.eperson.Groomer -a -b 11/27/2016 -d
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2018-12/index.html b/docs/2018-12/index.html index 62e656265..4763e411c 100644 --- a/docs/2018-12/index.html +++ b/docs/2018-12/index.html @@ -733,16 +733,16 @@ UPDATE 1
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2019-01/index.html b/docs/2019-01/index.html index 90cc7758a..c03baa9cf 100644 --- a/docs/2019-01/index.html +++ b/docs/2019-01/index.html @@ -1407,16 +1407,16 @@ identify: CorruptImageProfile `xmp' @ warning/profile.c/SetImageProfileInternal/
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2019-02/index.html b/docs/2019-02/index.html index 78901fd62..7d7ad6a98 100644 --- a/docs/2019-02/index.html +++ b/docs/2019-02/index.html @@ -1642,16 +1642,16 @@ Please see the DSpace documentation for assistance.
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2019-03/index.html b/docs/2019-03/index.html index f8534a318..f2cc20170 100644 --- a/docs/2019-03/index.html +++ b/docs/2019-03/index.html @@ -1421,16 +1421,16 @@ sys 0m2.551s
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2019-04/index.html b/docs/2019-04/index.html index 0bc92f997..9a264b519 100644 --- a/docs/2019-04/index.html +++ b/docs/2019-04/index.html @@ -38,7 +38,7 @@ $ ./delete-metadata-values.py -i /tmp/2019-02-21-delete-1-region.csv -db dspace - + @@ -83,7 +83,7 @@ $ ./delete-metadata-values.py -i /tmp/2019-02-21-delete-1-region.csv -db dspace "url": "https:\/\/alanorth.github.io\/cgspace-notes\/2019-04\/", "wordCount": "6800", "datePublished": "2019-04-01T09:00:43\x2b03:00", - "dateModified": "2019-04-28T19:07:51\x2b03:00", + "dateModified": "2019-04-30T11:39:09\x2b03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -1491,16 +1491,16 @@ UPDATE 14
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/2019-05/index.html b/docs/2019-05/index.html new file mode 100644 index 000000000..ed2ce8082 --- /dev/null +++ b/docs/2019-05/index.html @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + May, 2019 | CGSpace Notes + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + +
+
+

CGSpace Notes

+

Documenting day-to-day work on the CGSpace repository.

+
+
+ + + + +
+
+
+ + + + +
+
+

May, 2019

+ +
+

2019-05-01

+ +
    +
  • Help CCAFS with regenerating some item thumbnails after they uploaded new PDFs to some items on CGSpace
  • +
  • A user on the dspace-tech mailing list offered some suggestions for troubleshooting the problem with the inability to delete certain items + +
      +
    • Apparently if the item is in the workflowitem table it is submitted to a workflow
    • +
    • And if it is in the workspaceitem table it is in the pre-submitted state
    • +
  • +
  • The item seems to be in a pre-submitted state, so I tried to delete it from there:
  • +
+ +
dspace=# DELETE FROM workspaceitem WHERE item_id=74648;
+DELETE 1
+
+ +
    +
  • But after this I tried to delete the item from the XMLUI and it is still present…
  • +
+ +
    +
  • I managed to delete the problematic item from the database + +
      +
    • First I deleted the item’s bitstream in XMLUI and then ran dspace cleanup -v to remove it from the assetstore
    • +
    • Then I ran the following SQL:
    • +
  • +
+ +
dspace=# DELETE FROM metadatavalue WHERE resource_id=74648;
+dspace=# DELETE FROM workspaceitem WHERE item_id=74648;
+dspace=# DELETE FROM item WHERE item_id=74648;
+
+ +
    +
  • Now the item is (hopefully) really gone and I can continue to troubleshoot the issue with REST API’s /items/find-by-metadata-value endpoint + +
      +
    • Of course I run into another HTTP 401 error when I continue trying the LandPortal search from last month:
    • +
  • +
+ +
$ curl -f -H "Content-Type: application/json" -X POST "http://localhost:8080/rest/items/find-by-metadata-field" -d '{"key":"cg.subject.cpwf", "value":"WATER MANAGEMENT","language": "en_US"}'
+curl: (22) The requested URL returned error: 401 Unauthorized
+
+ +
    +
  • The DSpace log shows the item ID (because I modified the error text):
  • +
+ +
2019-05-01 11:41:11,069 ERROR org.dspace.rest.ItemsResource @ User(anonymous) has not permission to read item(id=77708)!
+
+ +
    +
  • If I delete that one I get another, making the list of item IDs so far: + +
      +
    • 74648
    • +
    • 77708
    • +
    • 85079
    • +
  • +
  • Some are in the workspaceitem table (pre-submission), others are in the workflowitem table (submitted), and others are actually approved, but withdrawn… + +
      +
    • This is actually a worthless exercise because the real issue is that the /items/find-by-metadata-value endpoint is simply designed flawed and shouldn’t be fatally erroring when the search returns items the user doesn’t have permission to access
    • +
    • It would take way too much time to try to fix the fucked up items that are in limbo by deleting them in SQL, but also, it doesn’t actually fix the problem because some items are submitted but withdrawn, so they actually have handles and everything
    • +
    • I think the solution is to recommend people don’t use the /items/find-by-metadata-value endpoint
    • +
  • +
  • CIP is asking about embedding PDF thumbnail images in their RSS feeds again + +
      +
    • They asked in 2018-09 as well and I told them it wasn’t possible
    • +
    • To make sure, I looked at the documentation for RSS media feeds and tried it, but couldn’t get it to work
    • +
    • It seems to be geared towards iTunes and Podcasts… I dunno
    • +
  • +
+ + + + + + + +
+ + + +
+ + + + +
+
+ + + + + + + + + diff --git a/docs/404.html b/docs/404.html index 7c197cd09..e0f0e1b6e 100644 --- a/docs/404.html +++ b/docs/404.html @@ -87,16 +87,16 @@
    -
  1. April, 2019
  2. +
  3. May, 2019
  4. Posts
  5. +
  6. April, 2019
  7. +
  8. March, 2019
  9. February, 2019
  10. -
  11. January, 2019
  12. -
diff --git a/docs/categories/index.html b/docs/categories/index.html index 0c398daa2..aabd0db80 100644 --- a/docs/categories/index.html +++ b/docs/categories/index.html @@ -89,6 +89,43 @@ +
+
+

May, 2019

+ +
+

2019-05-01

+ + + +
dspace=# DELETE FROM workspaceitem WHERE item_id=74648;
+DELETE 1
+
+ + + Read more → +
+ + + + + +

April, 2019

@@ -397,38 +434,6 @@ sys 0m1.979s - -
-
-

July, 2018

- -
-

2018-07-01

- -
    -
  • I want to upgrade DSpace Test to DSpace 5.8 so I took a backup of its current database just in case:
  • -
- -
$ pg_dump -b -v -o --format=custom -U dspace -f dspace-2018-07-01.backup dspace
-
- -
    -
  • During the mvn package stage on the 5.8 branch I kept getting issues with java running out of memory:
  • -
- -
There is insufficient memory for the Java Runtime Environment to continue.
-
- Read more → -
- - - - -