From 82fb0dc6e27224f39bb9fb025295ced519129339 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Fri, 5 May 2017 12:19:48 -0400 Subject: [PATCH 1/7] ISLANDORA-1781 display that an object is not active. --- islandora.module | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/islandora.module b/islandora.module index ff919ef7..f4dffb35 100644 --- a/islandora.module +++ b/islandora.module @@ -1024,6 +1024,10 @@ function islandora_view_object(AbstractObject $object) { module_load_include('inc', 'islandora', 'includes/breadcrumb'); module_load_include('inc', 'islandora', 'includes/utilities'); + // Warn if object is unpublished + if ($object->state != 'A') { + drupal_set_message(t('This object is not active. Metadata may not display correctly.'), 'warning'); + } // Optional pager parameters. $page_number = (empty($_GET['page'])) ? '1' : $_GET['page']; $page_size = (empty($_GET['pagesize'])) ? '10' : $_GET['pagesize']; From 6dd710cb25fb34f39a9a82481934d454b5d46245 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Fri, 5 May 2017 12:32:37 -0400 Subject: [PATCH 2/7] Fix wording. --- islandora.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/islandora.module b/islandora.module index f4dffb35..14f539e8 100644 --- a/islandora.module +++ b/islandora.module @@ -1024,7 +1024,7 @@ function islandora_view_object(AbstractObject $object) { module_load_include('inc', 'islandora', 'includes/breadcrumb'); module_load_include('inc', 'islandora', 'includes/utilities'); - // Warn if object is unpublished + // Warn if object is inactive or deleted. if ($object->state != 'A') { drupal_set_message(t('This object is not active. Metadata may not display correctly.'), 'warning'); } From 8aff1f929e46ee26eeaecb8bcad9d74d60669d99 Mon Sep 17 00:00:00 2001 From: Rosemary Le Faive Date: Fri, 5 May 2017 14:43:51 -0400 Subject: [PATCH 3/7] Whitespace --- islandora.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/islandora.module b/islandora.module index 14f539e8..e58c2d71 100644 --- a/islandora.module +++ b/islandora.module @@ -1024,7 +1024,7 @@ function islandora_view_object(AbstractObject $object) { module_load_include('inc', 'islandora', 'includes/breadcrumb'); module_load_include('inc', 'islandora', 'includes/utilities'); - // Warn if object is inactive or deleted. + // Warn if object is inactive or deleted. if ($object->state != 'A') { drupal_set_message(t('This object is not active. Metadata may not display correctly.'), 'warning'); } From 542f138841decb73f825e98ad4c70b32e6371a66 Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Thu, 18 May 2017 18:25:17 -0300 Subject: [PATCH 4/7] Use the replacements and less pasta. --- includes/tuque_wrapper.inc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 15d436aa..8c21b4ed 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -240,11 +240,12 @@ class IslandoraFedoraObject extends FedoraObject { return $ret; } catch (Exception $e) { - watchdog('islandora', 'Failed to ingest object: @pid
code: @code
message: @msg', array( - '@pid' => $object->id, - '@dsid' => $datastream->id, - '@code' => $e->getCode(), - '@msg' => $e->getMessage()), WATCHDOG_ERROR); + watchdog('islandora', 'Failed to ingest datastream @datastream on object: @pid
code: @code
message: @msg', array( + '@pid' => $object->id, + '@dsid' => $datastream->id, + '@code' => $e->getCode(), + '@msg' => $e->getMessage(), + ), WATCHDOG_ERROR); throw $e; } } From a41c4178ec92b6d46292a8824133e01c4caa4723 Mon Sep 17 00:00:00 2001 From: Rosemary Le Faive Date: Tue, 6 Jun 2017 15:17:51 -0300 Subject: [PATCH 5/7] ISLANDORA-1998 Check correct permission for replace ds link. (#681) * ISLANDORA-1998 Check correct permission for replace ds link. * Remove redundant theme check. --- theme/theme.inc | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/theme/theme.inc b/theme/theme.inc index 81c4a33f..d94b1345 100644 --- a/theme/theme.inc +++ b/theme/theme.inc @@ -64,18 +64,12 @@ function template_preprocess_islandora_default_edit(array &$variables) { elseif (user_access(ISLANDORA_VIEW_DATASTREAM_HISTORY)) { $row[] = array(); } - if (islandora_datastream_access(ISLANDORA_VIEW_DATASTREAM_HISTORY, $ds)) { - // Add new datastream content as the lastest version. - $row[] = array( - 'class' => 'datastream-replace', - 'data' => theme('islandora_datastream_replace_link', array( - 'datastream' => $ds, - )), - ); - } - else { - $row[] = array(); - } + $row[] = array( + 'class' => 'datastream-replace', + 'data' => theme('islandora_datastream_replace_link', array( + 'datastream' => $ds, + )), + ); $row[] = array( 'class' => 'datastream-download', 'data' => theme('islandora_datastream_download_link', array( From ef58ff93c6840f4ef1bb48548d9900914d8451e4 Mon Sep 17 00:00:00 2001 From: Marcus Barnes Date: Tue, 13 Jun 2017 10:00:30 -0400 Subject: [PATCH 6/7] ISLANDORA-2001 Adds JSON-LD MIME type to islandora_mime_mapping function. --- includes/mimetype.utils.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/mimetype.utils.inc b/includes/mimetype.utils.inc index c3a2ec4a..4dfb5b69 100644 --- a/includes/mimetype.utils.inc +++ b/includes/mimetype.utils.inc @@ -268,5 +268,7 @@ function islandora_mime_mapping() { // Web Archives: "warc" => "application/warc", "json" => "application/json", + // JSON-LD + "jsonld" => "application/ld+json", ); } From d4034e7b6a0df9490206e5600663f4ef3570972a Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Wed, 19 Jul 2017 15:44:50 -0300 Subject: [PATCH 7/7] DSID not datastream. (#680) * DSID not datastream. * Catch the typed exception and return FALSE for a deprecation cycle. * Move the exception for easy removal later. * Update as per code review feedback. * Update README. * May. * English. --- README.md | 2 ++ includes/tuque_wrapper.inc | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 337bacd3..579f87a1 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,8 @@ Further documentation for this module is available at [our wiki](https://wiki.du ## Troubleshooting/Issues +NOTE: There has been a function signature change for the `ingestDatastream` function within Tuque which will be deprecated after the 7.x-1.10 release. To read about it in detail please see the [JIRA ticket](https://jira.duraspace.org/browse/ISLANDORA-1995). For the time being there is a warning stating that this will become deprecated and that code that utilizes this specific behavior should be updated. Once this code is updated the `islandora_deprecation_return_false_when_datastream_exists` variable may be set to FALSE so the warning no longer displays. An example for doing this with drush: `drush vset islandora_deprecation_return_false_when_datastream_exists FALSE`. + Having problems or solved a problem? Check out the Islandora google groups for a solution. * [Islandora Group](https://groups.google.com/forum/?hl=en&fromgroups#!forum/islandora) diff --git a/includes/tuque_wrapper.inc b/includes/tuque_wrapper.inc index 8c21b4ed..19b73b0f 100644 --- a/includes/tuque_wrapper.inc +++ b/includes/tuque_wrapper.inc @@ -240,7 +240,15 @@ class IslandoraFedoraObject extends FedoraObject { return $ret; } catch (Exception $e) { - watchdog('islandora', 'Failed to ingest datastream @datastream on object: @pid
code: @code
message: @msg', array( + if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) { + $message = format_string('The datastream @dsid already exists on the object: @pid. As of 7.x-1.10 the function signature for ingestDatastream will be changed from returning FALSE on failure to throwing an exception.', array( + '@dsid' => $datastream->id, + '@pid' => $object->id, + )); + trigger_error(filter_xss($message), E_USER_DEPRECATED); + return FALSE; + } + watchdog('islandora', 'Failed to ingest datastream @dsid on object: @pid
code: @code
message: @msg', array( '@pid' => $object->id, '@dsid' => $datastream->id, '@code' => $e->getCode(),