This is an old revision of the document!


Badgrads Wiki Administration

This Wiki was set up in 2006 by Marshall Perrin, with input and suggestions from Jason Wright and Conor Laver. Its maintenance is the job of the current Student Webmaster.

Use the talk page for discussing wiki-administration-related ideas. Hello tmptmptest.

Hardware

Everything is currently on serpens.berkeley.edu, AKA badgrads.berkeley.edu. It lives in the back corner of 644 (James Graham's lab) without a monitor or keyboard attached. It serves various miscellaneous functions for James' group and so hopefully will be maintained by Central for the most part. Insofar as the University is concerned, is the computer itself belongs to James Graham's group.

Software

The webserver files are in /usr/local/apache2 and the DokuWiki files are in /celt/htdocs. (The latter directory is available over NFS and so can be seen from any Astro cluster computer.) The DokuWiki installation has the “Monobook” plugin/template/style/whatever installed which gives it a MediaWiki-like appearance and style. For more info on Monobook, see here.

Component Current Installed Version Location
Apache HTTPD 2.2.0 serpens:/usr/local/apache2
PHP 4.4.2 serpens:/usr/local/apache2/modules/libphp4.so
DokuWiki 2009-02-14 /celt/htdocs
Display Wiki Page 02152007 /celt/htdocs/lib/plugins/displaywikipage
MonoBook 2008-07-30 /celt/htdocs/lib/tpl/monobook
ActionLink Plugin 2006-05-26 /celt/htdocs/lib/plugins/actionlink
PageMove Plugin 0.9.15a - 07/22/2007 /celt/htdocs/lib/plugins/pagemove
Google Calendar Plugin 2007-05-1 /celt/htdocs/lib/plugins/google_cal
Definition List Plugin 2008-08-13 /celt/htdocs/lib/plugins/definitionlist
Sortable Tables Plugin 2.2a (2009-01-27) /celt/htdocs/lib/plugins/sortablejs
JSMath Plugin 2009-03-31 /celt/htdocs/lib/plugins/jsmath
jsMath 3.6b /celt/htdocs/jsMath
jsMath Image Fonts 1.3 /celt/htdocs/jsMath/fonts

The following customizations have been made to the install from the bare packages listed above. References are to DokuWiki files unless otherwise noted.

  • inc/html.php:html_register() is modified to print whether registration will be allowed
  • inc/auth.php:register() is modified to prohibit registration by foreign IP addresses.
  • inc/lang/en/register.txt is modified to have a note about the IP restrictions.
  • lib/tpl/monobook/user/logo.png is replaced with the BADGrads logo, which is stored as logo.png.badgrads in that directory.
  • lib/exe/js.php is modified to not emit an error in its JavaScript output (should be brought to attention of upstream).
  • lib/plugins/jsmath/script.js to give the correct base URL for the install_js.php file, given that for us DOKU_BASE = /. Should be upstreamed.
  • modsecurity_rules/modsecurity_crs_20_protocol_violations.conf in the Apache tree has had the “URL Encoding Abuse Attack Attempt” rule commented out to allow pages with percent signs to be uploaded.

Unified diffs of the changes made are stored in the DokuWiki install directory in files named 'foo.badgrads-diff'.

Known Bugs / Improvement Requests

None at this time. Feel free to add ones.

Bugs Believed to be Fixed

The “Upload file” link seems to be broken. The workaround is to use the “add images or other files” button (looks like a picture in a frame) above the text box when modifying a page. — Jason Wright 2007/10/11 14:57

I think this has been fixed with the upgrade of DokuWiki and MonoBook. — Peter Williams 2008/08/19 16:28

A new bug seems to have cropped up. Any pages with a percent sign in them seem to be uneditable. This is especially bad for the financial advice pages, which have a lot of percentages in them. As a workaround, I'm using the alternative percent sign ٪, which seems to work, but it's not as pretty as the original sign. Any ideas? — Jason Wright 2007/10/11 15:17

This seems to be due to mod_security, which must have gotten added to the webserver at some point. I've added lines in the .htaccess to attempt to disable the rule which is causing this, but they haven't taken effect – there could be several reasons for that. At least the problem is tracked down now. If you look at /usr/local/apache2/logs/error_log on serpens and try to upload a page with a percent sign, you can see which rule is being triggered. It's defined in /usr/local/apache2/modsecurity_rules/modsecurity_crs_20_protocol_violations.conf. — Peter Williams 2008/08/19 16:24
We commented out the offending rule in the mod_security setup as a workaround. Percent signs are now ok: % . — Peter Williams 2008/08/21 11:51

Pages that Need Tending

These are basically lists of things that should be kept up-to-date.

Original Comments on Wiki Maintenance

(This is a bit old; it was moved here from the start page discussionPeter Williams 2008/08/21 11:14)

Jason wrote: Also, it would be nice if someone who will be here longer than Marshall (like me, I suppose) would learn how to find and edit the wiki generation scripts and configuration files so that we can actually fix the upload bug.

OK, a few comments to get you started:

The wiki is a pretty much stock install of DokuWiki, which I just untarred and it ran automatically with no real work on my part, except for a few minor hacks I made to the login process to only allow new user signup from within Campbell. I'll write up something about that in a bit, but really it was only about five lines of code to check the IP address. Oh, and I installed the “look like wikipedia” display template.

I don't have any special insight into the source code that would let me diagnose the current problem with file uploads. The files are installed in /celt/htdocs on the astro network, if anyone wants to examine the code.

In my opinion, managing the wiki ought to be the job of the grad student webmaster. The old job of the webmaster - run the actual department web site - shouldn't really have even been a grad student job, and thankfully it seems that the department has gotten the message and is now having professionals run the real web site. Since the old badgrads pages vanished along with the old web site, managing the wiki is about the only reasonable thing for the 'grad student web master' job to be about now.

Who should own the actual files and where the server itself goes are another problem. Hopefully serpens will just be handed on to some other student next year, and whenever it actually gets retired (which shouldn't be too soon; it's a 1.5 year old 3 GHz Pentium) they'll need to be propagated to some other machine (by Kelley and/or Bill).

Marshall Perrin 2007/02/26 10:43