dradis/dradisframework — Issue #51: Wiki import FullTextSearch15 fails to import one result
Author: juanvazquez
Created: 2011-11-18 11:08:05+00:00
State: open

The importing of notes from Wikipedia fails when using FullTextSearch15 and mediawiki 1.17.0 and the search query returns just one record in the Wiki.

From my analysis (it could be bad) the error is due to WikiImport::Filters::FullTextSearch15::run calling to WikiImport::Filters::FullTextSearch15::get_content with a Hash (just the record) and not an Array (of records) when there is just one result.

The backtrace is:

"/home/juan/projects/documentation_pentest/dradis/dradis-2.8/server/vendor/plugins/wiki_import/lib/wiki_import/filters.rb:70:in `[]'"
"/home/juan/projects/documentation_pentest/dradis/dradis-2.8/server/vendor/plugins/wiki_import/lib/wiki_import/filters.rb:70:in `get_content'"
"/home/juan/projects/documentation_pentest/dradis/dradis-2.8/server/vendor/plugins/wiki_import/lib/wiki_import/filters.rb:65:in `each'"
"/home/juan/projects/documentation_pentest/dradis/dradis-2.8/server/vendor/plugins/wiki_import/lib/wiki_import/filters.rb:65:in `get_content'"
"/home/juan/projects/documentation_pentest/dradis/dradis-2.8/server/vendor/plugins/wiki_import/lib/wiki_import/filters.rb:107:in `run'"
"/home/juan/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:543:in `start'"
"/home/juan/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:440:in `start'"
"/home/juan/projects/documentation_pentest/dradis/dradis-2.8/server/vendor/plugins/wiki_import/lib/wiki_import/filters.rb:102:in `run'"
"/home/juan/projects/documentation_pentest/dradis/dradis-2.8/server/./vendor/plugins/wiki_import/lib/tasks/thorfile.rb:24:in `search15'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor/runner.rb:34:in `method_missing'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor/task.rb:108:in `run'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/gems/thor-0.14.6/bin/thor:6"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/bin/thor:19:in `load'"
"/home/juan/.rvm/gems/ruby-1.8.7-p352@dradis/bin/thor:19"
Wiki Search
===========
1 results
Error fetching records
can't convert String into Integer

This error can be cause by a configuration issue (i.e. dradis not finding the MediaWiki instance). Please review the configuration settings located at: