Skip to content

Commit

Permalink
UHF-10891: Fixed href value
Browse files Browse the repository at this point in the history
  • Loading branch information
tuutti committed Oct 30, 2024
1 parent 9b6de92 commit 0226756
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Drush/Commands/TransliterateFilesCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Drupal\helfi_azure_fs\Drush\Commands;

use Consolidation\OutputFormatters\StructuredData\RowsOfFields;
use Drupal\Component\Utility\Html;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityFieldManagerInterface;
Expand Down Expand Up @@ -198,11 +199,11 @@ private function processFieldLinks(ContentEntityInterface $entity, string $field
continue;
}
$hasChanges = TRUE;
$node->setAttribute('href', str_replace($href, $newUrl, $value));
$node->setAttribute('href', $newUrl);
}

if ($hasChanges) {
$entity->set($fieldName, Html::serialize($dom));
$entity->get($fieldName)->value = Html::serialize($dom);
$entity->save();
}
}
Expand Down

0 comments on commit 0226756

Please sign in to comment.