Bug #2387
Err with Redmine 3.04 (Mention/User Profile Page and Custom WIKI Makro)
100%
Description
Hi,
Always, even on fresh brand new redmine installation like this:
Environment: Redmine version 3.0.4.stable.14426 Ruby version 2.2.0-p0 (2014-12-25) [x86_64-linux] Rails version 4.2.3 Environment production Database adapter Mysql2 SCM: Subversion 1.8.8 Git 1.9.1 Filesystem Redmine plugins: wiking 1.0.0bI got errors by accessing the profile page and the admin/Custom wiki macro page:
- profile page:
Started GET "/users/admin" for 5.56.234.99 at 2015-07-15 14:15:54 +0200 Processing by UsersController#show as HTML Parameters: {"id"=>"admin"} Current user: admin (id=1) Rendered plugins/wiking/app/views/wiking/_mentions.html.erb (127.2ms) Rendered users/show.html.erb within layouts/base (211.2ms) Completed 500 Internal Server Error in 359ms (ActiveRecord: 39.5ms) ActiveRecord::RecordNotFound (Couldn't find all Mentions with 'id': (all, {:conditions=>{:mentioned_id=>1}, :order=>"created_on DESC"}) (found 0 results, but was looking for 2)): lib/redmine/hook.rb:119:in `block (2 levels) in render_on' lib/redmine/hook.rb:117:in `map' lib/redmine/hook.rb:117:in `block in render_on' lib/redmine/hook.rb:61:in `block (2 levels) in call_hook' lib/redmine/hook.rb:61:in `each' lib/redmine/hook.rb:61:in `block in call_hook' lib/redmine/hook.rb:58:in `tap' lib/redmine/hook.rb:58:in `call_hook' lib/redmine/hook.rb:167:in `call_hook' app/views/users/show.html.erb:72:in `_app_views_users_show_html_erb__3394832658688072906_23368100' app/controllers/users_controller.rb:75:in `block (2 levels) in show' app/controllers/users_controller.rb:71:in `show'
- custom wiki macro:
Started GET "/admin" for 5.56.234.99 at 2015-07-15 14:15:58 +0200 Processing by AdminController#index as HTML Current user: admin (id=1) Rendered admin/_menu.html.erb (22.8ms) Rendered admin/index.html.erb within layouts/admin (30.4ms) Rendered layouts/base.html.erb (42.4ms) Completed 200 OK in 113ms (Views: 86.1ms | ActiveRecord: 3.2ms) Started GET "/macros" for 5.56.234.99 at 2015-07-15 14:16:01 +0200 Processing by MacrosController#index as HTML Current user: admin (id=1) Completed 500 Internal Server Error in 16ms (ActiveRecord: 1.4ms) ArgumentError (wrong number of arguments (1 for 0)): activerecord (4.2.3) lib/active_record/scoping/named.rb:24:in `all' plugins/wiking/app/controllers/macros_controller.rb:9:in `index' actionpack (4.2.3) lib/action_controller/metal/implicit_render.rb:4:in `send_action' actionpack (4.2.3) lib/abstract_controller/base.rb:198:in `process_action' actionpack (4.2.3) lib/action_controller/metal/rendering.rb:10:in `process_action' actionpack (4.2.3) lib/abstract_controller/callbacks.rb:20:in `block in process_action' activesupport (4.2.3) lib/active_support/callbacks.rb:115:in `call' activesupport (4.2.3) lib/active_support/callbacks.rb:115:in `call' activesupport (4.2.3) lib/active_support/callbacks.rb:553:in `block (2 levels) in compile' activesupport (4.2.3) lib/active_support/callbacks.rb:503:in `call' activesupport (4.2.3) lib/active_support/callbacks.rb:503:in `call' activesupport (4.2.3) lib/active_support/callbacks.rb:88:in `run_callbacks' actionpack (4.2.3) lib/abstract_controller/callbacks.rb:19:in `process_action' actionpack (4.2.3) lib/action_controller/metal/rescue.rb:29:in `process_action' actionpack (4.2.3) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' activesupport (4.2.3) lib/active_support/notifications.rb:164:in `block in instrument' activesupport (4.2.3) lib/active_support/notifications/instrumenter.rb:20:in `instrument' activesupport (4.2.3) lib/active_support/notifications.rb:164:in `instrument' actionpack (4.2.3) lib/action_controller/metal/instrumentation.rb:30:in `process_action' actionpack (4.2.3) lib/action_controller/metal/params_wrapper.rb:250:in `process_action' activerecord (4.2.3) lib/active_record/railties/controller_runtime.rb:18:in `process_action' actionpack (4.2.3) lib/abstract_controller/base.rb:137:in `process' actionview (4.2.3) lib/action_view/rendering.rb:30:in `process' actionpack (4.2.3) lib/action_controller/metal.rb:196:in `dispatch' actionpack (4.2.3) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch' actionpack (4.2.3) lib/action_controller/metal.rb:237:in `block in action' actionpack (4.2.3) lib/action_dispatch/routing/route_set.rb:76:in `call' actionpack (4.2.3) lib/action_dispatch/routing/route_set.rb:76:in `dispatch' actionpack (4.2.3) lib/action_dispatch/routing/route_set.rb:45:in `serve' actionpack (4.2.3) lib/action_dispatch/journey/router.rb:43:in `block in serve' actionpack (4.2.3) lib/action_dispatch/journey/router.rb:30:in `each' actionpack (4.2.3) lib/action_dispatch/journey/router.rb:30:in `serve' actionpack (4.2.3) lib/action_dispatch/routing/route_set.rb:821:in `call' rack-openid (1.4.2) lib/rack/openid.rb:98:in `call' request_store (1.0.5) lib/request_store/middleware.rb:9:in `call' rack (1.6.4) lib/rack/etag.rb:24:in `call' rack (1.6.4) lib/rack/conditionalget.rb:25:in `call' rack (1.6.4) lib/rack/head.rb:13:in `call' actionpack-xml_parser (1.0.2) lib/action_dispatch/xml_params_parser.rb:16:in `call' actionpack (4.2.3) lib/action_dispatch/middleware/params_parser.rb:27:in `call' actionpack (4.2.3) lib/action_dispatch/middleware/flash.rb:260:in `call' rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context' rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call' actionpack (4.2.3) lib/action_dispatch/middleware/cookies.rb:560:in `call' activerecord (4.2.3) lib/active_record/query_cache.rb:36:in `call' activerecord (4.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call' actionpack (4.2.3) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' activesupport (4.2.3) lib/active_support/callbacks.rb:84:in `run_callbacks' actionpack (4.2.3) lib/action_dispatch/middleware/callbacks.rb:27:in `call' actionpack (4.2.3) lib/action_dispatch/middleware/remote_ip.rb:78:in `call' actionpack (4.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' actionpack (4.2.3) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' railties (4.2.3) lib/rails/rack/logger.rb:38:in `call_app' railties (4.2.3) lib/rails/rack/logger.rb:20:in `block in call' activesupport (4.2.3) lib/active_support/tagged_logging.rb:68:in `block in tagged' activesupport (4.2.3) lib/active_support/tagged_logging.rb:26:in `tagged' activesupport (4.2.3) lib/active_support/tagged_logging.rb:68:in `tagged' railties (4.2.3) lib/rails/rack/logger.rb:20:in `call' actionpack (4.2.3) lib/action_dispatch/middleware/request_id.rb:21:in `call' rack (1.6.4) lib/rack/methodoverride.rb:22:in `call' rack (1.6.4) lib/rack/runtime.rb:18:in `call' activesupport (4.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' actionpack (4.2.3) lib/action_dispatch/middleware/static.rb:116:in `call' rack (1.6.4) lib/rack/sendfile.rb:113:in `call' railties (4.2.3) lib/rails/engine.rb:518:in `call' railties (4.2.3) lib/rails/application.rb:165:in `call' railties (4.2.3) lib/rails/railtie.rb:194:in `public_send' railties (4.2.3) lib/rails/railtie.rb:194:in `method_missing' passenger (5.0.7) lib/phusion_passenger/rack/thread_handler_extension.rb:89:in `process_request' passenger (5.0.7) lib/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request' passenger (5.0.7) lib/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop' passenger (5.0.7) lib/phusion_passenger/request_handler.rb:414:in `block (3 levels) in start_threads' passenger (5.0.7) lib/phusion_passenger/utils.rb:111:in `block in create_thread_and_abort_on_exception'
Any ideas on that? (I applied the 3.0.1 patch, mention in #2367)
Thanks.
Marc.
Related issues
Associated revisions
History
#1 Updated by Marc M over 9 years ago
Still with Redmine 3.1
Redmine version 3.1.0.stable.14485 Ruby version 1.9.3-p0 (2011-10-30) [x86_64-linux] Rails version 4.2.3
#2 Updated by Kefah Issa about 9 years ago
- File wiking.patch View added
I managed to fix that problem in the code. the patch is provided.
The issue has to do with the old-style of Rails querying.
#3 Updated by minkbear minkbear almost 9 years ago
Kefah Issa wrote:
I managed to fix that problem in the code. the patch is provided.
The issue has to do with the old-style of Rails querying.
I have tested your patch with Redmine 3.1.1. The profile page works fine now. But custom wiki macro page still has the problem.
#4 Updated by minkbear minkbear almost 9 years ago
I have just fix custom wiki macro page by changing
wiking/app/controllers/macros_controller.rb line number 9 from
@macros = WikiMacro.all(:order => :name)
to
@macros = WikiMacro.all.order(name: :asc)
#5 Updated by Andriy Lesyuk over 8 years ago
- Status changed from New to Open
- Target version set to 1.1.0
#6 Updated by Andriy Lesyuk about 8 years ago
- Related to Bug #2412: Links to issue notes do now work added
#7 Updated by Andriy Lesyuk about 7 years ago
- Due date set to 06 Sep 2016
- Status changed from Open to Closed
- % Done changed from 0 to 100
This was fixed in r79.