Knowledgebase Plugin

Added by Alex Bevilacqua over 10 years ago

Please don't report issues here; use https://github.com/alexbevi/redmine_knowledgebase

Where I work, there has been a need for a knowledgebase solution that was (a) robust, (b) integrated with our project management solution, and (c) ... free.

Since we use Redmine internally, it made sense to build this functionality on top of the existing platform. Most of what you can accomplish through a knowledgebase, you can accomplish through a wiki, but our users were looking for a hierarchical system that would track page views, rankings and be fully searchable.

The system I've written isn't really there yet, but it's a work in progress I'd like to present to the community on the off chance that someone else finds it useful.

There's still quite a bit to do, but open source development is more fun when done in the open :)

ss01.png (30.1 KB)

ss02.png (66.8 KB)

ss03.png (22.7 KB)

Replies (123)

RE: Knowledgebase Plugin - Added by raink xie almost 9 years ago

hi,all~

i find change "kb articles" word in search label.
:)

add

label_kb_article_plural: KnowLedgeBase

to config/locales/en.yml and you can modify your locales,example de fr it zh.....

RE: Knowledgebase Plugin - Added by Mario Luzeiro almost 9 years ago

In last redmine trunk version, this plugin gives me an error: http://www.redmine.org/issues/9778

RE: Knowledgebase Plugin - Added by Benjamin Eichel over 8 years ago

hi@all,

is there any way to make some articles only accessible to some users? For example an article that can only be accessed by a role called "admins". I think it would be an good idea to add an check box which declares that this is an article written only for admins and a new permission that decides if an user is allowed to view this kind of articles or not. I already managed to create this check box and it's working but how can i create this new permission?

Regards,
Benjah

RE: Knowledgebase Plugin - Added by Jan Niggemann (redmine.org team member) over 8 years ago

For testing purposes, I updated project_id in the kb_articles table. My user has admin rights which means I may access the project ( I used id 1 btw), but the search fails with http error 500 :-(
Any ideas?

Processing SearchController#index (for 10.11.1.1 at 2012-06-05 18:35:09) [GET]
  Parameters: {"scope"=>"all", "messages"=>"1", "all_words"=>"1", "submit"=>"OK", "wiki_pages"=>"1", "action"=>"index", "documents"=>"1", "projects"=>"1", "id"=>"erp", "changesets"=>"1", "q"=>"Suchmich", "issues"=>"1", "titles_only"=>"", "kb_articles"=>"1", "controller"=>"search", "news"=>"1"}
Rendering template within layouts/base
Rendering search/index

ActionView::TemplateError (No route matches {:controller=>"articles", :action=>"show", :article_id=>4, :id=>nil}) on line #32 of app/views/search/index.html.erb:
29:     <h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3>
30:     <dl id="search-results">
31:       <% @results.each do |e| %>
32:         <dt class="<%= e.event_type %>"><%= content_tag('span', h(e.project), :class => 'project') unless @project == e.project %> <%= link_to highlight_tokens(truncate(h(e.event_title), :length => 255), @tokens), e.event_url %></dt>
33:         <dd><span class="description"><%= highlight_tokens(h(e.event_description), @tokens) %></span>
34:         <span class="author"><%= format_time(e.event_datetime) %></span></dd>
35:       <% end %>

    app/views/search/index.html.erb:32
    app/views/search/index.html.erb:31:in `each'
    app/views/search/index.html.erb:31
    /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /opt/redmine/public/500.html (500 Internal Server Error)

RE: Knowledgebase Plugin - Added by Christian Reich over 8 years ago

hi,

the following line contains the relevant info:

ActionView::TemplateError (No route matches {:controller=>"articles", :action=>"show", :article_id=>4, :id=>nil}) on line #32 of app/views/search/index.html.erb:

you should add a route to your routes.rb like:
match '/articles/show', :to => 'articles#show', :via => [:get, :post]

the :get, :post is only an example, you should modify it to your needs, but for now it will work i think ;)

RE: Knowledgebase Plugin - Added by Jan Niggemann (redmine.org team member) over 8 years ago

Hi Christian,
thank you for the suggestion but this doesn't work:
Erorrmessage: "undefined method `match' for main:Object"

All other entries in that file begin with map.xxx...
Any idea?

RE: Knowledgebase Plugin - Added by Jan Niggemann (redmine.org team member) over 8 years ago

I tried re-adding the default route, but that doesn't work either...
map.connect ':controller/:action/:id'

Edit: Didn't know that redmine had to be restarted.
I now have map.connect ':controller/:action/:id' as the first linke in /redmine/vendor/plugins/redmine_knowledgebase/config/routes.rb and that does the trick...

Edit 2: This breaks lots of other things, wiki and issues for example:

Processing ProjectsController#ratiosechsdreissig (for 10.11.1.1 at 2012-06-06 13:57:07) [GET]
Parameters: {"action"=>"myproject", "id"=>"issues", "controller"=>"projects"}
Rendering template within layouts/base
Rendering common/error (404)
Filter chain halted as [:find_project] rendered_or_redirected.

RE: Knowledgebase Plugin - Added by Christian Reich over 8 years ago

what redmine version do you use?

RE: Knowledgebase Plugin - Added by Jan Niggemann (redmine.org team member) over 8 years ago

I'm on 1.4.1...
and just updated to 1.4.3

RE: Knowledgebase Plugin - Added by Christian Reich over 8 years ago

hi JN
found this post during my researches... maybe it can help you out ;)

