Issue #2350309 by droplet, larowlan: Forum index links head to taxonomy/term/{term} instead of forum/{term}
parent
12bdc6cd30
commit
7abdb6540b
|
@ -568,7 +568,7 @@ function template_preprocess_forum_list(&$variables) {
|
|||
// Sanitize each forum so that the template can safely print the data.
|
||||
foreach ($variables['forums'] as $id => $forum) {
|
||||
$variables['forums'][$id]->description = Xss::filterAdmin($forum->description->value);
|
||||
$variables['forums'][$id]->link = $forum->url();
|
||||
$variables['forums'][$id]->link = forum_uri($forum);
|
||||
$variables['forums'][$id]->name = String::checkPlain($forum->label());
|
||||
$variables['forums'][$id]->is_container = !empty($forum->forum_container->value);
|
||||
$variables['forums'][$id]->zebra = $row % 2 == 0 ? 'odd' : 'even';
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace Drupal\forum\Tests;
|
|||
use Drupal\Core\Entity\EntityInterface;
|
||||
use Drupal\Core\Link;
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
use Drupal\Core\Url;
|
||||
|
||||
/**
|
||||
* Create, view, edit, delete, and change forum entries and verify its
|
||||
|
@ -107,9 +108,9 @@ class ForumTest extends WebTestBase {
|
|||
*/
|
||||
function testForum() {
|
||||
//Check that the basic forum install creates a default forum topic
|
||||
$this->drupalGet("/forum");
|
||||
$this->drupalGet('/forum');
|
||||
// Look for the "General discussion" default forum
|
||||
$this->assertText(t("General discussion"), "Found the default forum at the /forum listing");
|
||||
$this->assertRaw(t('<a href="'. Url::fromRoute('forum.page', ['taxonomy_term' => 1]) .'">General discussion</a>'), "Found the default forum at the /forum listing");
|
||||
|
||||
// Do the admin tests.
|
||||
$this->doAdminTests($this->admin_user);
|
||||
|
|
Loading…
Reference in New Issue