Defect #11683

404 on redirect after creating new issue.

Added by John Worthington almost 10 years ago. Updated over 9 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution:Cant reproduce Affected version:2.0.3


Database: mysql Ver 14.14 Distrib 5.1.61, for debian-linux-gnu (x86_64) using readline 6.1
Ruby: 1.8.7 (x86_64-linux)
Rails: 3.2.6
Redmine: 2.0.3.stable

I believe I have found a bug related to issues #5436.

I have a project who's identifier is "wiki" and I am getting a 404 error after a redirect to the show action for any newly created issue. The new Issue is saved to the db just fine and a simple page refresh returns the correct show action.

After I found issue #5436 I created another project and did not encounter the same error when creating new issues for the differently named project.

Full backtrace from my log file.
Started POST "/projects/wiki/issues" for at Wed Aug 22 14:54:08 -0700 2012
Processing by IssuesController#create as HTML
Parameters: {"commit"=>"Create", "project_id"=>"wiki", "authenticity_token"=>" << Token >>", "utf8"=>"✓", "issue"=>{"start_date"=>"2012-08-22", "estimated_hours"=>"", "priority_id"=>"4", "parent_issue_id"=>"", "is_private"=>"0", "subject"=>" << Subject >>", "assigned_to_id"=>"", "done_ratio"=>"0", "tracker_id"=>"2", "due_date"=>"", "description"=>" << Description >> ", "status_id"=>"1"}, "attachments"=>{"1"=>{"description"=>""}}}
Rendered mailer/_issue.text.erb (4.2ms)
Rendered mailer/issue_add.text.erb within layouts/mailer (21.4ms)
Rendered mailer/_issue.html.erb (17.6ms)
Rendered mailer/issue_add.html.erb within layouts/mailer (22.5ms)
Redirected to
Completed 302 Found in 1797ms (ActiveRecord: 966.2ms)

Started GET "/internal_error.html" for at Wed Aug 22 14:54:10 -0700 2012

