FOSwiki Related Notes

Fresh Installation of FOSwiki

  • With 'configure', once it's up go to 'find more extensions' and download/install the mod_perl thing.
  • FOSwiki doesn't seem to like suexec very much, vs TWiki. I had to take out suexec and just run everything as the Apache user.

Doing Social Bookmarks

View this topic in raw in order to see the relevant markup here. I ended up learning the ENCODE macro and piecing together URLs. The TOPICURL variable is SUPPOSED to be the URL to the current topic, but for some reason in FOSwiki 1.0.9 it kept just being the URL to the main page in the wiki. This wasn't what I really wanted when I was trying to publish external links to social bookmarking sites, so I felt the need to roll my own. I am using the new "PAGELINK" variable now, but of course I would be open to changing back to TOPICURL later on if it starts behaving as I understand it's supposed to later on. At any rate, because of its reliance on TOPICURL, the SocialBookmarking plugin wasn't very useful. So, I used the HTML it generated as a basis and disregarded the actual plugin output. I also learned to use the ENCODE macro, plus the environment variables, to provide a URL-encoded version of the TOPICTITLE variable and to munge up my own URL respectively. It isn't exactly standard, but TOPICTITLE is a variable that I enforce the presence of via a cron job on my own wiki. It's a "friendly" page title - i.e. it includes spaces and things like that. I feel my wiki-fu has levelled several times over the course of figuring this out, although I am probably doing some things I should never do in the process. [code]

Tests to Perform when Upgrading

  • If the site is erroring, probably you wiped out the foswiki part and didn't reinstall the mod_perl extension so that it can talk to mod_perl.
  • Hit - ensure that it correctly directs to the appropriate web (Gunwiki, not Main)!
    • If it points to Main, then
  • Edit the SitePreferences topic to ensure that FAVICON resolves to /favicon.ico
  • Ensure that administrative powers are set via the TWikiAdminGroup topic.
  • Look on the left, make sure there's a valid left nav bar with a functional registration link. Incidentally, FOSWiki seems to like having a "WebLeftBarExample" topic to use as a fallback if there's no custom WebLeftBar.
  • Look at the window title - is it something obnoxious like RefReloading < Gunwiki < Foswiki? If so, you want to edit templates/foswiki.tmpl to change it to something less lame, such as %WEB %: %TOPICTITLE %. Once FOSwiki supports a reasonable means of doing named topics, I'll stop hacking up its template display.
  • Are the breadcrumbs obnoxiously advertising foswiki? Edit templates/view.pattern.tmpl to remove the 'breadcrumb:wikitoolname' bit, and chop the 'seperator' entry off of 'currentweb'.

Login/Registration troubleshooting

Ensure that lib/LocalSite.cfg's $Foswiki::cfg{Htpasswd}{FileName} entry is set appropriately, to point at the .htpasswd file.

Ensure that FOSwiki likes the format of your .htpasswd file!!! This took weeks for me to figure out, but the old file looked like:
TWiki either wanted or didn't care about the email addresses in the file. FOSwiki, on the other hand, gets stuck in this nasty failure mode any time you try to edit with that info in there. I presume it's using everything between the second colon and the end of line (including the email address) as a password hash. It seemed to work well after I fed the htpasswd file through "perl -e 'while() { s/^(.*):.*/$1/; print $_; }' <.htpasswd >.htpasswd_new"

Things to insert into lib/LocalSite.cfg

$Foswiki::cfg{ScriptUrlPaths}{view} = '';

Things to insert into Main/SitePreferences.txt

Upgrading from TWiki

Finding Things to Adjust

  • Edit WebLeftBar.txt - the registration links have changed, and such. It's probably best to just use the new foswiki nav bar anyway.
  • Search for anything in your web that uses a %TWIKI % variable, particularly custom left side nav bars, etc.
  • Grep for any mention of TWiki.TWikiRegistration and replace it with System.UserRegistration
  • Do a find . | grep -i twiki
    • I found that my twiki dev migration script was locking me out of administration when I used it to move into twiki. It turns out that the TWikiAdminGroup.txt file should have been called AdminGroup.txt from now on.

Migrating my Comment System

I added "
Leave a comment" to templates/body.nat.tmpl - this took care of adding a comment link without boosting the file size being transferred.

Next, I created LeaveComment. I'm not going to paste it here because you can pull it from the URL and hit 'raw' to view it.

Then, I wrote postcomment.cgi, which I will attach here eventually.

Lastly, I wrote a "landing page" for the comment plugin.


  • It is unfortunately necessary to do an all new LocalSite.cfg file.
  • Missing plugins that I actually use:
    • BBcode
    • CaptchaPlugin (ESSENTIAL unless there's something else that does this)
  • Missing plugins I'm not sure if I use:

-- SeanNewton - 30 Aug 2009

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2010-02-23 - SeanNewton
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback