Skip to content

Commit

Permalink
This fixes a few small issues: length of title/name field, Genre auth…
Browse files Browse the repository at this point in the history
…orities, and EDTF formatting (Islandora-Devops#113)

* Makes the limit on a Node's title field 500 characters.
* Makes the limit on a Tax Term's name field 2000 characters.
* Adds test to ensure ingests still functions with fields this size.
* Updates the possible choices in Genre's Authority Link Field.
* Makes all the EDTF dates render the same on an islandora_object. There
was one that was accidentally configured differently.
  • Loading branch information
bseeger authored Apr 21, 2021
1 parent 77cdff9 commit fe83b43
Show file tree
Hide file tree
Showing 26 changed files with 453 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ REPOSITORY=ghcr.io/jhu-sheridan-libraries/idc-isle-dc
TAG=upstream-20200824-f8d1e8e-26-g09f74e4

# Docker image and tag for snapshot image
SNAPSHOT_TAG=upstream-20201007-739693ae-251-g0145185.1618855066
SNAPSHOT_TAG=upstream-20201007-739693ae-243-gffc0114.1619039064

# IdP, SP entity URIs and base URLs
SP_BASEURL=https://islandora-idc.traefik.me
Expand Down
7 changes: 6 additions & 1 deletion codebase/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"drupal/role_hierarchy": "^2.2",
"drupal/search_api_solr": "^4.1",
"drupal/simplesamlphp_auth": "^3.2",
"drupal/title_length": "^1.1",
"drupal/transliterate_filenames": "^1.3",
"drupal/workbench": "^1.3",
"drupal/workbench_access": "^1.0@beta",
Expand All @@ -89,8 +90,8 @@
"jhu-idc/idc-ui-theme": "dev-develop",
"jhu-idc/idc_ui_module": "dev-main",
"jhu-idc/islandora_defaults": "dev-8.x-1.x",
"jhu_idc/idc_migration": "^1.0",
"jhu-idc/migrate_file": "^1.1",
"jhu_idc/idc_migration": "^1.0",
"vlucas/phpdotenv": "^4.0",
"webflo/drupal-finder": "^1.0.0",
"zaporylie/composer-drupal-optimizations": "^1.0"
Expand Down Expand Up @@ -163,6 +164,10 @@
"patches": {
"simplesamlphp/simplesamlphp": {
"SimpleSAMLphp config": "patches/simplesaml_config.patch"
},
"drupal/title_length": {
"Node title length 1: Apply user config override": "patches/node_title_length_fix-hook-install.patch",
"Node title length 2: Taxonomy name length": "patches/node_title_length_termNameCharLength-3041979-8.patch"
}
}
}
Expand Down
66 changes: 61 additions & 5 deletions codebase/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ content:
settings:
date_separator: dash
date_order: big_endian
month_format: mmm
month_format: mm
day_format: dd
third_party_settings: { }
type: edtf_default
Expand Down
1 change: 1 addition & 0 deletions codebase/config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ module:
system: 0
taxonomy: 0
text: 0
title_length: 0
token: 0
toolbar: 0
tour: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ dependencies:
- taxonomy.vocabulary.genre
module:
- controlled_access_terms
- epp
third_party_settings:
epp:
value: ''
on_update: 1
_core:
default_config_hash: TD_N1DFMXQ97lccq2mI7pm3jjKrls24LtDHr4Dgnr3w
id: taxonomy_term.genre.field_authority_link
Expand All @@ -21,9 +26,9 @@ default_value: { }
default_value_callback: ''
settings:
authority_sources:
lgcft: 'Library of Congress Genre/Form Terms'
aat: 'Art & Architecture Thesaurus'
fast: 'Faceted Application of Subject Terminology'
other: Other
lgcft: 'Library of Congress Genre/Form Terms'
title: 1
link_type: 16
field_type: authority_link
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ source:
STATUS: true
DISPLAY: true
ADMIN: 1
PUBLIC_FS: "public://"
TMP_FS: "/tmp/"
PUBLIC_FS: 'public://'
TMP_FS: /tmp/
process:
_url_filename:
- plugin: callback
-
plugin: callback
callable: parse_url
source: url
- plugin: extract
-
plugin: extract
index:
- path
- plugin: callback
-
plugin: callback
callable: basename
_url_filepath:
plugin: concat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ source:
STATUS: true
DISPLAY: true
ADMIN: 1
PUBLIC_FS: "public://"
TMP_FS: "/tmp/"
PUBLIC_FS: 'public://'
TMP_FS: /tmp/
process:
_url_filename:
- plugin: callback
-
plugin: callback
callable: parse_url
source: url
- plugin: extract
-
plugin: extract
index:
- path
- plugin: callback
-
plugin: callback
callable: basename
_url_filepath:
plugin: concat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,21 @@ source:
STATUS: true
DISPLAY: true
ADMIN: 1
PUBLIC_FS: "public://"
TMP_FS: "/tmp/"
FORMAT: "basic_html"
PUBLIC_FS: 'public://'
TMP_FS: /tmp/
FORMAT: basic_html
process:
_url_filename:
- plugin: callback
-
plugin: callback
callable: parse_url
source: url
- plugin: extract
-
plugin: extract
index:
- path
- plugin: callback
-
plugin: callback
callable: basename
_url_filepath:
plugin: concat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ source:
STATUS: true
DISPLAY: true
ADMIN: 1
PUBLIC_FS: "public://"
TMP_FS: "/tmp/"
PUBLIC_FS: 'public://'
TMP_FS: /tmp/
process:
_url_filename:
- plugin: callback
-
plugin: callback
callable: parse_url
source: url
- plugin: extract
-
plugin: extract
index:
- path
- plugin: callback
-
plugin: callback
callable: basename
_url_filepath:
plugin: concat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ source:
STATUS: true
DISPLAY: true
ADMIN: 1
PUBLIC_FS: "public://"
TMP_FS: "/tmp/"
PUBLIC_FS: 'public://'
TMP_FS: /tmp/
process:
_url_filename:
- plugin: callback
-
plugin: callback
callable: parse_url
source: url
- plugin: extract
-
plugin: extract
index:
- path
- plugin: callback
-
plugin: callback
callable: basename
_url_filepath:
plugin: concat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ source:
STATUS: true
DISPLAY: true
ADMIN: 1
PUBLIC_FS: "public://"
TMP_FS: "/tmp/"
PUBLIC_FS: 'public://'
TMP_FS: /tmp/
process:
name: name
field_media_oembed_video: url
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ source:
STATUS: true
DISPLAY: true
ADMIN: 1
PUBLIC_FS: "public://"
TMP_FS: "/tmp/"
PUBLIC_FS: 'public://'
TMP_FS: /tmp/
process:
_url_filename:
- plugin: callback
-
plugin: callback
callable: parse_url
source: url
- plugin: extract
-
plugin: extract
index:
- path
- plugin: callback
-
plugin: callback
callable: basename
_url_filepath:
plugin: concat
Expand Down
13 changes: 13 additions & 0 deletions codebase/patches/node_title_length_fix-hook-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/title_length.install b/title_length.install
index 16e673ecd..83592c491 100644
--- a/title_length.install
+++ b/title_length.install
@@ -32,7 +32,7 @@ function title_length_install() {
// Update storage definition.
$node_type = Drupal::service('entity_type.manager')->getDefinition('node');
$fields = Node::baseFieldDefinitions($node_type);
- $fields['title']->setSetting('max_length', 500);
+ $fields['title']->setSetting('max_length', $length);
Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('title', 'node', 'node', $fields['title']);
}
Loading

0 comments on commit fe83b43

Please sign in to comment.