Current development on JAMWiki is primarily focused on maintenance rather than new features due to a lack of developer availability. If you are interested in working on JAMWiki please join the jamwiki-devel mailing list.

Comments:JAMWiki 0.6.2

Contents

JAMWiki 0.6.2[edit]

Archived from the Feedback page:

JAMWiki 0.6.2 beta 1[edit]

Here's the first beta for 0.6.2 - there isn't a lot pending for the final release, so barring surprises a final release might be ready soon. The biggest change is that JAMWiki now explicitly requires compatibility with the servlet 2.4 and JSP 1.1 specifications - previous releases contained bugs that required compatibility with these specifications, but 0.6.2 makes the requirement explicit.

Other changes:

  • The TOC will not double-escape charaters like & or ä.
  • The valid login and topic patterns are now configurable.
  • The setup process now pre-populates the file upload parameters with valid defaults.
  • CSS issues with IE6 have been fixed.
  • See the CHANGELOG for numerous other changes.

Please provide any feedback below if the beta version does or does not work for you. -- Ryan 17-Nov-2007 15:05 PST

JAMWiki 0.6.2 status[edit]

Since there haven't been any reported regressions against the latest 0.6.2 code, and since the new code contains a lot of useful fixes and enhancements I'd like to push for a final release in the next 1-2 days. Once that is out I'll make it my top priority to address some of the recently added bug reports and feature requests, but since they aren't regressions or major problems I'd rather not hold up the release to address those issues. There haven't been any significant changes since the first beta, so if anyone finds any problems with that release speak up now, otherwise the final release should happen in the next 1-2 days. -- Ryan 25-Nov-2007 17:38 PST

Reference Naming: Definition must be the first tag?[edit]

Archived from the Feedback page:

When using the ref name="Some Name" tag, it appears that I am forced to give the tag definition the first time I cite something, rather than being able to use the empty tag first and then defining it later. For example I would like to be able to do the following (stolen from [1]):

This is an example of multiple references to the same footnote.<ref name="multiple"/>
Such references are particularly useful when citing sources, if different statements come from the same source.<ref name="multiple">Remember that when you refer to the same footnote multiple times, the text from the first reference is used.</ref>

== Notes ==


<references />

</font></tt>

The idea being that the reference would use the definition from the first NON-EMPTY tag, rather than using the (blank) definition from the empty tag. Such a thing works just fine with MediaWiki, but doesn't seem to work with JamWiki. Is there a way around this, or am I truly forced to move my reference definitions higher if I decide to cite something earlier in the text?

If the current code isn't behaving as expected then it probably won't be hard to fix for the next release. I don't have time right now to look at this, but if I haven't posted a follow-up by tomorrow night (11-November) please add a gentle reminder to this thread. -- Ryan 10-Nov-2007 12:23 PST
Gentle reminder. :)
revision 1916 should resolve this issue. I haven't yet uploaded the latest code to jamwiki.org, but will probably do so tonight or tomorrow. The fix will be included in the next release. Thanks for the report! -- Ryan 11-Nov-2007 17:00 PST

Servlet 2.3 vs. Servlet 2.4[edit]

Archived from the Feedback page:

Since version 0.0.1 JAMWiki has advertised servlet 2.3 compliance, but various bugs in the web.xml file and other places have actually meant that JAMWiki was never fully 2.3 compliant. Looking into things further, 2.4 is better suited for JDK 1.4 or higher, so barring objections I'm going to fully upgrade the next JAMWiki release to 2.4. If anyone disagrees with this move, speak now or forever hold your peace... -- Ryan 31-Oct-2007 19:54 PST

For reference, the Servlet 2.4 and JSP 2.0 specifications were finalized on 24-November-2003 (vs. August 2001 for Servlet 2.3 and JSP 1.2). Ideally it would be nice to allow at least five years before changing any base requirements for JAMWiki, but again, since JAMWiki bugs seem to have prevented using the older versions I don't see that there is any advantage to trying to retroactively support older versions now. -- Ryan 31-Oct-2007 22:44 PST

Allowing dots in username?[edit]

Archived from the Feedback page:

