Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
[Vanilla Core 2.0.17.x] [Bug 582] [Quick-Fix]Post Deletion Redirects Incorrectly
@Tim @Todd @digibomb When an admin deletes a post they are re-directed to to http://hostname.com/vanilla/discussions . The problem comes in that I have vanilla installed to /forums not /vanilla, so it redirects incorrectly. Is this a hard-coded value and if so, shouldn't it be relegated to a database or a variable that's set upon install?
I'm running 2.0.17.3 on CentOS with all the system requirements met.
I'm running 2.0.17.3 on CentOS with all the system requirements met.
Tagged:
0
Comments
go to applications/vanilla/controllers/class.discussioncontroller.php
Modify lines 537, 542 and 588 where it says '/vanilla/discussions' to match whatever you have for your sites base install. In my case I have installed in a folder named 'forums' underneath my main url (eg. http://yourhostname.com/forums/) so I replaced vanilla with forums and it works now.
"I bet you installed the forum and then renamed the folder. There is a "webroot" configuration setting in conf/config.php. Look for this:
$Configuration['Garden']['WebRoot'] = 'vanilla';
and replace it with this:
$Configuration['Garden']['WebRoot'] = 'forums';
"
I installed it to the same directory that I had it in originally so it wasn't this. However, it is worth noting it, fwiw.
There was an error rendering this rich post.
I'll check the other settings to make sure.
edit
IMHO It depends on from where you delete the discussion. You can delete the discussion
- when you see all the discussion in a category (url = categories/general)
- when you're inside the discussion (url = discussion/7/test3#Item_1)
When you're inside the discussion you get redirected to the hardcoded value (so we need @ArrantSquid solution)When you're viewing all discussions and you have your homepage set to "All Discussions" or "All Categories", you'll get redirected to categories/categories/general
If you have set your homepage to "Categories And Discussions" you will get redirected properly
Same goes for when you've set your homepage to "Activity"
I've updated the bug report https://github.com/vanillaforums/Garden/issues/#issue/582
There was an error rendering this rich post.
@Mark @Tim
Two more threads with the same problem:
http://www.vanillaforums.org/discussion/14645/bug-582-redirected-to-wrong-location-when-discussion-deleted/p1
and
http://www.vanillaforums.org/discussion/14758/redirect-to-domain.comsubdirdiscussions-when-deleting-a-post-on-domain.com/p1
although now a 500 internal error was also reported in 1 of the threads, it's all about the same issue : bug 582
There was an error rendering this rich post.
http://www.vanilla-wiki.info/Bugs/SmallBugs
i still had a small bug where at deleting a discussion i would be sent to
http://vanillaforum.mysite.com//categories/all
(i have vanilla on a sub domain)
so i changed
$DefaultTarget = Gdn_Url::WebRoot(TRUE).'/'.$DefaultController['Destination'];
to
$DefaultTarget = Gdn_Url::WebRoot(TRUE).'index.php?p=/'.$DefaultController['Destination'];
hope this helps someone