Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. work_package view raises ActionController::RoutingError in 4.0.1

work_package view raises ActionController::RoutingError in 4.0.1

Added by Jangho Seo over 10 years ago

Hello.

I recently upgraded from OpenProject 3.0.14 to OpenProject 4.0.1.

Unfortunately https://example.com/projects/management/work_packages gives me “Unable to retrieve query from URL” message (“management” is the project identifier)
and log file says:

Started GET "/api/experimental/projects/management/work_packages?page=1&per_page=10" for 147.x.x.x at 2014-11-15 10:12:48 +0900
Processing by Api::Experimental::WorkPackagesController#index as JSON 
  Parameters: {"page"=>"1", "per_page"=>"10", "project_id"=>"management"}
Completed 404 Not Found in 56.7ms

ActionController::RoutingError (No route matches {:action=>"update", :controller=>"api/experimental/queries", :layout=>nil, :id=>#<Query id: nil, project_id: 3, name: "_", filters: [#<Queries::WorkPackages::Filter:0x007f4b8cf35118 @field=:status_id, @operator="o", @values=[""], @validation_context=nil, @errors=#<ActiveModel::Errors:0x007f4b8ca92868 @base=#<Queries::WorkPackages::Filter:0x007f4b8cf35118 ...>, @messages={}>>], user_id: 0, column_names: nil, sort_criteria: [], group_by: nil, is_public: true, display_sums: nil>}):
  app/controllers/api/experimental/concerns/query_loading.rb:85:in `block in allowed_links_on_query'
  app/controllers/api/experimental/concerns/query_loading.rb:75:in `tap'
  app/controllers/api/experimental/concerns/query_loading.rb:75:in `allowed_links_on_query'
  app/controllers/api/experimental/work_packages_controller.rb:178:in `query_as_json'
  app/controllers/api/experimental/work_packages_controller.rb:153:in `set_work_packages_meta_data'
  app/controllers/api/experimental/work_packages_controller.rb:139:in `current_work_packages'
  app/controllers/api/experimental/work_packages_controller.rb:52:in `index'

I am using nginx and passenger to deploy my OpenProject service, through manual installation driven by ruby-2.1.4.

Thanks.


Replies (5)

RE: work_package view raises ActionController::RoutingError in 4.0.1 - Added by Paul Menzel over 10 years ago

Hi, I experience the same problem when using the branch release/4.0, containing release v4.0.4, or dev with Ruby 2.1.4 and the Passenger Apache module.

Started GET "/api/experimental/projects/test/work_packages?page=1&per_page=10" for 37.120.60.217 at 2014-12-24 07:32:04 +0000
Processing by Api::Experimental::WorkPackagesController#index as JSON
  Parameters: {"page"=>"1", "per_page"=>"10", "project_id"=>"test"}
Completed 404 Not Found in 32.8ms

ActionController::RoutingError (No route matches {:action=>"update", :controller=>"api/experimental/queries", :layout=>nil, :id=>#<Query id: nil, project_id: 77, name: "_", filters: [#<Queries::WorkPackages::Filter:0x00000004c32658 @field=:status_id, @operator="o", @values=[""], @validation_context=nil, @errors=#<ActiveModel::Errors:0x00000004bdc078 @base=#<Queries::WorkPackages::Filter:0x00000004c32658 ...>, @messages={}>>], user_id: 0, column_names: nil, sort_criteria: [], group_by: nil, is_public: true, display_sums: nil>}):
  app/controllers/api/experimental/concerns/query_loading.rb:106:in `block in allowed_links_on_query'
  app/controllers/api/experimental/concerns/query_loading.rb:96:in `tap'
  app/controllers/api/experimental/concerns/query_loading.rb:96:in `allowed_links_on_query'
  app/controllers/api/experimental/work_packages_controller.rb:165:in `query_as_json'
  app/controllers/api/experimental/work_packages_controller.rb:140:in `set_work_packages_meta_data'
  app/controllers/api/experimental/work_packages_controller.rb:112:in `current_work_packages'
  app/controllers/api/experimental/work_packages_controller.rb:52:in `index'

Were you able to solve this?

RE: work_package view raises ActionController::RoutingError in 4.0.1 - Added by Jangho Seo over 10 years ago

Unfortunately, no.
I had to purge the old one and reinstall OpenProject, and migrate the necessary data manually :(
I believe this problem is due to the broken database schema, but I don’t have any accurate solution.

Sorry for not being much help :(

RE: work_package view raises ActionController::RoutingError in 4.0.1 - Added by Jangho Seo over 10 years ago

And I think #17928 means something :)

RE: work_package view raises ActionController::RoutingError in 4.0.1 - Added by Alex Farcas almost 10 years ago

Having the exact same issue with v4.1.3. Going slightly insane here since try as i may, ruby is not my language and debugging this is incredibly frustrating. Close to giving up after 2 days of wasted time. With a clean install everything works perfectly. As soon as i try to migrate from older data, the error shows up.

Why would it not find action “update” inside the queries_controller.rb. I see it, it’s there. What database value can possibly affect routing? I changed the hostname in the settings table to the correct value.

Started GET "/api/experimental/work_packages?page=1&per_page=10" for 192.168.66.1 at 2015-07-06 17:36:12 +0000
Processing by Api::Experimental::WorkPackagesController#index as JSON
  Parameters: {"page"=>"1", "per_page"=>"10"}
Completed 404 Not Found in 29.9ms

ActionController::RoutingError (No route matches {:action=>"update", :controller=>"api/experimental/queries", :layout=>nil, :id=>#<Query id: nil, project_id: nil, name: "_", filters: [#<Queries::WorkPackages::Filter:0x0000000b0cdec8 @field=:status_id, @operator="o", @values=[""], @validation_context=nil, @errors=#<ActiveModel::Errors:0x0000000b0913d8 @base=#<Queries::WorkPackages::Filter:0x0000000b0cdec8 ...>, @messages={}>>], user_id: 0, column_names: nil, sort_criteria: [], group_by: nil, category: nil, sort_by_parent_first: false, is_public: true, display_sums: nil>}):
  app/controllers/api/experimental/concerns/query_loading.rb:105:in `block in allowed_links_on_query'
  app/controllers/api/experimental/concerns/query_loading.rb:95:in `tap'
  app/controllers/api/experimental/concerns/query_loading.rb:95:in `allowed_links_on_query'
  app/controllers/api/experimental/work_packages_controller.rb:174:in `query_as_json'
  app/controllers/api/experimental/work_packages_controller.rb:149:in `set_work_packages_meta_data'
  app/controllers/api/experimental/work_packages_controller.rb:110:in `current_work_packages'
  app/controllers/api/experimental/work_packages_controller.rb:51:in `index'
  app/middleware/params_parser_with_exclusion.rb:40:in `call'

RE: work_package view raises ActionController::RoutingError in 4.0.1 - Added by Alex Farcas almost 10 years ago

Noob’s fix for the above problem:

Just comment out the code inside the Api::Experimental::Concerns::QueryLoading::allowed_links_on_query method. Let it return an empty {}. You’re not really losing anything since saved queries are not working anyway.

  • (1 - 5/5)
Loading...