We use LDAP successfully (Sun LDAP) and this was one of my requirements in choosing JamWiki. The problem is, almost all of our user names are firstname.lastname. How do I allow . - _ characters? Some open source configurations have a property you can change for "allowed special characters". If this is not possible, where can I change the code? Thank you.

Good to hear that LDAP works for someone! The user name pattern is Utilities.VALID_USER_LOGIN_PATTERN. If you change it from ([A-Za-z0-9_]+) to ([A-Za-z0-9_\\.\\-\\ ]+) it should do what you need. I'll look into making this configurable for the next release. -- Ryan 08-Nov-2007 17:00 PST
revision 1910 adds the ability to make the topic, role, and login patterns configurable. I'm not going to add a Special:Admin UI for these values since using invalid patterns can make a wiki unusable, so changing these values will require modifying jamwiki.properties directly. This change will be a part of the next release unless any evil badness happens as a result of this change. -- Ryan 10-Nov-2007 17:14 PST

How do I upload and use an image in jamwiki[edit]

Archived from the Feedback page:

What is the correct process of uploading and using images in jamwiki? I'm using jamwiki quite a while, but can still not use any image. I tried to upload an image - once - but I'm not able to use them. There is no Exception in any log-file. I can see the images in the designated directory, but I can not link / use them? Do I have the wrong understanding of using an image in jamwiki - or how do I track down the origin of my problem (misconfiguration?). Thanks for any suggestions. -- Michael Habbert 29-Oct-2007 00:30 PST

The process is similar to what is described at http://meta.wikimedia.org/wiki/Images:
  1. Upload the file using Special:Upload.
  2. Once uploaded a new wiki topic is created with a name like "Image:Filename.gif".
  3. To display that image in a topic add the code [[Image:Filename.gif]] to the topic. The image may be modified by specifying a maximum width/height (example: [[Image:Filename.gif|300px]]), an alignment (example: [[Image:Filename.gif|right]]), a caption (example: [[Image:Filename.gif|This is the caption]]), formatting (example: [[Image:Filename.gif|thumb]]), or a combination (example: [[Image:Filename.gif|300px|thumb|This is the caption]]).
Hope that helps - let me know if I've misunderstood the question. -- Ryan 29-Oct-2007 22:21 PST
No helps not ;-) I did as you suggested: 1. Upload file, 2. referenced Image in a site. But there is no image - nothing at all on the site. The generated html-source is:
<a class="wikiimg" href="/jamwiki/de/Image:amerikawahl.jpg"> <img class="wikiimg" src="/upload/2007/10/amerikawahl-30100305.jpg" width="596" height="800" alt="" /> </a>

And in the upload-directory I can see the file ->/2007/10/amerikawahl-30100305.jpg waiting to be displayed ;-/

Wait, maybe it is a tomcat5-configuration-problem linking to a file outsite the webapps-dir? Recently I hit on a similar problem, I will check it out. -- Michael Habbert 30-Oct-2007 01:08 PST

