Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks Redmine Search and Gives ArgumentsError with 3.0.1 #57

Open
soncu opened this issue Nov 6, 2015 · 10 comments
Open

Breaks Redmine Search and Gives ArgumentsError with 3.0.1 #57

soncu opened this issue Nov 6, 2015 · 10 comments

Comments

@soncu
Copy link

soncu commented Nov 6, 2015

Related production.log is:

Started GET "/search?utf8=%E2%9C%93&q=6500" for  at 2015-11-06 10:04:49 +0300
Processing by SearchController#index as HTML
  Parameters: {"utf8"=>"✓", "q"=>"6500"}
  Current user:  (id=80)
Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.7ms)

ArgumentError (wrong number of arguments (1 for 0)):
  lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:194:in `call'
  lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:194:in `search_scope'
  lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:92:in `search_result_ranks_and_ids'
  lib/redmine/search.rb:127:in `block in load_result_ids'
  lib/redmine/search.rb:125:in `each'
  lib/redmine/search.rb:125:in `load_result_ids'
  lib/redmine/search.rb:115:in `block in load_result_ids_from_cache'
  lib/redmine/search.rb:114:in `load_result_ids_from_cache'
  lib/redmine/search.rb:99:in `result_ids'
  lib/redmine/search.rb:70:in `result_count'
  app/controllers/search_controller.rb:65:in `index'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'


Started GET "/issues.json?assigned_to_id=80&limit=50" for  at 2015-11-06 10:04:49 +0300
Processing by IssuesController#index as JSON
  Parameters: {"assigned_to_id"=>"80", "limit"=>"50"}
  Current user:  (id=80)
  Rendered issues/index.api.rsb (140.1ms)
Completed 200 OK in 222ms (Views: 136.9ms | ActiveRecord: 11.9ms)
@johnjaylward
Copy link

I'm seeing this as well.

@johnjaylward
Copy link

To work around this issue, I just commented out the first code block in https://github.com/Undev/redmine_tagging/blob/master/init.rb#L3 from lines 3-29

This only appears to disable tag search using the unified search.

@soncu
Copy link
Author

soncu commented Nov 13, 2015

Anyone in the contributors confirms this?

@herste
Copy link

herste commented Dec 1, 2015

Did anyone find a feasable solution for this?

@barbiedrummer
Copy link

Have the same issue:

/opt/redmine/plugins/redmine_tagging/init.rb:18:in block (2 levels) in <top (required)>' /opt/redmine/lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:194:incall'
/opt/redmine/lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:194:in search_scope' /opt/redmine/lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:92:insearch_result_ranks_and_ids'
/opt/redmine/lib/redmine/search.rb:127:in block in load_result_ids' /opt/redmine/lib/redmine/search.rb:125:ineach'
/opt/redmine/lib/redmine/search.rb:125:in load_result_ids' /opt/redmine/lib/redmine/search.rb:115:inblock in load_result_ids_from_cache'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/cache.rb:299:in block in fetch' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/cache.rb:585:inblock in save_block_result_to_cache'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/cache.rb:547:in block in instrument' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications.rb:166:ininstrument'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/cache.rb:547:in instrument' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/cache.rb:584:insave_block_result_to_cache'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/cache.rb:299:in fetch' /opt/redmine/lib/redmine/search.rb:114:inload_result_ids_from_cache'
/opt/redmine/lib/redmine/search.rb:99:in result_ids' /opt/redmine/lib/redmine/search.rb:70:inresult_count'
/opt/redmine/app/controllers/search_controller.rb:65:in index' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/implicit_render.rb:4:insend_action'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/abstract_controller/base.rb:198:in process_action' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/rendering.rb:10:inprocess_action'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/abstract_controller/callbacks.rb:20:in block in process_action' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:115:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:115:in call' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:553:inblock (2 levels) in compile'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in call' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:496:in block (2 levels) in around' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:311:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:311:in block (2 levels) in halting' /opt/redmine/lib/redmine/sudo_mode.rb:63:insudo_mode'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:430:in block in make_lambda' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:310:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:310:in block in halting' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:495:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:495:in block in around' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in call' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:inrun_callbacks'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/abstract_controller/callbacks.rb:19:in process_action' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/rescue.rb:29:inprocess_action'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/instrumentation.rb:32:in block in process_action' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications.rb:164:inblock in instrument'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in instrument' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications.rb:164:ininstrument'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/instrumentation.rb:30:in process_action' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/params_wrapper.rb:250:inprocess_action'
/usr/local/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/railties/controller_runtime.rb:18:in process_action' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/abstract_controller/base.rb:137:inprocess'
/usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.3/lib/action_view/rendering.rb:30:in process' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal.rb:196:indispatch'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/rack_delegation.rb:13:in dispatch' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal.rb:237:inblock in action'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:76:in call' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:76:indispatch'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:45:in serve' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:43:inblock in serve'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:30:in each' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:30:inserve'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:821:in call' /usr/local/lib/ruby/gems/2.2.0/gems/rack-openid-1.4.2/lib/rack/openid.rb:98:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/request_store-1.0.5/lib/request_store/middleware.rb:9:in call' /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/etag.rb:24:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:25:in call' /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/head.rb:13:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-xml_parser-1.0.2/lib/action_dispatch/xml_params_parser.rb:16:in call' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/params_parser.rb:27:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/flash.rb:260:in call' /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:incontext'
/usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in call' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/cookies.rb:560:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/query_cache.rb:36:in call' /usr/local/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/callbacks.rb:29:in block in call' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:84:inrun_callbacks'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/callbacks.rb:27:in call' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/remote_ip.rb:78:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:17:in call' /usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/show_exceptions.rb:30:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/rack/logger.rb:38:in call_app' /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/rack/logger.rb:20:inblock in call'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:68:in block in tagged' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:26:intagged'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:68:in tagged' /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/rack/logger.rb:20:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/request_id.rb:21:in call' /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in call' /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/static.rb:116:in call' /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:518:in call' /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/application.rb:165:incall'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/railtie.rb:194:in public_send' /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/railtie.rb:194:inmethod_missing'
/usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.14/lib/phusion_passenger/rack/thread_handler_extension.rb:94:in process_request' /usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.14/lib/phusion_passenger/request_handler/thread_handler.rb:149:inaccept_and_process_next_request'
/usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.14/lib/phusion_passenger/request_handler/thread_handler.rb:110:in main_loop' /usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.14/lib/phusion_passenger/request_handler.rb:415:inblock (3 levels) in start_threads'
/usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.14/lib/phusion_passenger/utils.rb:111:in `block in create_thread_and_abort_on_exception'

