diff --git a/.github/workflows/build-2.x.yml b/.github/workflows/build-2.x.yml index 041eca7a..396b9a0b 100644 --- a/.github/workflows/build-2.x.yml +++ b/.github/workflows/build-2.x.yml @@ -23,10 +23,10 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ["8.1"] + php-versions: ["8.1", "8.2"] # test-suite functional-javascript will appear to pass but will skip tests; missing chromedriver. test-suite: ["kernel", "functional", "functional-javascript"] - drupal-version: ["9.5.x", "10.0.x", "10.1.x"] + drupal-version: ["10.0.x", "10.1.x"] # Fails on 10.2 until https://github.com/Islandora/islandora/issues/989 is resolved. mysql: ["8.0"] allowed_failure: [false] diff --git a/config/install/islandora.settings.yml b/config/install/islandora.settings.yml index 179d4213..1497c291 100644 --- a/config/install/islandora.settings.yml +++ b/config/install/islandora.settings.yml @@ -1,5 +1,4 @@ broker_url: 'tcp://localhost:61613' jwt_expiry: '+2 hour' -gemini_url: '' delete_media_and_files: TRUE gemini_pseudo_bundles: [] diff --git a/config/schema/islandora.schema.yml b/config/schema/islandora.schema.yml index 89c1b58a..49de998b 100644 --- a/config/schema/islandora.schema.yml +++ b/config/schema/islandora.schema.yml @@ -26,9 +26,6 @@ islandora.settings: upload_form_allowed_mimetypes: type: string label: 'Upload Form Allowed Extensions' - gemini_url: - type: uri - label: 'Url to Gemini microservice' gemini_pseudo_bundles: type: sequence label: 'List of node, media and taxonomy terms that should include the linked Fedora URI' diff --git a/modules/islandora_text_extraction/src/Plugin/Field/FieldFormatter/OcrTextFormatter.php b/modules/islandora_text_extraction/src/Plugin/Field/FieldFormatter/OcrTextFormatter.php index 2e066943..055e76d9 100644 --- a/modules/islandora_text_extraction/src/Plugin/Field/FieldFormatter/OcrTextFormatter.php +++ b/modules/islandora_text_extraction/src/Plugin/Field/FieldFormatter/OcrTextFormatter.php @@ -132,8 +132,9 @@ class OcrTextFormatter extends FormatterBase implements ContainerFactoryPluginIn $fileItem = $item->getValue(); $file = $this->entityTypeManager->getStorage('file')->load($fileItem['target_id']); $contents = file_get_contents($file->getFileUri()); - if (mb_detect_encoding($contents) != 'UTF-8') { - $contents = utf8_encode($contents); + $detected_encoding = mb_detect_encoding($contents); + if ($detected_encoding != 'UTF-8') { + $contents = mb_convert_encoding($contents, 'UTF-8', $detected_encoding); } $contents = nl2br($contents); return $contents; diff --git a/tests/src/Kernel/EventGeneratorTest.php b/tests/src/Kernel/EventGeneratorTest.php index 28a4ec03..34a5ae92 100644 --- a/tests/src/Kernel/EventGeneratorTest.php +++ b/tests/src/Kernel/EventGeneratorTest.php @@ -49,7 +49,7 @@ class EventGeneratorTest extends IslandoraKernelTestBase { $test_type = NodeType::create([ 'type' => 'test_type', - 'label' => 'Test Type', + 'name' => 'Test Type', ]); $test_type->save();