ActionController::RoutingError (No route matches [GET] "/internal_error.html"):
actionpack (3.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.6) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.6) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.6) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/static.rb:62:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
railties (3.2.6) lib/rails/engine.rb:479:in `call'
railties (3.2.6) lib/rails/application.rb:220:in `call'
railties (3.2.6) lib/rails/railtie/configurable.rb:30:in `send'
railties (3.2.6) lib/rails/railtie/configurable.rb:30:in `method_missing'
/dh/passenger/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
/dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
/dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
/dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:205:in `start_request_handler'
/dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:170:in `send'
/dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:170:in `handle_spawn_application'
/dh/passenger/lib/phusion_passenger/utils.rb:479:in `safe_fork'
/dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:165:in `handle_spawn_application'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:180:in `start'
/dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:128:in `start'
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rack_application'
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rack_application'
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'


#1 Updated by Etienne Massip almost 10 years ago

  • Resolution set to Cant reproduce

Can't reproduce on trunk ; I don't get the GET "/internal_error.html" which leads to the 404, where does it come from?

#2 Updated by John Worthington almost 10 years ago

Etienne Massip wrote:

Can't reproduce on trunk ; I don't get the GET "/internal_error.html" which leads to the 404, where does it come from?

It seems to come after the failed redirect to issues controller /show/:id.

As I use redmine more I have found that the new issue "create and continue" works correctly. Where adding a comment to a issue produced the same redirect error. I get a 404 while the url is correct and a simple page reload returns the correct page.

Btw: I am using Safari 6.0 (8536.25) on Mac OS 10.8. Just tested Firefox 14.0.1 to make sure it was not isolated to Safari.

Thank you for your time.

#3 Updated by Etienne Massip almost 10 years ago

Did you try with alternate browsers?

What requests can you see in Chrome or FF debug console?

#4 Updated by John Worthington over 9 years ago

So some intesting results from my browser tests.

Mac OS X:
Safari : 404
Firefox: 404
Chrome: Works!

Windows 7:
IE: 404
Firefox: 404
Chrome: Refuses password. (No idea what is up with this. Same version as Mac, same copied password that worked in IE & FF)

If you could give me some instructions I will gladly test the redirects in FF's debug console.

#5 Updated by Etienne Massip over 9 years ago

John Worthington wrote:

If you could give me some instructions I will gladly test the redirects in FF's debug console.

You can either use FireBug extension or use the Web Developper console (in recent version, use CTRL+SHIFT+K) with network logging enabled.

#6 Updated by John Worthington over 9 years ago

Sorry for not getting back sooner.

Here are the requests.
[19:50:09.189] POST [HTTP/1.1 302 Found 2079ms]
[19:50:11.280] GET [HTTP/1.1 404 Not Found 67ms]

Then hit refresh. No other action.
[19:57:11.816] GET [HTTP/1.1 200 OK 3300ms]
[19:57:15.194] GET [HTTP/1.1 200 OK 110ms]
[19:57:15.196] GET [HTTP/1.1 200 OK 677ms]
[19:57:15.198] GET [HTTP/1.1 200 OK 580ms]
[19:57:15.201] GET [HTTP/1.1 200 OK 540ms]
[19:57:15.212] GET [HTTP/1.1 200 OK 600ms]
[19:57:15.214] GET [HTTP/1.1 200 OK 502ms]
[19:57:15.216] GET [HTTP/1.1 200 OK 150ms]
[19:57:15.219] GET [HTTP/1.1 200 OK 192ms]
[19:57:15.222] GET [HTTP/1.1 200 OK 238ms]
[19:57:15.224] GET [HTTP/1.1 200 OK 275ms]
[19:57:15.226] GET [HTTP/1.1 200 OK 321ms]
[19:57:15.229] GET [HTTP/1.1 200 OK 440ms]
[19:57:15.231] GET [HTTP/1.1 200 OK 480ms]
[19:57:15.233] GET [HTTP/1.1 200 OK 531ms]
[19:57:15.235] GET [HTTP/1.1 200 OK 542ms]
[19:57:15.239] GET [HTTP/1.1 200 OK 570ms]
[19:57:15.242] GET [HTTP/1.1 200 OK 581ms]
[19:57:15.245] GET [HTTP/1.1 200 OK 581ms]
[19:57:15.261] GET [HTTP/1.1 200 OK 611ms]
[19:57:15.265] GET [HTTP/1.1 200 OK 617ms]
[19:57:15.267] GET [HTTP/1.1 200 OK 621ms]
[19:57:15.269] GET [HTTP/1.1 200 OK 621ms]
[19:57:15.302] Unknown property '-moz-border-radius'. Declaration dropped.
[19:57:15.751] Unknown property 'user-select'. Declaration dropped.
[19:57:15.960] GET [HTTP/1.1 200 OK 36ms]
[19:57:15.964] GET [HTTP/1.1 200 OK 40ms]
[19:57:15.995] GET [HTTP/1.1 200 OK 39ms]
[19:57:15.999] GET [HTTP/1.1 200 OK 40ms]
[19:57:16.001] GET [HTTP/1.1 200 OK 39ms]
[19:57:16.004] GET [HTTP/1.1 200 OK 40ms]
[19:57:16.166] GET [HTTP/1.1 200 OK 39ms]

For completeness sake here is the inspected network request of failing 404 GET request.

Request URL:
Request Method: GET
Status Code: HTTP/1.1 404 Not Found

Request Headers 19:50:11.277
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:15.0) Gecko/20100101 Firefox/15.0.1
DNT: 1
Connection: keep-alive
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Response Headers
X-Runtime: 0.011383
X-Request-Id: 2b7fa6e3ba5cb9d955d5056ab8249897
X-Rack-Cache: miss
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.2
Vary: Accept-Encoding
Status: 404
Server: Apache
Date: Wed, 12 Sep 2012 02:50:11 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 371
Content-Encoding: gzip
Connection: close
Cache-Control: private

Also available in: Atom PDF