Changing/deleting a category gives routing error


(Carlo Kok) #1

When I try to change the permissions for a category I get:

ActionController::RoutingError (No route matches [PUT] "/c/27"):
  config/initializers/quiet_logger.rb:10:in `call_with_quiet_assets'
  config/initializers/silence_logger.rb:26:in `call'

If I delete it:

ActionController::RoutingError (No route matches [DELETE] "/c/elememts"):
  config/initializers/quiet_logger.rb:10:in `call_with_quiet_assets'
  config/initializers/silence_logger.rb:26:in `call'

This happened after a few updates ago (probably 1.1) and still happens on HEAD (As of 12/2/2014).


(Kane York) #2

@eviltrout that second call looks dangerous, it might delete the wrong subcategory


(Carlo Kok) #3

How does this even work, shouldn’t there be a delete/put entry for “c/” in discourse/routes.rb at master · discourse/discourse · GitHub ?


(Carlo Kok) #4

Well this was curious. I added some rules in apache to redir /category/* to /c/ (because there were a lot of broken links when this got changed) and it seems delete/update still uses that. Fixed the rules to only apply to GET now, so false alarm.


(Jeff Atwood) #5