Commit 50864570 authored by catch's avatar catch
Browse files

Issue #2102763 by tim.plunkett: Fixed Add new Forum Topic broken on subpage.

parent 42ea242a
......@@ -171,8 +171,7 @@ function forum_menu_local_tasks(&$data, $route_name) {
if ($forum_term && $forum_term->bundle() == $vid) {
// We are viewing a forum term (specific forum), append the tid to the
// url.
$links[$type]['#link']['href'] .= '/' . $forum_term->id();
$links[$type]['#link']['localized_options']['query']['forum_id'] = $forum_term->id();
}
}
}
......
......@@ -52,7 +52,10 @@ function testForumIndexStatus() {
);
// Create the forum topic, preselecting the forum ID via a URL parameter.
$this->drupalPostForm('node/add/forum', $edit, t('Save and publish'), array('query' => array('forum_id' => $tid)));
$this->drupalGet("forum/$tid");
$this->clickLink(t('Add new @node_type', array('@node_type' => 'Forum topic')));
$this->assertUrl('node/add/forum', array('query' => array('forum_id' => $tid)));
$this->drupalPostForm(NULL, $edit, t('Save and publish'));
// Check that the node exists in the database.
$node = $this->drupalGetNodeByTitle($title);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment