This project is read-only.

Thread Redirect

Topics: Writing modules
Sep 4, 2011 at 9:00 PM

Hey All... Okay so I have this usecase and im not sure on which way to go!!... So here goes..

A User creates a Thread called 'Where Is Mars?' on a Forum called 'Discussions' .. The slug is currently Discussions/Where-Is-Mars

An admin moves said thread to a different Forum called 'Questions' .. The slug is now Questions/Where-Is-Mars

My question to the community is...

What Happens if I go and request Discussions/Where-Is-Mars ?
 - Should I return a HttpNotFound() ?
 - Should this redirect to the moved slug?

If I do do the redirect.. should I leave this to another module? Has anyone does this that has released this to the community yet?

If there is a redirect, what happens if a use then goes and creates new Thread called 'Where Is Mars?' on a Forum called 'Discussions' <- what then should happen?

Cheers, Nick

Sep 5, 2011 at 6:12 AM

With the future Alias feature, it would be pretty easy to handle I think, but seeing we don't have that yet, I would still handle that outside of the forum module. This could be handled with a permanent redirect module. The behavior could be decided by the admin. Once there is a redirect from where-is-mars, it should be impossible to create a new thread with that name, as long as the redirect exists.