Fork me on GitHub
Current releases are 2.1.3 (9 Sept 2014) and 2.0.18.13 (5 Aug 2014)

Ready for 2.1? Find out if your favorite plugins are compatible. The 2.0 branch will no longer receive updates after Dec 2014.

Cancel link on Discussion pages

edited November 2010 in Vanilla 2.0 Help
Not too sure if this is a bug or not, but if I start a new discussion or edit a discussion, the cancel link brings me back to a random page that doesn't exist. The culprit is this code in /post/discussion.php:

$CancelUrl = '/vanilla/discussions';
if (C('Vanilla.Categories.Use') && $this->CategoryID > 0 && $this->CategoryData->NumRows() > 0) {
foreach ($this->CategoryData->Result() as $Cat) {
if ($Cat->CategoryID == $this->CategoryID) {
$CancelUrl = '/vanilla/discussions/0/'.$Cat->CategoryID.'/'.Gdn_Format::Url($Cat->Name);
break;
}
}
}
I am not too sure how to modify it so that it either returns you to the proper category and/or the proper discussion.
Tagged:

Comments

Sign In or Register to comment.