Environment:
Redmine version 3.1.0.stable
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.6.11
Git 2.7.1
Filesystem
Redmine plugins:
a_common_libs 2.1.0
ajax_counters 1.3.0
redmine_checklists 3.1.3
redmine_issue_templates 0.1.0
redmine_knowledgebase 3.1.0
redmine_tagging 0.1.3
scrum 0.13.1
sidebar_hide 0.0.7
usability 2.1.2

@barbiedrummer
Copy link

If I do that

To work around this issue, I just commented out the first code block in >https://github.com/Undev/redmine_tagging/blob/master/init.rb#L3 from lines 3-29
This only appears to disable tag search using the unified search.

Page with issues become broken

@sio4
Copy link

sio4 commented Feb 29, 2016

I just commented out the block for wiki search. So now, wiki searching by clicking on tag is working as normal search. just work around but it is good than 503. :-(

I hope it will come back soon!

patch is below:

--- a/init.rb
+++ b/init.rb
@@ -19,6 +19,7 @@ ActionDispatch::Callbacks.to_prepare do
   end

   unless WikiPage.searchable_options[:include] && WikiPage.searchable_options[:
+    '''
     WikiPage.searchable_options[:columns] << "#{WikiPageTag.table_name}.tag"

     # For redmine < 3
@@ -27,6 +28,7 @@ ActionDispatch::Callbacks.to_prepare do

     # For redmine > 3
     WikiPage.searchable_options[:scope] = -> { WikiPage.includes(:wiki_page_tag
+    '''
   end
 end

@arpad9
Copy link

arpad9 commented Mar 22, 2016

+1
Redmine 3.2.0

@shoelzle
Copy link

Same problem with Redmine 3.2.1:

Environment:
Redmine version 3.2.1.stable
Ruby version 2.1.3-p242 (2014-09-19) [x86_64-linux-gnu]
Rails version 4.2.5.2
Environment development
Database adapter Mysql2

Redmine plugins:
redmine_custom_css 0.1.6
redmine_tagging 0.1.3

@shoelzle
Copy link

Does anyone know a Redmine version for which this issue is not present ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants