Issue #3011013 by alexpott, mecmartini, yanniboi, karma0321, joachim, StephanieLuz, jimafisk, J.Gayathri: Taxonomy 'related content' views relationship links to wrong base table
(cherry picked from commit 90db46dc18
)
merge-requests/64/head
parent
ffa4c379c5
commit
15c711efde
|
@ -157,10 +157,10 @@ class TermViewsData extends EntityViewsData {
|
|||
'help' => $this->t('Relate all content tagged with a term.'),
|
||||
'relationship' => [
|
||||
'id' => 'standard',
|
||||
'base' => 'node',
|
||||
'base' => 'node_field_data',
|
||||
'base field' => 'nid',
|
||||
'label' => $this->t('node'),
|
||||
'skip base' => 'node',
|
||||
'skip base' => 'node_field_data',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -105,6 +105,13 @@ class TaxonomyRelationshipTest extends TaxonomyTestBase {
|
|||
$this->assertTrue($row->_relationship_entities['nid'] instanceof NodeInterface);
|
||||
$this->assertEqual($row->_relationship_entities['nid']->id(), $this->nodes[$index]->id());
|
||||
}
|
||||
|
||||
// Test node fields are available through relationship.
|
||||
\Drupal::service('module_installer')->install(['views_ui']);
|
||||
$this->drupalLogin($this->createUser(['administer views']));
|
||||
$this->drupalGet('admin/structure/views/view/test_taxonomy_term_relationship');
|
||||
$this->click('#views-add-field');
|
||||
$this->assertSession()->pageTextContains('Body');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue