Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In class \Drupal\link\Plugin\field\formatter\LinkFormatter
// @todo LinkItemInterface shouldn't treat items with no scheme as
// external, including . All the code here should be removed
// except the first case where we have a valid scheme. There needs to
// be some fixes in RDF module since changing this causes failures in
// Drupal\rdf\Tests\Field\LinkFieldRdfaTest
Making this change *should* work but causes test failures:
--- a/core/modules/rdf/src/Tests/Field/LinkFieldRdfaTest.php
+++ b/core/modules/rdf/src/Tests/Field/LinkFieldRdfaTest.php
@@ -75,7 +75,7 @@ public function testAllFormattersInternal() {
// Set up test values.
$this->testValue = 'admin';
$this->entity = entity_create('entity_test', array());
- $this->entity->{$this->fieldName}->url = $this->testValue;
+ $this->entity->{$this->fieldName}->route_name = 'system.admin';
// Set up the expected result.
// AssertFormatterRdfa looks for a full path.
@@ -94,7 +94,7 @@ public function testAllFormattersFront() {
// Set up test values.
$this->testValue = '<front>';
$this->entity = entity_create('entity_test', array());
- $this->entity->{$this->fieldName}->url = $this->testValue;
+ $this->entity->{$this->fieldName}->route_name = $this->testValue;
// Set up the expected result.
$expected_rdf = array(
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedComment #10
quietone CreditAttribution: quietone as a volunteer commentedI presume the text in the comments in the IS is to be in the code base. Unfortunately, it has eluded my git skills to find any occurrence of it.
@pwolanin, is this still an issue?
Comment #14
smustgrave CreditAttribution: smustgrave at Mobomo commentedClosing as outdated since this moved to PNMI 1 months ago and is eligible to be closed
If you still feel this is an issue please reopen with an updated issue summary. https://www.drupal.org/docs/develop/issues/fields-and-other-parts-of-an-... may help.
Also worth noting RDF is being removed from D10 so please reopen under the RDF project if still an issue.
Thanks!