Actions
Defect #4801
closedActiveRecord::StatementInvalid when searching wikis
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Search engine
Target version:
-
Start date:
2010-02-11
Due date:
% Done:
0%
Estimated time:
Resolution:
Cant reproduce
Affected version:
Description
If you try to search wiki pages, the following error is logged and Redmine shows a 500 error:
Processing SearchController#index (for xx.xxx.xxx.xxx at 2010-02-11 12:46:10) [GET] Parameters: {"scope"=>"", "all_words"=>"1", "submit"=>"OK", "wiki_pages"=>"1", "action"=>"index", "documents"=>"1", "id"=>"xxxxxxxxxx", "changesets"=>"1", "q"=>"ActionController::InvalidAuthenticityToken", "issues"=>"1", "controller"=>"search"} ActiveRecord::StatementInvalid (Mysql::Error: Unknown column 'text' in 'where clause': SELECT DISTINCT `wiki_pages`.id FROM `wiki_pages` LEFT OUTER JOIN `wikis` ON `wikis`.id = `wiki_pages`.wiki_id LEFT OUTER JOIN `projects` ON `projects`.id = `wikis`.project_id WHERE ((projects.status=1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='wiki') AND wikis.project_id IN (4)) AND (((LOWER(title) LIKE '%actioncontroller::invalidauthenticitytoken%') OR (LOWER(text) LIKE '%actioncontroller::invalidauthenticitytoken%')))) ORDER BY wiki_pages.created_on DESC LIMIT 11): app/controllers/search_controller.rb:79:in `index' app/controllers/search_controller.rb:78:in `each' app/controllers/search_controller.rb:78:in `index' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/rack/request_handler.rb:91:in `process_request' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_request_handler.rb:206:in `main_loop' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:376:in `start_request_handler' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:334:in `handle_spawn_application' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/utils.rb:182:in `safe_fork' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:351:in `__send__' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:351:in `main_loop' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:195:in `start_synchronously' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:162:in `start' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:261:in `spawn_rails_application' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:254:in `spawn_rails_application' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:153:in `spawn_application' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:286:in `handle_spawn_application' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:351:in `__send__' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:351:in `main_loop' /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:195:in `start_synchronously' /usr/lib/phusion_passenger/passenger-spawn-server:61
It seems (according to schema.rb) that the "text" column is actually in the "wiki_contents" table and not in "wiki_pages".
Actions