No, seems not to be a problem with the tomcat-configuration ;-/ -- Michael Habbert 30-Oct-2007 01:32 PST
If the image directory is within the Tomcat webapp then Acegi may be forbidding access to the files - try modifying the /WEB-INF/applicationContext-acegi-security.xml by adding your "upload" directory to to the to the "filterInvocationInterceptor" section:
	PATTERN_TYPE_APACHE_ANT
	/**/Special:Admin=ROLE_SYSADMIN
	/**/Special:Edit=ROLE_EDIT_EXISTING,ROLE_EDIT_NEW
	/**/Special:Login=ROLE_ANONYMOUS,ROLE_USER
	/**/Special:Maintenance=ROLE_SYSADMIN
	/**/Special:Manage=ROLE_ADMIN
	/**/Special:Move=ROLE_MOVE
	/**/Special:RecentChangesFeed=ROLE_ANONYMOUS,ROLE_USER
	/**/Special:Roles=ROLE_SYSADMIN
	/**/Special:Setup=ROLE_ANONYMOUS,ROLE_USER
	/**/Special:Translation=ROLE_TRANSLATE
	/**/Special:Upload=ROLE_UPLOAD
	/**/Special:Upgrade=ROLE_ANONYMOUS,ROLE_USER
	/**/*.jsp=ROLE_ANONYMOUS,ROLE_USER
	/**/*.css=ROLE_ANONYMOUS,ROLE_USER
	/images/**=ROLE_ANONYMOUS,ROLE_USER
	/upload/**=ROLE_ANONYMOUS,ROLE_USER
	/**=ROLE_VIEW
Any user with ROLE_VIEW should have been able to see those files, so I don't see why this would make a difference, but it's the only code in JAMWiki that I can see that would be causing the problem. Otherwise I suspect it would have to be either a Tomcat or a web server configuration issues... -- Ryan 05-Nov-2007 15:05 PST
Hi Ryan,

ok, lets check my directory structure ;-)

/srv/www/tomcat5/base/webapps/jamwiki  -- is my webapps-jamwiki directory
/usr/local/jamwiki/                    -- directory where jamwiki can store files (cache and search directoy)
/usr/local/jamwiki/upload              -- is my image directory

I can see files in /usr/local/jamwiki/cache and search with files from today. And I can see images in the upload directory too (All the directories belong to the user tomcat:tomcat). Compared to the admin-options on my wiki configuration page I did always wonder, what does the configuration-option means: relative path from the docroot to the upload-dir. I did: /upload/ but I do not know what is the docroot of the tomcat?! I do know the documentRoot config option from the apache config file. -- Michael Habbert 07-Nov-2007 11:17 PST

I think that's the problem - unless you have either Tomcat or a web server set up to serve content from /usr/local/jamwiki/upload/ then the files will be inaccessible. If all you're using is Tomcat (no web server) then you can try using /srv/www/tomcat5/base/webapps/jamwiki/upload/ and adding the change to the Acegi permissions file indicated above. Just remember when you do upgrades not to delete the contents of your upload directory! -- Ryan 08-Nov-2007 07:15 PST
Hi Ryan, hi all, ok I changed my directory: /srv/www/tomcat5/base/webapps/jamwiki/upload/ added the rule for the "filterInvocationInterceptor" but still not working! But: when I upload an Image it is stored in the right directory, but the link generated by the Image-tag [[Image:my.pic]] seems to be wrong.
<a class="wikiimg" href="/jamwiki/de/Image:chat.jpg"> <img class="wikiimg" src="/upload/2007/11/chat-11165748.jpg" width="379" height="354" alt="" /> </a>
I do not get an image, If I call for the URL:\\localhost:8080/jamwiki/de/upload/2007/11/chat-11165748.jpg I get a 404. Today I tried URL:\\localhost:8080/jamwiki/upload/2007/11/chat-11165748.jpg and It worked. Is my problem related to the virtual context: de? The URL without the de worked. Thanks for any hints. -- Michael Habbert 11-Nov-2007 08:36 PST
If you go to Special:Admin#upload the two parameters that matter are "File upload directory" - which should be set to /srv/www/tomcat5/base/webapps/jamwiki/upload/ for you, and "Relative file upload root", which I suspect is set to "/upload/" for you. If you change that to "/jamwiki/upload/" I suspect it will solve the problem. If not let me know, otherwise I need to figure out a way to make this easier to setup... I was thinking that rather than setting it blank I could default it for new installs, which would hopefully resolve issues that people have had. -- Ryan 11-Nov-2007 09:44 PST
revision 1914 defaults the file upload directory and relative path values to /webapp/upload/ and "/context/upload/", respectively. -- Ryan 11-Nov-2007 15:25 PST
Thanks Ryan, that was the solution. After changing the "relativ path" it worked! Thanks. So, what is the solution to the future? extending the documentation about the webserver-configuration or some more information about the configuration of the directories? -- Michael Habbert 12-Nov-2007 08:09 PST
The change I committed in revision 1914 simply pre-populates the setup screen fields for the file upload directory and relative directory with defaults for the web application server, so most users can use those values without needing to change anything. For example, in your case the setup screen would default to /srv/www/tomcat5/base/webapps/jamwiki/upload/ and /jamwiki/upload/, so you would only need to change those values if you wanted to use a web server or some other method to store and display images. The documentation should probably also be updated - if you're interested feel free to make any edits you see that are necessary to Configuration#File upload settings (and note that anyone who sees a way to improve documentation on the wiki is encouraged to do so). -- Ryan 12-Nov-2007 11:15 PST