Skip to content

Commit

Permalink
Merge branch '2.x' of github.com:islandora/islandora into fix/empty_s…
Browse files Browse the repository at this point in the history
…earch_endpoint
  • Loading branch information
nchiasson-dgi committed Jul 2, 2024
2 parents f8e9963 + 0105343 commit a9564ed
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 26 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build-2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ jobs:
matrix:
php-versions: ["8.1", "8.2", "8.3"]
test-suite: ["kernel", "functional", "functional-javascript"]
drupal-version: ["10.1.x", "10.2.x", "10.3.x-dev"]
drupal-version: ["10.2.x", "10.3.x", "10.4.x-dev"]
mysql: ["8.0"]
allowed_failure: [false]
exclude:
- php-versions: "8.3"
drupal-version: "10.1.x"


name: PHP ${{ matrix.php-versions }} | drupal ${{ matrix.drupal-version }} | mysql ${{ matrix.mysql }} | test-suite ${{ matrix.test-suite }}

Expand Down
2 changes: 1 addition & 1 deletion islandora.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: 'islandora'
description: "Islandora Core"
type: module
package: Islandora
core_version_requirement: ^9 || ^10
core_version_requirement: ^10.2
dependencies:
- context:context_ui
- ctools:ctools
Expand Down
9 changes: 4 additions & 5 deletions islandora.module
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,11 @@ function islandora_entity_view(array &$build, EntityInterface $entity, EntityVie
$route_match_item = \Drupal::routeMatch()->getParameters()->get($entity->getEntityTypeId());
// Ensure the entity matches the route.
if ($entity === $route_match_item) {
if ($display->getComponent('field_gemini_uri')) {
$mapper = \Drupal::service('islandora.entity_mapper');
$flysystem_config = Settings::get('flysystem');
$fedora_root = $flysystem_config['fedora']['config']['root'];
$flysystem_config = Settings::get('flysystem');
$fedora_root = $flysystem_config['fedora']['config']['root'] ?? NULL;
if ($display->getComponent('field_gemini_uri') && $fedora_root) {
$fedora_root = rtrim($fedora_root, '/');

$mapper = \Drupal::service('islandora.entity_mapper');
if ($entity->getEntityTypeId() == 'media') {
// Check if the source file is in Fedora or not.
$media_source_service = \Drupal::service('islandora.media_source_service');
Expand Down
7 changes: 1 addition & 6 deletions tests/src/Functional/DeleteMediaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,7 @@ class DeleteMediaTest extends IslandoraFunctionalTestBase {
public function setUp(): void {
parent::setUp();

if (version_compare(\Drupal::VERSION, '10.1', '>=')) {
$permissions = ['create media', 'delete any media', 'delete any file'];
}
else {
$permissions = ['create media', 'delete any media'];
}
$permissions = ['create media', 'delete any media', 'delete any file'];

// Create a test user.
$this->account = $this->createUser($permissions);
Expand Down
10 changes: 1 addition & 9 deletions tests/src/Functional/JsonldTypeAlterReactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,7 @@ public function testMappingReaction() {

// Add the typed predicate we will select in the reaction config.
// Taken from FieldUiTestTrait->fieldUIAddNewField.
if (version_compare(\Drupal::VERSION, '10.2.x-dev', 'lt')) {
$this->submitForm([
'new_storage_type' => 'string',
'label' => 'Typed Predicate',
'field_name' => 'type_predicate',
], 'Save and continue');
$this->submitForm([], 'Save field settings');
}
elseif (version_compare(\Drupal::VERSION, '10.3.x-dev', 'lt')) {
if (version_compare(\Drupal::VERSION, '10.3.x-dev', 'lt')) {
$this->getSession()->getPage()->selectFieldOption('new_storage_type', 'plain_text');
// For Drupal 10.2, we first need to submit the form with the elements
// displayed on initial page load. The form is using AJAX to send a
Expand Down

0 comments on commit a9564ed

Please sign in to comment.