- 🇨🇦Canada joelpittet Vancouver
Not a huge deal, but links meant to be external-only are getting and can’t be saved.
I just extended the functionality and added a revert to handle it. 🚀
use Drupal\link\Plugin\migrate\process\FieldLink as DrupalFieldLink; use Drupal\migrate\Attribute\MigrateProcess; #[MigrateProcess('my_field_link')] final class FieldLink extends DrupalFieldLink { protected function canonicalizeUri($uri) { $uri = parent::canonicalizeUri($uri); if ($uri === 'route:<nolink>') { return ''; } return $uri; } }
Not sure how to check if external only is on the field settings, but this works to get the migration done
- 🇺🇸United States mikelutz Michigan, USA
Not a huge deal, but links meant to be external-only are getting and can’t be saved.
This should probably be a new issue, I'd like to explore this a bit. We may want to add a 'allow empty' option or something, but I'd need to see some tests (and go back and look at D7) to see how we could get ourselves into a situation with a blank external only uri and what happens in the migration.
- 🇨🇦Canada joelpittet Vancouver
@mikelutz 🐛 Fix migration issue for link fields with ‘External links only’ enabled Active fill your boots ;)