Fork me on GitHub

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support for Vanilla Forums Cloud product

In this Discussion

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Current releases are 2.1.4 (30 Oct 2014) and 2.0.18.13 (5 Aug 2014)

Ready for 2.1? Find out if your plugins are compatible. 2.0 will no longer be updated 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.