Not able to create a permalink with forums/* address


(Dmitry Demenchuk) #1

I鈥檓 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鈥檛 accept the 鈥/鈥 character because that鈥檚 invalid for a location, because its a delimiter.

One permalink as 鈥済eneral-discussion鈥 should work.

Are you in a subfolder install?


(Dmitry Demenchuk) #3

Thank you for your answer,

I鈥檓 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鈥檓 on local development install http://localhost:3000/.


(Dmitry Demenchuk) #4

The issue has been solved, but still, can you explain why a permalink shouldn鈥檛 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鈥檚 solved already Remove useless routing for ForumsController by mrded 路 Pull Request #4517 路 discourse/discourse 路 GitHub

Thanks.


(Rafael dos Santos Silva) #7