http://www.redmine.org/boards/2/topics/6143

RE: Knowledgebase Plugin - Added by Jan Niggemann (redmine.org team member) over 8 years ago

I think I figured it out...
I put this line into my redmine_knowledgebase/config/routes.rb:

map.connect "/knowledgebase/articles/:article_id",  :controller => "articles", :action => "show", :conditions => { :method => [:get, :post] }

I verified that I had set the project_id column of kb_articles to default to 1 (our "master-project"), and not the search is working like it's supposed to :-)

RE: Knowledgebase Plugin - Added by Alex Bevilacqua over 8 years ago

Howdy all.

I keep forgetting about this board, but I've updated the plugin for 1.4.x and 2.0.x compatibility.

https://github.com/alexbevi/redmine_knowledgebase

If there are any issues (which i'm sure there will be for the 2.x branch), please report them on the github page as i tend to check that far more often.

RE: Knowledgebase Plugin - Added by Alex Mam almost 8 years ago

Hi all i'm on 1.2.1, after install Knowledgebase version 1.0.0
and make "rake db:migrate_plugins RAILS_ENV=production" I'm trying access to knowledgebase in my redmine,
but get error on web page http://myhostserevr/knowledgebase

" 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.

Back"

can you help me with this?

RE: Knowledgebase Plugin - Added by Mario Luzeiro almost 8 years ago

Check if you have permissions.
And check the LOG... LOG will be your last hope..
MRL

RE: Knowledgebase Plugin - Added by Mikhail Velkin almost 8 years ago

What about global search for tags and keywords at my knowledgebase articles? I have redmine 2.1.2 with knowledgebase plugin 2.2.0 but i cant find no article with article's keywords and tags. What i need to do to enable or activate or fix a global search at knowledgebase's articles?

By the way i've see that i can't download my articles as a PDF or RTF. Can anybody advise me any plugins for use it with this knowledgebase plugin?

RE: Knowledgebase Plugin - Added by jie zheng almost 8 years ago

My redmine server version is Redmine 1.2.1.stable (MySQL).
When i install Knowledgebase 1.0.0 (2012-06-28) to my server, and when i edit a article, i encounter the problem

ActionView::TemplateError (undefined method `labelled_form_for' for #<ActionView::Base:0x61460b8>) on line #5 of vendor/plugins/redmine_knowledgebase/app/views/articles/edit.html.erb:
2:
3: <h2><%= l(:title_edit_article) ></h2>
4:
5: <
labelled_form_for :article, @article,
6: :url => { :action => "update" },
7: :html => { :multipart => true, :id => "articles-form" } do |form| %>
8:

vendor/plugins/redmine_knowledgebase/app/views/articles/edit.html.erb:5
config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering C:/Program Files/BitNami Redmine Stack/apps/redmine/public/500.html (500 Error)
rendering section "request"
rendering section "session"
rendering section "environment"

what can i do? Please help me. Thanks.

RE: Knowledgebase Plugin - Added by Alex Bevilacqua almost 8 years ago

Version 1.x isn't really supported anymore, but you could try changing labelled_form_for to labelled_tabular_form_for

If that works, let me know ;)
jie zheng wrote:

My redmine server version is Redmine 1.2.1.stable (MySQL).
When i install Knowledgebase 1.0.0 (2012-06-28) to my server, and when i edit a article, i encounter the problem

ActionView::TemplateError (undefined method `labelled_form_for' for #<ActionView::Base:0x61460b8>) on line #5 of vendor/plugins/redmine_knowledgebase/app/views/articles/edit.html.erb:
2:
3: <h2><%= l(:title_edit_article) ></h2>
4:
5: <
labelled_form_for :article, @article,
6: :url => { :action => "update" },
7: :html => { :multipart => true, :id => "articles-form" } do |form| %>
8:

vendor/plugins/redmine_knowledgebase/app/views/articles/edit.html.erb:5
config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering C:/Program Files/BitNami Redmine Stack/apps/redmine/public/500.html (500 Error)
rendering section "request"
rendering section "session"
rendering section "environment"

what can i do? Please help me. Thanks.

RE: Knowledgebase Plugin - Added by jie zheng almost 8 years ago

thanks, i have tried and it works. Because my company Redmine server version is 1.2, so i only could use the 1.X version of this plugin, i hope it works normal.
-----------------------------------------------
Alex Bevilacqua wrote:

Version 1.x isn't really supported anymore, but you could try changing labelled_form_for to labelled_tabular_form_for

If that works, let me know ;)
jie zheng wrote:

My redmine server version is Redmine 1.2.1.stable (MySQL).
When i install Knowledgebase 1.0.0 (2012-06-28) to my server, and when i edit a article, i encounter the problem

ActionView::TemplateError (undefined method `labelled_form_for' for #<ActionView::Base:0x61460b8>) on line #5 of vendor/plugins/redmine_knowledgebase/app/views/articles/edit.html.erb:
2:
3: <h2><%= l(:title_edit_article) ></h2>
4:
5: <
labelled_form_for :article, @article,
6: :url => { :action => "update" },
7: :html => { :multipart => true, :id => "articles-form" } do |form| %>
8:

vendor/plugins/redmine_knowledgebase/app/views/articles/edit.html.erb:5
config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering C:/Program Files/BitNami Redmine Stack/apps/redmine/public/500.html (500 Error)
rendering section "request"
rendering section "session"
rendering section "environment"

what can i do? Please help me. Thanks.

RE: Knowledgebase Plugin - Added by Pavel Potcheptsov almost 8 years ago

Is there a way to make permission to only view (for example preview pdf in browser) for selected user/roles and deny to download.

RE: Knowledgebase Plugin - Added by jie zheng over 7 years ago

Does the "acts_as_viewed" function have some problem? Why the the viewing table only records the log of creating an article, the view action can not be recorded? So it results that any article in the knowledgebase shows like "Viewed once" although it has been viewed many times?

RE: Knowledgebase Plugin - Added by jie zheng over 7 years ago

And could you please tell me how to change the plugin code if i use the proxy server to access the redmine, because i found the IP address in table "viewings" are all 127.0.0.1. I think i resulted by proxy server, i need the plugin to record the real client IP address even i use the proxy server to access
please see attachment about my problem.

RE: Knowledgebase Plugin - Added by jie zheng over 7 years ago

why the function rated_by didn't be used in the plugin? in current source, there is only the definition, but not used by other functions.

def rated_by? rater
rating_class = acts_as_rated_options[:rating_class].constantize
if !(acts_as_rated_options[:rater_class].constantize === rater)
raise RateError, "The rater object must be the one used when defining acts_as_rated (or a descendent of it). other objects are not acceptable"
end
raise RateError, "Rater must be a valid and existing object" if rater.nil? || rater.id.nil?
raise RateError, 'Rater must be a valid rater' if !rating_class.column_names.include? "rater_id"
ratings.count(:conditions => ['rater_id = ?', rater.id]) > 0
end

It results one guys could rate a article more than one time.

RE: Knowledgebase Plugin - Added by ionut moraru about 7 years ago

Hello all!

I'm very new to Redmine and I tried to do some adjustmens in order to include for Knowledgebase Plugin some search functionalities. However, I did't succeed.

Could you please tell me how can a search into Knowledgebase?

Thank you.

1 ... 3 4 5 (101-123/123)