Not able to create a permalink with forums/* address


(Dmitry Demenchuk) #1

I’m trying to create a Permalink with forums/general-discussion url pointing to a Category.

Then I try to access it - it gives me an error:

AbstractController::ActionNotFound at /forums/general-discussion
The action 'show' could not be found for ForumsController

The problem is with routers:

Discourse::Application.routes.draw do
  ...
  resources :forums
  ...
end

it processes all /forums/* requests.

I made a pull request here Remove useless routing for ForumsController by mrded · Pull Request #4517 · discourse/discourse · GitHub


(Rafael dos Santos Silva) #2

A permalink shouldn’t accept the “/” character because that’s invalid for a location, because its a delimiter.

One permalink as “general-discussion” should work.

Are you in a subfolder install?


(Dmitry Demenchuk) #3

Thank you for your answer,

I’m using Permalink as redirects from the forum we are migrating from.

And we have to redirect from http://example.com/forums/general-discussion into http://example.com/c/uncategorized

Currently I’m on local development install http://localhost:3000/.


(Dmitry Demenchuk) #4

The issue has been solved, but still, can you explain why a permalink shouldn’t accept the “/” character?
Am I using it not on purpose? Thanks.


(Rafael dos Santos Silva) #5

Actually a permalink with a/b/c works, and one with c/xyz also works. Gotta do some digging on this later.


Remapping old imported forum permalinks to posts and topics?
(Dmitry Demenchuk) #6

Do not worry about it, it’s solved already Remove useless routing for ForumsController by mrded · Pull Request #4517 · discourse/discourse · GitHub

Thanks.


(Rafael dos Santos Silva) #7