Defect #23449

NoMethodError (undefined method `where' for

Added by Rainer Rutka about 3 years ago. Updated about 3 years ago.

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

0%

Category:Search engine
Target version:-
Resolution:Invalid Affected version:3.2.0

Description

When i try to search for a string in RM 3.2 I get an error:

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.

If you are the Redmine administrator, check your log files for details about the error.

--
This is an excerpt from the log:

redmine@projects:/srv/redmine/ror/log$ cat sea*
Processing by SearchController#index as HTML
  Parameters: {"utf8"=>"✓", "q"=>"Rainer"}
  Current user: rainer.rutka (id=678)
Completed 500 Internal Server Error in 661ms (ActiveRecord: 467.5ms)

NoMethodError (undefined method `where' for #<Hash:0x007f3e16f5d740>):
  lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:93: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'
redmine@projects:/srv/redmine/ror/log$

My configs:

Environment:
  Redmine version        3.2.0.stable.15148
  Ruby version                   2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
  Rails version                  4.2.5
  Environment                    production
  Database adapter               PostgreSQL
SCM:
  Subversion                     1.8.10
  Mercurial                      3.1.2
  Cvs                            1.12.13
  Git                            2.1.4
  Filesystem                     
Redmine plugins:
  redmine_agile                  1.4.1
  redmine_code_review            0.7.0
  redmine_knowledgebase          3.2.0
  redmine_meetings               0.2.7
  redmine_mylyn_connector        2.8.2.stable
  redmine_tweaks                 0.5.8-dev
  redmine_watcher_groups         0.0.3git
  scrum                          0.14.0

THANK YOU ! :-)

search-error.log (6.91 KB) Rainer Rutka, 2016-07-28 11:31

History

#1 Updated by Toshi MARUYAMA about 3 years ago

  • Status changed from New to Needs feedback

Try disable plugins.

#2 Updated by Rainer Rutka about 3 years ago

Toshi MARUYAMA wrote:

Try disable plugins.

OK, I'll try. But removing plugins is not desirable at our university, because all the installed plugins are demandable and heavy in use :-(!

#3 Updated by Go MAEDA about 3 years ago

  • Priority changed from High to Normal

I think it would be better to identify the plugin which causes the problem and contact the author of the plugin.

#4 Updated by Rainer Rutka about 3 years ago

HI!
OK, I disabled all plugins and the above error disappeared. Until now,
I was not able to figure out which plugin caused the error in the search
function. :-(

#5 Updated by Rainer Rutka about 3 years ago

Rainer Rutka wrote:
HI!
OK, I disabled all plugins and the above error disappeared. Until now,
I was not able to figure out which plugin caused the error in the search
function. :-(
Is there a chance to see which plugin is the "bad" one?

#6 Updated by Rainer Rutka about 3 years ago

Go MAEDA wrote:

I think it would be better to identify the plugin which causes the problem and contact the author of the plugin.

YES !!!

#7 Updated by Rainer Rutka about 3 years ago

Rainer Rutka wrote:

Go MAEDA wrote:

I think it would be better to identify the plugin which causes the problem and contact the author of the plugin.

YES !!! But how can I indentify the 'bad' plugin.
All my plugins are in use here and it's not recommended to delete one.

#8 Updated by Rainer Rutka about 3 years ago

Rainer Rutka wrote:

Rainer Rutka wrote:

Go MAEDA wrote:

I think it would be better to identify the plugin which causes the problem and contact the author of the plugin.

YES !!! But how can I indentify the 'bad' plugin?
All my plugins are in use here and it's not recommended to delete one.

#9 Updated by Rainer Rutka about 3 years ago

H!
Now I deleted each plugin and tested the "Search:" functionality.
Unortunately without any succuess.

The bug vanishes only when I delete ALL plugins (e.g. rename
the plugins-folder to plugins.bak)
.

Enclosed you'll find the error-log (so far...).

#10 Updated by Jake Kemme about 3 years ago

These plugins both act as searchable. Try removing these (remove the folder from plugins/) one at a time and restarting redmine.
redmine_knowledgebase
redmine_meetings

#11 Updated by Rainer Rutka about 3 years ago

One interesting thing: If I search for a ticket-number (AN EXISTING ONE) the
search function is working. If I search for a string or a non existing
ticket number it crashes.
:-(

I'll test disabling the knowledgebase and meetings plugin but: Both are
elementary for us.
.-)

#12 Updated by Go MAEDA about 3 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Invalid

Rainer Rutka wrote:

OK, I disabled all plugins and the above error disappeared.

It is clear that the issue is caused by some plugin and not a defect of Redmine. I am closing this issue.

Please use forums for further help.

Also available in: Atom PDF