Patch #3274

Wiki Page Categories

Added by Sven Schwyn almost 14 years ago. Updated over 12 years ago.

Status:NewStart date:2009-04-30
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


This patch is a preliminary implementation of wiki page categories (think: Wikipedia) for Redmine.

The patch is against Redmine 0.8.3. Watch it in action here:

Please note that I haven't written nor adapted any tests/fixtures yet. If you choose to adopt this patch, I'll catch up on this.

wiki_page_categories.patch Magnifier (8.69 KB) Sven Schwyn, 2009-04-30 13:21

wiki_page_categories_20090520.patch Magnifier - Patch for the pull request on Github on 2009-05-20 (39.4 KB) Sven Schwyn, 2009-05-20 09:11

wiki-categories-3274.patch Magnifier - Rebased and squashed Sven's patch against r3017 (43.1 KB) Eric Davis, 2009-11-08 02:39


#1 Updated by Sven Schwyn over 13 years ago

I've just seen that patches are supposed to be against the trunk. No problem, I can do that, but I'd love to hear beforehand if the patch stands a chance to be merged at all. Thanks!

#2 Updated by Eric Davis over 13 years ago

I love the feature idea but we will need to have the patch apply to trunk and also to have some tests (especially for ApplicationHelper). Would you mind updating the patch?

Also the screencast was great. It really made it easy to see what functionality was included.

#3 Updated by Sven Schwyn over 13 years ago

  • % Done changed from 80 to 100

I've applied the patch (with routes adapted) against the mirror on Github and added "Index by category" and "Pages without category" to the featureset. Furthermore, I've written a bunch of tests as well.

Shall I create a patch against the current master or do a pull request on Github?

#4 Updated by Sven Schwyn over 13 years ago

Here are the changes against upstream master as of today.

#5 Updated by Eric Davis over 13 years ago

  • Assignee set to Eric Davis
  • % Done changed from 100 to 0

Sven has asked me to take a look at this patch. Assigning to myself as a reminder.

#6 Updated by Sven Schwyn over 13 years ago

I'm trying to clean up my contributions to a few projects before I loose the overview. This patch is several months now, do you see a chance to apply it any time soon? Or is there anything I can do to make this more likely to happen such as rebasing on Github or creating a new patch against the current trunk?

#7 Updated by Sven Schwyn over 13 years ago

I've forked anew on Github and added the wiki page categories feature again. (Rebasing caused a funky issue I couldn't resolve.)

Please DON'T use the above patch, it has a bug which is fixed in this new commit on Github:

#8 Updated by Eric Davis about 13 years ago

I did a quick review of the patch (included) and the feature looks good. A concern I have is storing the categories as a delimited string on a wiki page. It makes querying for the categories harder (e.g. SQL LIKE) and requires the code to do a bunch of string processing to split and join them each time they are used. What if we use a full database model to store the Wiki categories and associte them with the wiki pages themselves?

#9 Updated by Jean-Philippe Lang about 13 years ago

  • Status changed from 7 to New

I find very odd the way to assign a category to a page.
A proper Tag model should be used and extended to tickets, forums...
See #480, #2897

#10 Updated by Jean-Philippe Lang about 13 years ago

Instead, we'd better review the existing Tagging plugins for Rails app to choose one.

#11 Updated by Sven Schwyn about 13 years ago

Fair point, Jean-Philippe. I'm used to Mediawiki, so I took the approach from there which may or may not be a fit for Redmine. (However, I would have preferred to get opinions before doing the extra work, after all, it was easy to see from the screencast. Don't particularly like to code into the wastebin.)

Never mind, is there a particular tagging plugin you have in mind?

#12 Updated by Sven Schwyn about 13 years ago

I've only used tagging once so far (with the acts-as-taggable-on plugin). From a UI point of view, would it be better to edit the tags on the "edit wiki page" view or directly in the sidebar?

By the way, I guess the reason why Mediawiki sets the page category (or tag) in the content itself is to include the page category (or tag) in the history.

#13 Updated by Sven Schwyn about 13 years ago

I'll do an alternative implementation based on tagging. The tags will be displayed in the show view sidebar and can be edited in the edit view. (A future enhancement could be AJAX editing directly in the sidebar.)

I favour acts_as_taggable_on (as it's the only one I have used so far). Any other suggestions for the tagging plugin?

#14 Updated by Eric Davis over 12 years ago

  • Assignee deleted (Eric Davis)

Also available in: Atom PDF