not found route matching before plugins get a chance? #893

Closed
mfrederickson opened this Issue Feb 28, 2014 · 2 comments

2 participants

@mfrederickson
Concerto Digital Signage member

With this in routes.rb

  unless Rails.application.config.consider_all_requests_local
    match '*not_found', :to => 'errors#error_404'
  end

You get 404's when trying to add a player. But with this commented out, it works fine. Is this precluding the engines from getting a change to have their routes evaluated?

And what is the impact of having "consider_all_requests_local" turned on? Certainly you wouldn't want that in production...?

@mfrederickson mfrederickson added this to the 0.9.0 KiloBalrog milestone Feb 28, 2014
@mikldt mikldt self-assigned this Feb 28, 2014
@mikldt
Concerto Digital Signage member

If my dev environment is any indication, this is a production-only problem.

@mfrederickson, that's exactly right - consider_all_requests_local is ancient rails holdover that basically determines who will get detailed stack traces on errors instead of the public-facing application error handling. If you look in config/environments, you'll see it's disabled when you boot in production mode - which is probably why this problem went undetected until now.

Unfortunately, removing these lines as it stands breaks some 404 handling. There are better ways to handle the 404s though. I should have a commit soon.

@mikldt mikldt added a commit that referenced this issue Feb 28, 2014
@mikldt mikldt Fix plugin routing - temporary workaround for #893
This allow plugins to be routable in production mode, rather than
getting 404s. It is not a permanent solution, however, because 404
and 500 handling is poor.
0367ea6
@mikldt
Concerto Digital Signage member

Since everything seems to be in working order, I'm closing this out. Anyone can reopen if this continues to happen, but unless there is a major regression I think plugin routing should be A-OK.

Further error handling improvements will be tracked in #897.

@mikldt mikldt closed this Mar 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment