Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Forum Module /

Discuss the Forum Module.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Forum Admin Features not working.


Go to End


10 Posts   2586 Views

Avatar
w1nk5

Community Member, 25 Posts

12 August 2010 at 3:26pm

Edited: 12/08/2010 3:32pm

By outputting the key value pairs within the Director::urlParams() array I was able to discover the topic id was actually paired with the OtherID key rather than ID.

So by changing the following line:

$id = Convert::raw2sql(Director::urlParam('ID'));

to:

$id = Convert::raw2sql(Director::urlParam('OtherID'));

it fixed the issue.

However, after submitting the Forum Admin Features form. It redirects the user to the following url:

http://drugeducationalliance.ca/drug-addiction-discussion/

When it should be redirecting to the following url:

http://drugeducationalliance.ca/discussion-forums/drug-addiction-discussion/

Causing an 404 error which I was able to fix by changing the following line:

return Director::redirect($this->URLSegment.'/');

to:

return Director::redirect('discussion-forums/'.$this->URLSegment.'/');

Although everything is working fine now. This may not be the most flexible solution. So I am still open to other suggestions.

Cheers

Avatar
Willr

Forum Moderator, 5523 Posts

12 August 2010 at 8:43pm

I think the issue around here is due to nested URLs and the handling of the parameters. Director::urlParams is now deprecated. I thought I had removed all references to it (and replaced with $this->urlParams (which is 2.4 safe). Perhaps download the most recent version of 0.3 and try that

http://open.silverstripe.com/changeset/latest/modules/forum/branches/0.3?old_path=/&filename=/forum/&format=zip

Go to Top