This page is for comments, questions, or discussion items below. Related discussion pages include:
- FAQ - Answers to Frequently Asked Questions. Please check the FAQ page before posting questions or bug reports.
- Bug Reports - Please report any bugs on this page.
- Feature Requests - If there is a feature that you would like to see added please discuss it on this page. See the Roadmap for a list of planned features.
- How to Help - For those interested in implementing a specific feature.
- Roadmap - A list of planned features for future releases.
It would be easiest if any new discussion was listed under its own heading, which can be done by entering the following code:
==This is a new Heading==
[Edit]Archives
This page tends to get crowded, so several discussions that have been resolved have been moved elsewhere:
Also see the Archived Feedback page for more old discussions.
[Edit]File Upload Problem
I cannot seem to upload a file that is 45MB in size. It just shows .45 and is corrupted. I have set my settings to a larger file size but it does'nt seem to work.
- Can you provide any additional details? Are there error messages in the logs? What type of file is it? What OS and web application server are you using? At my previous employer we routinely uploaded files that were up to 100MB in size, so I suspect the problem may be environment-related. -- Ryan • (comments) • 03-Feb-2010 07:41 PST
[Edit]adding a custom banner
I want to put a custom banner across the top of my wiki. I have searched everywhere and tried updating the css but I can not work out how to do this. Is this feature supported? If so, how can i do this?
- There is no built-in support for that feature. Your best option is probably to update the
/WEB-INF/jsp/wiki.jsp file and the StyleSheet topic to get the look that you want. Hope that helps! -- Ryan • (comments) • 05-Feb-2009 20:38 PST
[Edit]Mention File System Links in Documentation
IMHO Wiki Syntax#Links should mention that one can not only link to HTTP sites but also to the file system (at least on Windows and provided that the browser settings allow it):
--tapaya 17-Feb-2009 07:50 PST
- If you're willing to make the necessary updates I'd be grateful for any help with documentation, otherwise I'll try to update it next time I have a chance. Thanks for pointing this out. -- Ryan • (comments) • 17-Feb-2009 21:28 PST
[Edit]__NOEDITSECTION__ not working
The __NOEDITSECTION__ magic word isn't implemented in JAMWiki yet (although the help pages mention it), right? I'd wish to make sections in pages created with templates not editable, because any inserts there be dropped anyway. I assume there's currently no way to achieve this. To see what I mean consider these two example pages:
Template:MyExample:
__NOEDITSECTION__
== Ziel ==
{{{Ziel}}}
== Akteure ==
{{{Akteure}}}
Sample page:
{{MyExample
| Ziel=poiu
| Akteure=qwer
}}
--tapaya 02-Mar-2009 14:39 PST
- Yeah, at present __NOEDITSECTION__ is not implemented - feel free to update the help pages as needed, as they don't make it clear for this magic word. If you have a critical need for it I can investigate the feasibility of getting it into the next release - just let me know. -- Ryan • (comments) • 02-Mar-2009 15:06 PST
- Chances are that my company will employ JAMWiki for a specific intranet application based on "forms" implemented with templates. I think __NOEDITSECTION__ would make our JAMWiki interface more straightforward thus increasing the chance that we'll actually go for it. --tapaya 03-Mar-2009 00:57 PST
- Thanks, I'll investigate how difficult it would be to add this parameter - give me a couple of days. -- Ryan • (comments) • 03-Mar-2009 07:15 PST
[Edit]Access denied page configurable?
I have been looking around and i can't see that it is - it looks like it has been hard coded to redirect to Special:login - but maybe there is something I haven't found? If it isn't configurable i think it should be - I am using CAS, so I dont want users redirected to the wiki login page as that is useless, and in fact I dont really want the logged in users to be redirected to a login page at all - maybe just a generic permission denied page.
For now i guess i'll change the 403.jsp but it would be nice to have a config param for this.
- At the moment you can modify it via the
/WEB-INF/web.xml <error-page> parameter, which may help. I'll see if it's possible to make this functionality a bit more flexible, but please remind me if there aren't any updates to this discussion in the next few days as I'll be traveling. Thanks for pointing this issue out. -- Ryan • (comments) • 21-Mar-2009 18:26 PDT
[Edit]Configure time to auto log-out
Where would I set the time till the logged in user be automatically logged out? --tapaya 24-Mar-2009 01:15 PDT
- JAMWiki should use the session timeout configured for the application server. To increase that you can either modify your application server's default settings or you can try adding the following to the
/WEB-INF/web.xml file:
<session-config>
<session-timeout>30</session-timeout>
</session-config>
- ... where "30" is the timeout in minutes. -- Ryan • (comments) • 24-Mar-2009 06:11 PDT
[Edit]Templates i.e. Infoboxes and introduction of advanced extensions i.e. iframe
I realise that the last update on template similar to Mediawiki functionality was done in early 2008. Have there been any updates on the Mediawiki Parser and is there anyway to have the ability to introduce "iframe" either via HTML / Javascript.
Maybe its there but I just havent seem to be able to work it out just yet.
-- User:Jon • (comments) • 25-Mar-2009 16:11 EST
- Most releases contain some updates to improve the parser and add additional Mediawiki compatibility, for example JAMWiki 0.7.0 contained a number of changes to allow nested templates, to improve support for magic words, and to fix some Mediawiki incompatibilities. As to iframes, currently JAMWiki won't support those, but if support is available in Mediawiki then please feel free to add a feature request, preferably with a pointer to any information about how Mediawiki supports this feature. Alternatively, if Mediawiki doesn't support iframes then there is a long-term plan to allow JAMWiki site admins to configure which HTML tags are allowed, although that feature may still be some ways away from implementation. -- Ryan • (comments) • 25-Mar-2009 11:28 PDT
[Edit]Commercial usage
I've been trying to find anywhere that points towards JAMWiki being available for commercial use. I know a firm that has been charging for JAMWiki to install and maintain. I am unsure on what is allowed and what isnt. The system does not indicate anything regarding JAMWiki and only noticed it when looking through the logs once, as there were no references to JAMWiki on the wiki frontend itself
--JJ 31-Mar-2009 07:57 PDT
- JAMWiki is licensed under the LGPL license - the terms of that license are at http://www.gnu.org/licenses/lgpl.html, and a summary version is available at https://cajo.dev.java.net/license.html. Provided a company is following the terms of that license then they are welcome to charge for and redistribute the code. If the company in question has modified the code and not made those modifications available to download freely then that would be a concern. Similarly, if they have removed attributions that might also be a concern. I know that there are a number of products out there that have chosen to integrate JAMWiki into their code and most do so in full compliance with the license, but if some of them are violating license terms it would be good to know about it so that I could get in touch with them. Thanks for the info! -- Ryan • (comments) • 31-Mar-2009 08:14 PDT
[Edit]Move topic missing?
I cant seem to find a way to move a topic. I searched this site and found some references to the Move tab, but I can't see it anywhere. Is it possible this is broken in the new release ? maybe I just can't find it?
- It works for me locally and on jamwiki.org - the "Move" tab appears at the top of the page between "History" and "Watch". It's possible that the "move" permission has been removed - check the Special:Roles page on your wiki and verify that the appropriate group and/or user has the "ROLE_MOVE" permission. -- Ryan • (comments) • 05-Apr-2009 20:31 PDT
- Thanks fixed it. I was using my own permission database and didnt have the MOVE permission in there.
[Edit]Deleted GROUP_ANONYMOUS
We managed to remove the GROUP_ANONYMOUS (somehow...) and now we cant see to find a way to get it back.
We were playing around with the Group type settings as we are trying to implement a 3 tier system of access to 2 namespace sections of information.
- First group has read access to Namespace 1 only (this could be anonymous users i guess)
- Second group has read/write access to Namespace 1 and read access to Namespace 2
- Third group has read/write access to everything.
Are we going about this the right way? Or is there some other way to this more effectively?
- Sorry to be confusing, we really only need to recover the GROUP_ANONYMOUS bit, I think our other permissions will be sorted out differently.
- Did you delete it from your database? You can probably just re-insert the record if necessary:
insert into jam_group ( \
group_id, group_name, group_description \
) values ( \
1, 'GROUP_ANONYMOUS', 'All non-logged in users are automatically assigned to the anonymous group.' \
)
- You may then need to restart the app server for the change to take effect. Let me know if the problem is more complex. -- Ryan • (comments) • 14-Apr-2009 17:36 PDT
Ok I think I've worked out the problem - it seems that when I removed all privileges from a category it disappeared from the list to re-assign privileges. The entry was still there in the db, so I just assigned it a single permission and it re-appeared in the GUI - thanks for the quick response.
- Are you on JAMWiki 0.7.0? There was a bug (fixed in 0.7.1) that prevented roles and groups from appearing when there were no permissions assigned. It should be working now, but if there are still issues please let me know. -- Ryan • (comments) • 14-Apr-2009 20:34 PDT
[Edit]subst tag
Are there any plans to implement the subst tag (to use with templates) in the near future?
- Could you add this request to the Feature Requests page? I've been meaning to add it for some time, but as there weren't many people asking for this functionality it has repeatedly gotten deferred. Thanks! -- Ryan • (comments) • 19-Apr-2009 14:59 PDT
[Edit]Howto change the JAMWiki Logo ??
Having my own fresh instance of JAMWiki running, I am constantly looking for information on this wiki. But this and mine look all alike. If I cound change the logo there would be far less danger of mixing them up and making changes to the wrong one. 95.112.143.34 19-Apr-2009 13:12 PDT
- Have a look at Configuration, which covers most of the configurable settings for the wiki. The logo can be changed from the third field on Special:Admin. If there is a better / more obvious way to document this functionality any feedback is appreciated, or if you're willing feel free to directly edit the pages in question. -- Ryan • (comments) • 19-Apr-2009 14:55 PDT
[Edit]WYSIWYG / 0.8.0
When do you expect Ronins WYSIWYG editor to be integrated?? aka when is 0.8.x being released?
- Ronin's FCKEditor code installs and runs without generating errors for me, but for some reason the Javascript doesn't seem to be initializing and thus no edit functionality is available, so until that gets resolved it won't be integrated. I'd definitely like for this functionality to be included in 0.8.0, so odds are good it will eventually get completed. As to when 0.8.0 is ready, I'm a bit hesitant to commit to a release schedule, although I was hoping it wouldn't take much longer than six months after the release of 0.7.0 until 0.8.0 was out. There's a lot of good stuff already committed on trunk, so it's conceivable that the goals for 0.8.0 will be scaled back and a release will go out around August with whatever is ready - take that with a HUGE grain of salt though as JAMWiki releases have always taken longer than expected. -- Ryan • (comments) • 11-May-2009 18:36 PDT
[Edit]Need help with LDAP setup
I configured the LDAP setup in applicationContext-security.xml. I can successfully authenticate with this configuration but I am not authorized to do anything. Also, with this setup I can no longer login as the admin user I created at setup time. I'd like anonymous users to not be able to view or edit anything and users authenticated via LDAP to be able to do anything. Please Help.
- Make sure your LDAP system is assigning ROLE_ADMIN to your admin user login. In addition, all of the roles specified on Special:Roles must be assigned to users via LDAP... if your LDAP system is using different roles simply create new roles from the Special:Roles interface. Hope that helps! -- Ryan • (comments) • 11-May-2009 18:46 PDT
ok here's what I did for anyone following. FWIW, I'm using openLDAP. I created an organization unit "ou=jamwiki,ou=groups,dc=example,dc=com". I then created the following groups underneath the jamwiki ou (ADMIN, EDIT_EXISTING, EDIT_NEW, MOVE, SYSADMIN, TRANSLATE, UPLOAD, VIEW). Then I modified the applicationContext-security.xml as such:
<ldap-server id="ldapServer" url="ldap://localhost/dc=example,dc=com" port="389" manager-dn="cn=admin,dc=example,dc=com" manager-password="*********" />
<ldap-authentication-provider server-ref="ldapServer" group-search-filter="member={0}" group-search-base="ou=jamwiki,ou=groups" user-search-filter="uid={0}" user-search-base="ou=people" user-dn-pattern="cn={0},ou=people" />
<authentication-provider>
<ldap-user-service server-ref="ldapServer" group-search-filter="member={0}" group-search-base="ou=jamiwiki,ou=groups" user-search-filter="uid={0}" user-search-base="ou=people" />
</authentication-provider>
I also set the "useJAMWikiAnonymousRoles" property to false in the applicationContext-security.xml Then restart server.
The best I can tell, the "built-in" GROUP_REGISTERED_USER does not apply when using LDAP, so you have to add every user to every group created above manually. I would like to find a way to have jamwiki utilize my existing LDAP "developer" group and somehow assign roles to the developer group. Any ideas how I might achieve that?
- First, my knowledge of LDAP is limited and the initial JAMWiki integration was done using samples from the Spring Security examples. That said, I believe that the Spring LDAP integration should automatically pick up all groups, roles, etc that are assigned in your LDAP system, so if you configure LDAP with a permission of (for example) JAMWIKI_ADMIN and the modify
/WEB-INF/applicationContext-security.xml to look for JAMWIKI_ADMIN that users who get that permission will be able to to access resources allowed by that permission. Also, as you've indicated, something like GROUP_REGISTERED_USER will no longer apply when using LDAP since the default authentication provider is no longer being used.
- Does that help? If so then I'd like to use the information from this discussion to update Configuration#LDAP / CAS / OpenID so that hopefully this sort of integration will be easier for others in the future. -- Ryan • (comments) • 12-May-2009 21:33 PDT
I'll have to give that a shot in a test environment. I've already deployed using the setup I created
Hi. Because of design of my corporate LDAP tree I can't use group names as already created in JAMWIKI (e.g. group called ADMIN). Thus I wonder if there is possibility to map some LDAP group names (or role names found in LDAP) to those used in JAMWIKI. If not what would be the best way to add such a feature. Is modification of JAMWikiPostAuthenticationFilter good idea to acomplish this? -- Seba
- I don't use LDAP regularly, but I believe that you should simply be able to modify the role names in /WEB-INF/applicationContext-security.xml to match the roles assigned by your LDAP system. If that doesn't work let me know and I'll read through the Spring Security configuration docs to see if there's a better solution. -- Ryan • (comments) • 10-Nov-2009 07:48 PST
Hello, I wanted to add my experiences here so others can save some time on LDAP setup. I was able to mostly integrate with my company's LDAP setup. I work at an office with thousands of employees and so I had absolutely no personal access to the backend LDAP stuff and had to figure it out through trial and error. Your statement above is absolutely correct. If you modify the role names in /WEB-INF/applicationContext-security.xml you can get it working. However, one absolutely vital point is that by default Spring Security will prepend 'ROLE_' to any groups you get back from LDAP as well as putting the entire name in upper case. This means that if my LDAP group is 'JAMWikiAdmin' it will actually come back from Spring as 'ROLE_JAMWIKIADMIN'. So when you are modifying your /WEB-INF/applicationContext-security.xml you must prepend 'ROLE_'. Spaces seem to be left intact, for example 'JamWiki Admin' ends up coming back as 'ROLE_JAMWIKI ADMIN'.
Here is an example of the applicationContext-security.xml file. This assumes you have two 'groupOfUniqueNames' in LDAP: JamWikiUser and JamWikiAdmin. There may be better, cleaner ways of setting this up but this is the best I could do:
<intercept-url pattern="/**/Special:Admin" access="ROLE_JAMWIKIADMIN" />
<intercept-url pattern="/**/Special:Edit" access="ROLE_JAMWIKIUSER" />
<intercept-url pattern="/**/Special:Import" access="ROLE_JAMWIKIUSER" />
<intercept-url pattern="/**/Special:Login" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<intercept-url pattern="/**/Special:Maintenance" access="ROLE_JAMWIKIADMIN" />
<intercept-url pattern="/**/Special:Manage" access="ROLE_JAMWIKIADMIN" />
<intercept-url pattern="/**/Special:Move" access="ROLE_JAMWIKIUSER" />
<intercept-url pattern="/**/Special:RecentChangesFeed" filters="none" />
<intercept-url pattern="/**/Special:Roles" access="ROLE_JAMWIKIADMIN" />
<intercept-url pattern="/**/Special:Setup" filters="none" />
<intercept-url pattern="/**/Special:Translation" access="ROLE_JAMWIKIADMIN" />
<intercept-url pattern="/**/Special:Upload" access="ROLE_JAMWIKIADMIN" />
<intercept-url pattern="/**/Special:Upgrade" filters="none" />
<intercept-url pattern="/**/*.jsp" filters="none" />
<intercept-url pattern="/**/*.css" filters="none" />
<intercept-url pattern="/images/**" filters="none" />
<intercept-url pattern="/js/**" filters="none" />
<intercept-url pattern="/upload/**" filters="none" />
<intercept-url pattern="/**" access="ROLE_JAMWIKIUSER" />
I hope this helps. This was found by a co-worker while digging through the Spring Security docs. It is possible to turn off this prepending of 'ROLE_'. Please see this page for more information. Look under point '10.3.3. Loading Authorities'.
I was able to lock down my wiki so only users authenticated with LDAP will even be able to see any page, which is important for my team.
I do have one issue, though: even though the rest of my permissions are working without issues I cannot seem to allow editing on any page for any kind of user! It is very frustrating. Every other pattern above matches correctly but editing will just not work with anything I do. Ryan, is there something special about editing in the security setup? Looking through the source in ServletUtil in the 'isEditable' method you check hard-coded constant variables, i.e. Role.ROLE_EDIT_NEW. This means that in LDAP you cannot fully integrate unless you enter 'EDIT_NEW' as a group in LDAP, which I can't do as I mentioned previously. I am working on re-building the source after changing the constants in the 'Role' class because I think that is the correct fix but would it be possible to somehow make this more generic so it will integrate with LDAP without having to add those groups? Like I said I have very little access to the backend LDAP.
I would like to say that the code is very well written. I easily found the code that I needed, which is a testament to your overall design. Well done! -- ptrimbl • 01-Feb-2010 09:52 CST
- Thanks for the feedback - I'm officially supposed to be working on getting a sandbox ready for a demo right now so I haven't read through your comment in detail, but see Configuration#LDAP / CAS / OpenID for some quirks with Spring Security and patterns requiring query parameters that might help solve the problem you're facing. -- Ryan • (comments) • 01-Feb-2010 11:44 PST
- Hi Ryan, just FYI, I was able to modify the code in the Role and Environment classes in my own copy to pull the role info from the jamwiki.properties file. However, it seems like the applicationContext-security.xml file has changed in the most recent version. I think that the Configuration#LDAP / CAS / OpenID page needs to be to be updated to reflect any changes. I'll try to figure out what changed and how to modify it to make LDAP work again. -- ptrimbl • 02-Feb-2010 09:55 CST
- Actually, to be honest, I am seeing a difference between the source .zip file and svn source from pretty far back (the 2009-11-29 commit). Why is the source from your downloads page different from the source tagged as '0.8.2' in svn? I download the latest war file and the applicationContext-security.xml is different from anything I can find in svn. I am hopefully just missing something very obvious. I am pretty new to svn. -- ptrimbl • 02-Feb-2010 13:16 CST
- The current SVN trunk will be significantly different from the 0.8.2 code as that is the development code for the 0.9.0 release and includes a Spring Framework and Spring Security update, amongst a few hundred other changes. The 0.8.2 code is in tags/release-0.8.2, and the live branch (which will become 0.8.3) is under branches/0.8.x.
- Some quick setup tips - to download the 0.8.x development branch, SVN checkout the https://jamwiki.svn.sourceforge.net/svnroot/jamwiki/wiki/branches/0.8.x URL. If you're on Windows, Tortoise SVN is an invaluable front-end for working with SVN. Hope that helps! -- Ryan • (comments) • 02-Feb-2010 11:40 PST
- Thanks so much, Ryan, for all of the help. It worked! I understand the difference between the trunk and the branch now. That was definitely my problem. It works fully now. I made the changes (in the old 0.8.2 code) to Role.java and Environment.java to pick up the 'ROLE_' strings from jamwiki.properties and I was able to fully configure the applicationContext-security.xml file to connect to LDAP.
- I think I will take some time to fully understand the changes that were made for the 0.9 code and see if I can make LDAP work again. If I manage to get it working I guess I can start thinking about making the minor changes available to others, but...to be honest I'm a little afraid of gaining any kind of access to Subversion since I am so new to it. I'm sure that you have all sorts of safeguards against people committing changes incorrectly but I would want to make sure I was fully comfortable (or at least assured that I couldn't do any damage) before trying to apply the changes I mentioned above. Thanks again for all the support. -- ptrimbl • 02-Feb-2010 15:10 CST
- The usual practice with Subversion is to have someone create their own branch (see How to Help#How to contribute) that they can then play around with. This approach allows other developers to view changes without any impact on trunk or production branches. Once (or if) the branch changes are reviewed and ready to merge then it's a fairly simple matter to integrate them into trunk or the appropriate production branch. In any case, I'll try to find some time to look into this issue as well, so even if it isn't your code, hopefully 0.9.x will have a fix for this issue :) -- Ryan • (comments) • 02-Feb-2010 13:48 PST
[Edit]File Uploads
I've set my file upload directory to be /opt/jamwiki-data/files I've set Relative File Upload Root to /jamwiki/upload/ I can upload files. Files make it into /opt/jamwiki-data/files. However, the links to the files give me 404. The link is to http://mydomain.com:8080/jamwiki/upload/2009/5/image.png. So I created a symlink in $GLASSFISH_HOME/domains/domain1/applications/jamwiki/upload to /opt/jamwiki-data/files but I still get 404 errors. Any idea what I can try.
- This sounds like an app server issue rather than a JAMWiki issue. I use a similar setup to what you've described on jamwiki.org, with file uploads going to the Apache docroot, and I know a number of sites use this functionality without issue. Configuration#File upload settings has some information, but it sounds like you've got the JAMWiki configuration correct so I'd try to figure out if Glassfish is actually following the symlink. -- Ryan • (comments) • 13-May-2009 11:59 PDT
In case anyone suffers similar problem in glassfish. following symlinks is disabled in glassfish by default. You can enable this by editing glassfish domain.xml and allow symlink following. Find this section and add the allowLinking property as shown
<virtual-server id="server" http-listeners="http-listener-1,http-listen......>
<property name="docroot" value="${com.sun.aas.instanceRoot}/docroot" />
<property name="accesslog" value="${com.sun.aas.instanceRoot}/logs/ac$....../>
<property name="sso-enabled" value="false" />
<property name="allowLinking" value="true" />
</virtual-server>
[Edit]French Translation
Hello, is it possible to have access to translation tools in order to translate some text and fix some others. Regards Guillaume FRANCOIS 55 27-May-2009 06:29 PDT
- Sure! Your account should now have access to the Special:Translation page, and I've updated the jamwiki.org translations with the files you uploaded. Let me know what name you'd like to use in the CREDITS file - most people use their name and jamwiki.org login such as "Ryan Holliday (wrh2)". Thanks for helping out! -- Ryan • (comments) • 27-May-2009 07:00 PDT
- Thanks, I'm already using it. For name simply put "Guillaume FRANCOIS 55" ;-) Guillaume FRANCOIS 55 27-May-2009 07:10 PDT
- revision 2594 adds your changes to Subversion for JAMWiki 0.7.2. Thanks again! -- Ryan • (comments) • 27-May-2009 10:33 PDT
- I mostly updated everything. Have to used it now in order to spot small errors. Guillaume FRANCOIS 55 28-May-2009 02:34 PDT
[Edit]Recreate JamWiki 0.6.6 from One system to another
Hi, I have installed Jamwiki in one of my system. But that system is going to be formatted. So I need to move all the content to another system.I'm using External database(MySQL). Please help me how to recreate my portal as it is from my new system. I tried to map the MySQL schema(Existing one) while doing the setup but I'was getting Connection could not established. So I created a new schema in MySQL and given it while installing and JamWiki started working. But I could not get any of my old data. Please help me so that I can recover all pages/documents/images/etc as how it was early. Venkat
- You should have two options:
- You can do a new install on the new system, and if you point to the existing database you will get a warning about "data already exists, new tables will not be created". If you choose to continue JAMWiki will then be set up to use the existing database. Even though the database should not be changed by this process I'd recommend backing up your data first.
- You can simply copy your existing JAMWiki webapp files to the new system, and then manually edit any paths in
/WEB-INF/classes/jamwiki.properties that refer to the old system.
- Hope that helps. -- Ryan • (comments) • 03-Jun-2009 10:13 PDT
- I've written these steps out in slightly more detail at Installation#Migrating an Installation. -- Ryan • (comments) • 03-Jun-2009 13:09 PDT
[Edit]Password storage in Database
Hi, In order to have a high degree of security , I could see that Jamwiki is using Encrypted password. But in my system , there are some windows applications which is using User ID/Password from the "Jam_wiki_user_info' table for authentication. Please let me know how to decode the password from the table so that other Windows applications can also use it. It would be very much helpful for other developers in my system to have unique database for authentication. Thanks in Advance !!!... --Venkat Raman 04-Aug-2009 03:57 PDT
- Passwords are encrypted using a one-way algorithm so that they cannot be unencrypted - allowing password decryption would be a security hole. If you would like to share passwords you can either encrypt the password prior to comparing against the database value using
org.jamwiki.utils.Encryption.encrypt(), or you could implement an LDAP solution to store logins and passwords, and then configure JAMWiki to access that database - see Configuration#LDAP / CAS / OpenID. -- Ryan • (comments) • 04-Aug-2009 06:44 PDT
- Thanks Ryan. I'm using Jamwiki 0.6.6 . I'm a new user of LDAP. Using LDAP, is it possible to control roles/access based on each user? Is it possible to validate users with edit access ,the one with view access and the one with admin access. Please help me so that I can go ahead and use LDAP authentication.--Venkat Raman 04-Aug-2009 20:19 PDT
- JAMWiki 0.7.0 has a more complete integration with Spring Security and offers an easier LDAP integration. Roles, userids and passwords can all be controlled via LDAP - see Wikipedia's article on LDAP for a high-level overview. -- Ryan • (comments) • 05-Aug-2009 07:47 PDT
[Edit]I have forgotten my (administrtor) password.
How can I set a new one? 93.132.179.189 02-Jan-2010 06:08 PST
- If you have another account with admin rights you can reset the admin password from the Special:Maintenance page, otherwise the only possible way to reset the admin password is to go into the database and set the
password field of the jam_users table to the password of another account that you DO know the password for, such as update jam_users set password = (select password from jam_users where username = 'johndoe') where username = 'admin'. -- Ryan • (comments) • 02-Jan-2010 07:46 PST
- Thank you. Can this be done even in case of an internal DB? And if so, how? (The contents is small in this case and there would not be too much damage if I had to export and reimport the wiki so the question is more for curiosity.) 93.132.142.199 03-Jan-2010 02:21 PST
- You can search online for tools that will allow you to connect to an HSQL database. The connection settings will be:
org.hsqldb.jdbcDriver, jdbc:hsqldb:file:path-to-your-database-files;shutdown=true, sa / blank password. -- Ryan • (comments) • 04-Jan-2010 02:02 PST
This doesn't seem to work:
/home/myuser/wurstel/database:
total used in directory 1072 available 132968180
drwxr-xr-x 16 myuser myuser 4096 2010-01-04 12:44 ..
drwxr-xr-x 2 myuser myuser 4096 2010-01-04 12:42 .
-rw-r--r-- 1 myuser myuser 16899 2010-01-03 16:44 jamwiki.backup
-rw-r--r-- 1 myuser myuser 418 2010-01-03 16:44 jamwiki.properties
-rw-r--r-- 1 myuser myuser 8275 2010-01-03 16:44 jamwiki.script
-rw-r--r-- 1 myuser myuser 1048576 2010-01-03 15:43 jamwiki.data
from ~/sqltool.rc
# A test db
urlid jm
url jdbc:hsqldb:file:/home/myuser/wurstel/database
username sa
password
from the shell:
myuser@Munin:~/workspace1/Hsqldb$ java -jar /home/myuser/workspace1/Hsqldb/lib/hsqldb.jar jm
JDBC Connection established to a HSQL Database Engine v. 1.9.0 database
as "SA" with R/W TRANSACTION_READ_COMMITTED Isolation.
SqlTool v. 1155. (SqlFile processor v. 1156)
Distribution is permitted under the terms of the HSQLDB license.
(c) 2004-2009 Blaine Simpson and the HSQL Development Group.
\q to Quit.
\? lists Special Commands.
:? lists Edit-Buffer/History commands.
*? lists PL commands.
/? displays help on how to set and use macros (command aliases).
SPECIAL Commands begin with '\' and execute when you hit ENTER.
EDIT-BUFFER / HISTORY Commands begin with ':' and execute when you hit ENTER.
PROCEDURAL LANGUAGE commands begin with '*' and end when you hit ENTER.
MACRO executions and definitions begin with '/' and end when you hit ENTER.
All other lines comprise SQL Statements (or comments).
SQL Statements are terminated by either unquoted ';' (which executes the
statement), or a blank line (which moves the statement into the edit buffer
without executing).
After turning on variable expansion with command "*" (or any other PL
command), PL variables may be used in most commands like so: *{PLVARNAME}.
Be aware when using regular expressions on commands, that the regex.s
operate only on the command text after the * or \ prefix, if any.
sql> \dt
TABLE_SCHEM TABLE_NAME
----------- ----------
Fetched 0 rows.
sql>
Would that really work with an internal DB or do I just have some parameter settings wrong? 95.112.137.144 04-Jan-2010 03:53 PST
- Great!!! It works!!!
The parameter settings in ~/sqltool.rc need to be:
# A test db
urlid jm
url jdbc:hsqldb:file:/home/myuser/wurstel/database/jamwiki
username sa
password
95.112.137.144 04-Jan-2010 04:03 PST
-
- Well, not this great as I thought. While I can connect directly now, jamwiki can't connect any more:
A connection could not be established with the database; please re-check the settings: Wrong database file version
-
- It was a test wiki, so no valuable contents is lost but this should be a warning to other users to be careful and first copy everything to a far away save place. I will post again in case I can fiddle out how to make it work again. 95.112.137.144 04-Jan-2010 04:19 PST
- To put my jamwiki back to life all I had to do was to replace the file jamwiki.properties with the old version which could be generated by directing it to a different file-system directory in the Special:setup. It realy is not an issue of jamwiki but of hsql. 95.112.137.144 04-Jan-2010 07:01 PST
- Thanks for the additional info - I'll try to integrate this into the existing documentation soon. -- Ryan • (comments) • 04-Jan-2010 22:56 PST
[Edit]Source Code Syntax Highlighting
Has anyone looked into supporting some kind of source code syntax highlighting?
I tried being sneaky and adding Google code prettify to my 0.6.6 install thinking it would be simple enough to get working (by modifying top.jsp to include the css and script), but it requires adding class="prettyprint" to whatever pre tag contains the code which unfortunately doesn't work in JAMWiki 0.6.6. As a workaround, any idea how hard it would be to allow the class attribute on pre tags (maybe not something that would be good to do on an official release, but maybe something I could do just for my install by building from source)?
- There have been occasional requests for source code syntax highlighting, but as yet I don't think anyone has found a way to integrate it so that it doesn't create significant additional work for code maintenance and also add overhead in rendering time. Your suggestion of using Google Javascript is probably the best yet, so if all that is needed is support for the "class" attribute on the "pre" tag then that would be doable - if you're interested have a look at the "htmlprestart" pattern in
/jamwiki-core/src/main/jflex/jamwiki-processor.jflex. Basically, that pattern would need to validate and output its attributes similar to how other HTML elements are handled. I'm currently on vacation so my internet access is sporadic, but if you'd like me to set you up with Subversion access just let me know your Sourceforge ID and I can do so; alternatively, if you get some code working feel free to upload it to jamwiki.org and I'll take a look as soon as I return. -- Ryan • (comments) • 10-Sep-2009 19:56 PDT
- Since this was a fairly easy change and I had some time I've added support for HTML attributes with the <pre> tag for JAMWiki 0.8.0 in revision 2707. -- Ryan • (comments) • 15-Sep-2009 08:27 PDT
[Edit]Traditional Chinese Translation
Hi, Ryan, thank you for providing such a wonderful thing.
I'm willing to translate JAMWiki into Traditional Chinese (zh_TW).
The 0.7.2 bundled one is out of date, and it is totally identical to the Simplified Chinese (zh_CN) version except the charset encoding. However, there was difference between these two languages. Perhaps I can help JAMWiki speaks traditional Chinese more regular!
Would you please grant me (SourceForge ID: tan9) to access the zh_TW properties file and related pages?
- Thanks for offering to help! I've given you access to Special:Translation on jamwiki.org and also given you commit access in Subversion. Let me know what name to use in the CREDITS.txt file (most people use their real name + jamwiki.org login such as "Ryan Holliday (wrh2)") so that I can make sure you get proper credit. Thanks again! -- Ryan • (comments) • 16-Sep-2009 06:46 PDT
- I've committed the translated properties file and related pages into Subversion, and I'll be appreciated if you credit those works as "Pei-Tang Huang (tang)," although my real real name is "黃培棠" :) In addition, I found there have some minor typos in the default StratingPoints.txt, please check for "cusomizing" and "propertly." And in the LeftMenu.txt, the letter "f" in "Sourceforge" should be capitalized. Anyway, thank you for your great works, hope the 0.8.0 release come out as soon as possible! --Pei-Tang Huang 19-Sep-2009 02:08 PDT
- Thanks! I should have more regular internet access soon (I'm writing this from a hotel parking lot) and will add your credit and fix the spelling errors you've pointed out. -- Ryan • (comments) • 21-Sep-2009 12:21 PDT
- revision 2712 adds you to the CREDITS.txt file as "Pei-Tang Huang (tang)" (feel free to change it if you prefer something different) and fixes the typos you pointed out. Also, a previous bugfix commit changed the
manage.message.permissions key slightly (it no longer takes an argument) so it may be out of sync with your latest changes - if you could verify I'd be grateful. Thanks again for your changes! -- Ryan • (comments) • 23-Sep-2009 17:56 PDT
- Dear Ryan, I aligned the translation to your update. Would you please sync the file back here, so others may review and improve the translation easily. :p --Pei-Tang Huang 25-Sep-2009 01:44 PDT
- Thanks for the update, and jamwiki.org should now have all of the most recent changes. Apologies for taking a bit longer than normal to update jamwiki.org, but I've been on vacation. I'll be getting home today or tomorrow so things should be back to normal after I return. -- Ryan • (comments) • 25-Sep-2009 07:39 PDT
[Edit]0.8.0 Beta 2 installed on Resin 4.0.1
0.8.0 Beta 2 Worked for me. The installation did, at least, I haven't delved very deeply yet. This was on Resin 4.0.1 on Ubuntu 9.04 Server. Between Resin having a .deb package to auto-install and JAMWiki working straight out of the box I'm pretty darn happy here. Can't wait for the GA release. --98.229.138.91 25-Oct-2009 09:35 PDT
- Thanks for the confirmation! I did a bit of local testing with Resin but have mostly been running Tomcat so the additional testing is much appreciated. -- Ryan • (comments) • 25-Oct-2009 10:20 PDT
[Edit]Various comments and questions
- It doesn't have the #if function for templates, so is there any other way to do optional template parameters?
- Possibly a bug: whitespace in template parameter names is recognized. So
-
- {{template
- parameter=value
- }}
- is different from
- {{template
- parameter = value
- }}
- Templates do not appear in the "All Pages" list... but I'm not sure whether MW does this, so maybe it just needs an "All Templates" special page?
- While editing or previewing a page there ought to be links to the included templates at the bottom, like in MW. Otherwise there's no way to find a link to a template to edit it.
- Just a comment: Links on a page to itself don't appear "properly" (in MW they're bolded and unlinked).
- --Floating World 27-Oct-2009 07:54 PDT
- Thanks for the feedback. Here are some quick responses:
- The #if function is not yet supported, but in the mean time you can use something like Template:If to implement the same functionality. #if will definitely be included in an upcoming release.
- I'll investigate the whitespace in template parameter issues - sounds like a bug. Thanks!
- I'll take a look at the "All Pages" list. I vaguely remember a reason for excluding templates (Mediawiki may exclude them?) but it was a long time ago so I'll need to refresh my memory.
- The "included templates" is something that I believe Mediawiki added since the initial "Links" functionality for JAMWiki was created. It's definitely something that should be included in a future JAMWiki release since users have come to expect that functionality.
- Links to the current page should behave like in Mediawiki, but that may have been overlooked in the initial implementation and no one ever commented. I'll look into getting that fixed for a future release.
- Thanks for the feedback, and if you notice anything else please feel free to report it - users tend to not realize how valuable this sort of feedback actually is, even if it's for items that can't be immediately implemented. -- Ryan • (comments) • 27-Oct-2009 08:14 PDT
- Thanks for all those pointers! I should have said also that the software is really great. As a very solid re-implementation of MediaWiki that gives attention to wikitext compatibility, it's just what I was looking for.
- There's one other point I've been curious about: in the integration of fckeditor you're working on for 0.9 are you able to have it generate wikitext or does it work just in HTML?
- I've been playing around with Dijit.Editor and so I was thinking of trying to integrate it with JAMWiki, although I don't know how much time I'd have to spend on it. (And it would also probably take me a long time because I've never worked in Java or JSP before.) --Floating World 27-Oct-2009 14:25 PDT
- User:ronin started an integration that generated HTML that was then reversed-parsed back into wiki syntax. My preference would be to generate wiki syntax that could then be batch-parsed via Ajax or something similar as the user edited, but I'm not sure how difficult that approach would be. The WYSIWYG editor has turned out to be vastly more complex than initially anticipated, so at this point I'm sort of hoping that either the new CKEditor project or another project has created something that will somewhat simplify the effort. If you're interested in giving it a shot then by all means please do so - from a design standpoint I just want to make sure that the integration isn't too invasive (I'd like to try to implement the client-side WYSIWYG editor without significant impact on the server-side code). -- Ryan • (comments) • 27-Oct-2009 20:27 PDT
- revision 2746 should resolve the template parameter whitespace issue (#2 in the list above). -- Ryan • (comments) • 27-Oct-2009 21:02 PDT
- Also, with regards to #3, I'm seeing templates in the All Pages list - see http://jamwiki.org/wiki/en/Special:Allpages?num=500&offset=0, starting around 250. Are they missing from your wiki? It's entirely possible there's a bug somewhere, I just need to figure out how to reproduce it. -- Ryan • (comments) • 27-Oct-2009 21:08 PDT
- Yes, they are missing. I've created several templates but even though there are only a handful of pages in my wiki, the templates aren't showing up there. In case it helps to reproduce, I chose the "Internal Database" option during setup. --Floating World 31-Oct-2009 12:42 PDT
revision 2763 and revision 2764 add support for the #if: parser function. That code will be included in JAMWiki 0.9.0. -- Ryan • (comments) • 11-Nov-2009 21:48 PST
I've copied the two remaining bug reports from this discussion to Bug Reports#Templates not appearing in AllPages and Bug Reports#Links to Self. I'll copy the comment about included templates to the Feature Requests page. -- Ryan • (comments) • 11-Nov-2009 21:53 PST
[Edit]Adding initial content
Hi.
I need to add about 1000 topics (with files, images, and categories) to the wiki initially after installation. I installed the latest release (0.8.0) and chose to use external DB (MySQL).
After reviewing the database that was created after install, I tried to add some content directly to DB (filled up jam_category, jam_file, jam_file_version, jam_topic, and jam_topic_version tables), but all of the topics I added are shown as "not existing" on Special:Allpages. I reviewed newly inserted data, but didn't find any problems...
What I could miss there?
Thank you!..
Added later: Could this be an issue in character encoding? DB encoding is UTF8, and JAMWiki seems to get the query string correctly (it tells the correct topic name when it says that it's missing)...
- Can you provide a sample (including column name) for one jam_topic record and its current jam_topic_version record? Without access to some sample data this one will be tough to debug remotely :) Thanks. -- Ryan • (comments) • 08-Dec-2009 14:22 PST
- ...also, since you're updating content outside of the normal flow, can you manually clear your cache from Special:Maintenance to ensure that the wiki didn't previously fail to find a topic and then cache the topic name as unavailable? Thanks. -- Ryan • (comments) • 08-Dec-2009 14:35 PST
- Here are the samples:
[Edit]jam_topic
| topic_id |
virtual_wiki_id |
topic_name |
delete_date |
topic_read_only |
topic_admin_only |
current_version |
topic_type |
redirect_to |
| 1673 |
1 |
'Зубов Федор Евтихиев' |
null |
0 |
0 |
1673 |
1 |
null |
[Edit]jam_topic_version
| topic_version_id |
topic_id |
edit_comment |
version_content |
wiki_user_id |
wiki_user_display |
edit_date |
edit_type |
previous_topic_version_id |
characters_changed |
version_params |
| 1673 |
1673 |
|
Зубов Федор Евтихиев (?-1689) — иконописец. etc... |
1 |
127.0.0.1 |
2009-12-08 16:42:38 |
1 |
null |
397 |
null |
-
-
- And by now, I found that probably the problem is the URL/Request encoding, but I don't know how to fight it (I'm a newbie in Tomcat :(). You can see the wiki I'm trying to start in action here (oops, it doesn't respond right now, I submitted a TT to support). You will see the "?? ??????? ????" page - this is one of the pages that was originally added directly to DB. After that I clicked it, and tried to create this page "again" using JAMWiki interface this time. But after saving the page - it's name became a series of question marks (in fact, it created a new page in DB, and called it "?? ??????? ????")
- The data above looks good... I'm unable to access the URL provided, but I don't think you should need any special configuration to get Tomcat working with UTF-8. The database, however, does need to be set up for UTF-8 - on MySQL the command to do so is
create database database-name character set utf8. If you create an ASCII topic does everything work as expected? And if you create a non-ASCII topic using the wiki does it end up corrupted? If so then it's likely a database character set issue. If creating a non-ASCII topic works via the wiki then perhaps your loader is corrupting the data? -- Ryan • (comments) • 08-Dec-2009 16:04 PST
- The website seems to work again. I specified UTF-8 when I was creating the DB. And I forced all of the tables to have UTF8 encoding (
alter table xxx convert character set..., or something like this). The thing that looks strange is that Special:Allpages shows titles correctly, as they are in the DB, but it seems to be unable to find the records in the DB upon retrieval :(. BTW, here are the cases I just tried:
- Created a page with only ASCII chars in title using my app, and it worked OK (the page title is 'An ASCII sample')
- Created a page with non-ASCII chars in title using JAMWiki, and it gave me an error: "A system error has occurred. The error message is: The requested value "??????" was invalid. It may contain one or more characters which cannot be used in titles."
- Created a page with only ASCII chars in title using JAMWiki, and it worked OK (the page title is 'Another ASCII sample')
- Can you provide the stack trace from your JAMWiki logs when you get the system error? It's possible there is a bug in the JAMWiki code somewhere, but I thought that we had worked out the last of the character encoding issues... -- Ryan • (comments) • 08-Dec-2009 16:40 PST
- The log file is empty :( At first there was no access to the directory it wanted to write logs, but I resolved it and the log file was created, but after reproducing the issue again for several times - the log file is empty.
- What I understood by now:
- if I try to create a page with non-ASCII chars in title - it creates the page, but the page title contains question marks instead of non-ASCII chars in DB (while the DB is UTF-8, and jam_topic contains other non-ASCII strings)
- if I try to access a page that does not exist, and type in non-ASCII chars in URL - it writes me that the page doesn't exist, giving me a correct name of the page (ex: The topic "АБВГД" does not currently exist. To create it please follow the link: АБВГД.)
- if I try to access a page that was created in point 1 - it returns an error saying " The requested value "???" was invalid. It may contain one or more characters which cannot be used in titles. "
- If a system error is generated it should definitely write to the logs, so there may be another issue... in any case, "?" is invalid for use in topic titles, which is probably where the error message you're seeing is coming from, although you're right that the root cause is an encoding problem. Just to make sure it's not a bug in the JAMWiki code, can you create a topic such as "АБВГД" on jamwiki.org? Others have been able to do so without issue, but let's just make sure there isn't something unique to your browser setup. If it fails on jamwiki.org let me know the exact steps, although after four years I'll be surprised if we still have problems with character set encoding. Also, thanks for your patience! -- Ryan • (comments) • 08-Dec-2009 17:35 PST
- I've added it - АБВГД :). BTW, I just recalled, that before running it on server I made all the same on my machine, and everything was working... Probably it's the issue with server configuration? But support guys say that URIEncoding is also utf-8, so I just don't know what alse might have a wrong setting...
- My first guess would have been a database encoding problem, the second would have been a JAMWiki bug. Since it seems like neither of those are the culprit I did some googling and found this report of a similar issue with JSPWiki. Perhaps adding the config line to your server.xml file as suggested in the article will help? I'm off to bed for the night, but will check this thread again in the morning. -- Ryan • (comments) • 08-Dec-2009 23:05 PST
- Morning! :). I submitted another question to my hosting support, but earlier they stated that Tomcat's default URIEncoding is UTF-8... What can you suggest about database encoding? Have a look at these screenshots: 1 2 3 4. Could this problem persist because of MyISAM instead of INNODB? -- Shavkat.
- Added later: The web hosting support confirmed, that both connectors HTTP and AJP have a option for UTF encoding.
- Thanks for the screenshots... I was able to access http://www.mytemp.biz/en/Special:Allpages but I was getting memory errors when clicking on a topic that look like they're coming from the database. One question - was the database initially set up as UTF-8, or was it converted after you added initial data? Changing the database character set could be problematic. Otherwise your setup looks good, so I'm a bit confused as to what the problem might actually be... -- Ryan • (comments) • 09-Dec-2009 07:22 PST
- Hi. Thanks for trying to help me, Ryan! I've just recreated everything from scratch, and nothing changed... The database is for some reason created with another charset, but before installing JAMWiki I changed encoding and collation, so all of the tables were created with utf8. The result is the same as it was earlier :(
- (Re-indenting) I've tried accessing your site a few times but I'm consistently getting timeouts and "502 Bad Gateway" errors, which makes me wonder if maybe there are other issues. I've gotten through once and tried creating a topic with non-ASCII characters, and it looks like it created properly but I've been unable to access the site since then. As a result I'm deeply suspicious if there are system errors. Some things to check:
- Look at your
/WEB-INF/classes/logging.properties file and make sure that there are no permission errors for the file that it is writing to (which is specified by the org.jamwiki.pattern property). I think you said you were getting an empty log, so maybe try changing the log location (restart Tomcat) and see if you get some log info. If you do, and if there are errors in the logs, feel free to upload your log file to jamwiki.org and I'll take a look.
- Make sure that the "File-system directory" property (specified on Special:Admin under "Parser Settings) is a directory that you have write permissions for. Make sure that JAMWiki has created a "cache" and "search" folder within that directory.
- Make sure you are using an up-to-date JDBC driver that is appropriate for your Java version. It should be placed in the
/WEB-INF/lib directory.
- Based on the information provided those are my best guesses, and I'd also follow-up with your hosting provider on why the gateway and other failures keep getting generated. Sorry I can't be more help - if you find any new info feel free to post here. -- Ryan • (comments) • 09-Dec-2009 20:59 PST
- Thanks for your help again, Ryan. I have contacted support about those errors recently, and they responded that "you have a shared JVM, so if other users restart it - you can experience temporary 502-503 errors". I am frustrated with it, but I don't want to pay more for hosting on this stage...
- In fact it creates pages with non-ASCII characters in title, but it writes a series of question marks into the database instead of the title itself. I know two reasons why this might happen:
- # wrong URI encoding, but a) the tomcat's server.xml has HTTP connector's URIEncoding=utf8; and b) when you enter an URL for missing topic, the wiki suggests to create it with a correct name (not a series of question marks) - this means that the URI comes through tomcat with a correct encoding.
- # wrong database encoding, but a) if I add a topic into the database manually - it is added in correct encoding, and b) JAMWiki can read those topics in correct encoding (because it shows correct titles on "Special:Allpages").
- One more thing is MySQL connection encoding - but I'm not sure about those details.
- Anyway, today I will give it a try on another server.
- Ok, it's been more than a day, but I have finally been able to start up the project. I started it on a machine that I have full access to, so I could make any configuration changes I needed. Thank you very much for your help, Ryan, and I'm very sorry for taking so much of your time... :(
- Right now, I have one last question - is the underscore supported in file names (ex. images)? I've found here that it's "partially resolved" - so is there a way I can upload correct records into DB so that image names with underscore are handled correctly? Currently they look like missing throughout the wiki pages...
- Thank you! -- Shavkat.
- Glad it's working! Underscores should be converted to spaces in topic names (including Image: topics) but the actual file itself can have underscores - see for example Image:activation link.jpg (space in topic name) which links to the file http://jamwiki.org/files/2007/7/activation_link-27035518.jpg (underscore in file name). -- Ryan • (comments) • 11-Dec-2009 14:15 PST
- Wow, that was easy, I wonder why I didn't find this out myself! :) Thank you! Overall - from what I found by now - JAMWiki is a great project, perfectly balanced and it's really fast. During the last week I installed it 20+ times using different configurations, and I found it always easy to install and maintain, also - a very clean DB structure helps in my case. Just for statistics, if you are interested, I have loaded 2000+ articles into JAMWiki, and didn't notice ANY performance issues... I think that's really cool :). I wonder if it will handle 50 000, but I believe there won't be any issues except for DB server performance optimizations...
- Thank you again, and all the best! :) -- Shavkat.
- Glad it's working, and thanks for the feedback! As to performance, see Tech:Performance for additional information - when it's released 0.9.0 will contain several significant performance improvements. I'm in the process of creating a wiki instance with five years of history and ~100,000 topics, so scalability should improve as well. -- Ryan • (comments) • 13-Dec-2009 18:46 PST
[Edit]Setting up a "private" wiki
I've got an installation of 0.8.0 running in Resin. (Congrats on the 0.8.0 release btw, it's excellent.) I want to set it up so that only logged-in users can see the content, ideally something along the lines of what you'd get with HTTP authentication turned on for HTML pages (although the solution does not have to involve HTTP authentication.) So what would be the best-practice way of doing that? I looked in Tech comments:User Permissions and Tech:User Permissions but didn't see anything on this. --Floating World 12-Dec-2009 10:42 PST
- I need to add an informational page on access control :) I have a personal wiki that is read-protected (this sounds like what you want) by disabling all permissions for GROUP_ANONYMOUS on Special:Roles. Note that if anonymous permissions are removed then there will NOT be a way for new users to register - if you want to create new user accounts you would need to re-enable ROLE_VIEW permissions for anonymous users, register the new account, then again disable ROLE_VIEW - there is an open feature request to make that process less clunky, but it hasn't yet been implemented. Modifying
/WEB-INF/classes/applicationContext-security.xml offers additional opportunities to customize login options. -- Ryan • (comments) • 13-Dec-2009 18:43 PST
- I'm also trying to set up a private wiki for a small IT group to share information. When I remove all roles from GROUP_ANONYMOUS, the default page starts auto-redirecting to jamwiki/null/Special:Login which gets a 404 not found. I have to manually change the "null" to "en" in my browser address bar to get back into the wiki. I think this is a bug... Another issue is that the LeftMenu entries on the left side of the page are still visible even without logging in... (I don't want anonymous users to see *anything* but the logon form) Both issues exist on 0.8.2 and trunk build (as of yesterday.) --Arthur Blake 19-Feb-2010 14:11 PST
[Edit]Performance
I'm testing jamwiki 0.8.0 with an external oracle db on the same machine. To test performance I have built a spamer machine that generates and delivers (using http) random articles (approx. 10k each). The first few take between 1 and 2 seconds to load but then it slows down quickly to about 8-10seconds each. Debugging shows that the bulk of the time is consumed by the search engine for indexing. I see that this will improve with the next release but still I am wondering because the 0.* secs mentioned there for 0.8.0 are still way faster than my 1.* secs and I think my machine is quite fast. Any wild guess what could account for that? And is it possible to defer indexing? 95.115.141.6 12-Jan-2010 03:18 PST
- Those times seem excessive - at my former job on a box using a remote Oracle database with older hardware topic creation/update times were less than a second. How many topics do you have? If there are tens of thousands (or more) then it's possible that the search engine indexing might take a while, but if you only have a few thousand topics it should be reasonable. -- Ryan • (comments) • 12-Jan-2010 07:59 PST
- There are 7,760 articles. Loading looks like
19:22:24,626 ERROR [STDERR] Jan 11, 2010 7:22:24 PM org.jamwiki.utils.WikiLogger warning
WARNING: Slow page loading time: /jam8/en/Special:Edit (10.142 s.)
19:22:35,155 ERROR [STDERR] Jan 11, 2010 7:22:35 PM org.jamwiki.utils.WikiLogger warning
WARNING: Slow page loading time: /jam8/en/Special:Edit (10.517 s.)
19:22:45,298 ERROR [STDERR] Jan 11, 2010 7:22:45 PM org.jamwiki.utils.WikiLogger warning
WARNING: Slow page loading time: /jam8/en/Special:Edit (10.118 s.)
19:22:55,234 ERROR [STDERR] Jan 11, 2010 7:22:55 PM org.jamwiki.utils.WikiLogger warning
WARNING: Slow page loading time: /jam8/en/Special:Edit (9.926 s.)
19:23:05,444 ERROR [STDERR] Jan 11, 2010 7:23:05 PM org.jamwiki.utils.WikiLogger warning
WARNING: Slow page loading time: /jam8/en/Special:Edit (10.201 s.)
19:23:15,444 ERROR [STDERR] Jan 11, 2010 7:23:15 PM org.jamwiki.utils.WikiLogger warning
-
- Articles look like "Omsharat buze lutof yseir lushte djynu gedjfe eizphe toto eteept eimfor fothepteipha einluk neeiphdjeirzou ag. Shokasuzeathdylusshooph ebrysh ureitheiheirdjeib, lop, belom ru. Agrothokulupdjadjok tuzashul, o moodban. Adjeth buso fedjsheizugbypho obamphei eigesh. Eneiboradj. Ypt ruloz tufhor ahaphy mabeib aeimgydje eshhofon oeph aur uyfsu gapt ptyeth, ebsolei." but to a length of ~10k. 95.115.141.6 12-Jan-2010 08:23 PST
- Um, I had several retries with different tests. Can it be that when I tell jamwiki to use the same directory for system files each time that it has to deal with far more than the articles currently in the db? 95.115.141.6 12-Jan-2010 08:32 PST
- Sorry, I'm not sure I understand the previous question. One additional thing to look at might be changing your log level to "FINE" and seeing if any additional messages are generated that could help track down the problem. There was a bug in 0.8.0 (fixed in 0.8.1) that could fail to release database connections in some instances, but if that were the case I think you'd see a different message so I'm not sure that's the problem. In any case, ten seconds is most definitely not normal, so either there is something odd about your configuration or else your configuration for some reason hits a JAMWiki bug that no one else has yet experienced or reported... additional info from the more detailed log level would definitely be useful. -- Ryan • (comments) • 12-Jan-2010 09:39 PST
- Thank yo so far. I will try to have a closer look, than I'll post again. 95.112.191.250 13-Jan-2010 09:41 PST
[Edit]Security Hole?
The method of disabling all permissions that you describe above basically works for me, thanks, but I notice that when I'm logged out it still appears to be possible to access images and other uploaded files. --Floating World 28-Dec-2009 03:42 PST Oh, wait, I was totally wrong about that. It must have been the browser caching or something. --Floating World 28-Dec-2009 04:04 PST
[Edit]Orphaned Pages
I have changed my viewOrphanedPages in ItemsServlet a bit, so that some namespaces (user, user_comments, e.g.) aren't displayed. This should also increase performance a little, although in my tests it changes very, very little. Of couse, querying less entries from db would be great, but this one was easier to implement and needs no testing on database-layer...
private void viewOrphanedPages(HttpServletRequest request, ModelAndView next, WikiPageInfo pageInfo) throws Exception {
String virtualWiki = pageInfo.getVirtualWikiName();
Pagination pagination = ServletUtil.loadPagination(request, next);
Set<String> allItems = new TreeSet<String>();
List<String> unlinkedTopics = WikiBase.getDataHandler().getAllTopicNames(virtualWiki);
Topic topic;
List<SearchResultEntry> topicLinks;
ParserInput parserInput;
ParserOutput parserOutput;
for (String topicName : unlinkedTopics) {
if (!isInNamespace(topicName,
NamespaceHandler.NAMESPACE_USER,
NamespaceHandler.NAMESPACE_USER_COMMENTS,
NamespaceHandler.NAMESPACE_COMMENTS,
NamespaceHandler.NAMESPACE_CATEGORY_COMMENTS,
NamespaceHandler.NAMESPACE_IMAGE_COMMENTS)) {
the helping method isInNamespace:
private boolean isInNamespace(String input, String... namespaces) {
for (String ns : namespaces) {
if (StringUtils.startsWith(input, ns + NamespaceHandler.NAMESPACE_SEPARATOR))
return true;
}
return false;
}
I don't know if anyone else is interested in this interpretation of orphaned pages, for me it doesn't make sense displaying category-comments here. --hp 07-Jan-2010 01:49 PST
- One of the changes that I'd like to make for 0.9.0 is to split out namespaces from topic names. This would allow localization of the namespace names, search within namespaces, easier Mediawiki import, and a number of other nice features. Would that help out your implementation? I'm hoping to get that done soon, although I start a new job on Monday and don't know how much time it will take up.
- Also, feel free to update the "orphaned pages" code on trunk if you're interested - it's not functionality that I use much, so at this point I'm sure you're the expert on it and I'm more than comfortable with you making changes. -- Ryan • (comments) • 07-Jan-2010 22:09 PST
[Edit]remove version history
Is there a way to remove the version history of pages? The only possibility to do that in my mind is simply to delete the history data in the wiki database. Or is there some configuration parameter which I can set to deaktivate this feature?
Why do I want to do that anyway? I use JamWiki for purely my personal usage in a access restricted network so the version history naturally gets much bigger than my current data version. To save space I want to delete the data which is unnecessary in my case.
- Since the version history is a key component of a wiki there is currently no automated way to remove it, although as you've stated you can always delete the non-current records from the jam_topic_version and jam_file_version tables. -- Ryan • (comments) • 25-Jan-2010 07:42 PST
- Many thanks for clarifying! --217.255.224.54 25-Jan-2010 10:55 PST
[Edit]Wikia WYSIWYG editor
I haven't had any time to play around with trying to integrate a WYSIWYG editor into JAMWiki but I thought it might be worthwhile to note that Wikia's use of their editor (I don't know which one they use) seems to be pretty sophisticated and they appear to have worked out or be in the process of working out accomodations with some of the higher-level MediaWiki functionality like templates and image embedding. --Floating World 01-Feb-2010 08:37 PST
- Thanks! Every time I look at the work required to implement a WYSIWYG editor properly it's been daunting, so I'll take a look at what Wikia has done in the hopes that it can be re-used. -- Ryan • (comments) • 01-Feb-2010 11:41 PST
[Edit]Ars Technica: Getting over the barriers to wiki adoption
Another tidbit that might be of interest:
http://arstechnica.com/business/news/2010/02/getting-over-the-barriers-to-wiki-adoption.ars
The author is writing a book about wikis. --98.229.138.91 02-Feb-2010 05:21 PST