This page is an archive of Bug Reports resolved during the JAMWiki 0.8.x release cycle. See Bug Reports/Resolved for an index of all resolved bug reports.
Per http://en.wikipedia.org/wiki/Help:Moving_a_page, Mediawiki does not allow renaming of images or categories. Renaming a category on JAMWiki works provided the category is still in the correct namespace, so there might be some wiggle room here. Note that renaming a category to an article namespace breaks badly. -- Ryan • (comments) • 06-May-2009 16:01 PDT
If a page is currently a redirect then it is not possible to view its history. See http://jamwiki.org/wiki/en/Special:History?topicVersionId=12286&topic=Test. -- Ryan • (comments) • 29-Jun-2009 08:22 PDT
When a signature (~~~~) is used as content in a template ({{alert | ~~~~ }}) the signature is not parsed when the content is saved, meaning that every user who then views the page containing that template sees their own signature. -- Ryan • (comments) • 26-Aug-2009 10:31 PDT
Moved from the Feedback page:
Anybody here to tell me how to add user signatures to templates? ~~~~ expands immediately, fiddling around with <includeonly> doesn't yield a satisfying result, it doesn't became clearer after reading Mediawiki doc. Thanx! -- fmr 20-Apr-2007 03:13 PDT
I use tomcat.
I had the following problem with images : when I did upload images (png, gif, etc.) it wasn't recognized as an image. So I wasn't able to emmbed pictures in my pages. I finally decided to take a look at the code.
JamWiki uses the JDK to detect if an upload is an image => the class ImageUtil has a method public static boolean isImage(File file) which indirectly uses javax.imageio.ImageIO.
When ImageIO tries to load an image it uses a temporary directory which is given by the Cache Directory (see class ImageIO$ClassInfo).
Unfortunately, tomcat declares a temporary directory that does not exist by default (CATALINA_TMPDIR):
Using CATALINA_BASE: /opt/tomcat Using CATALINA_HOME: /opt/tomcat Using CATALINA_TMPDIR: /opt/tomcat/temp Using JRE_HOME: /usr/lib/j2sdk1.5-sun/
One of these solutions should be interesting :
ImageIO's Cache Directory and map it in the system directory of the wiki to prevent people from meeting this kind of failure (which is impossible to understand without taking a look at the code).ImageIO.setCacheDirectory() will definitely be the way to go. I'm at work currently but will try to get a patch whipped up as soon as I get a chance. As an aside, what version of Linux / UNIX are you using where the default Tomcat install uses invalid directories? -- Ryan • (comments) • 13-Jul-2009 07:48 PDT
Using MSSQL as Backend, sort_key in jam_category is null if no entry contains [[Category:X|sortX]]. Executing STATEMENT_SELECT_CATEGORIES bring results in form:
| category_name | sort_key |
|---|---|
| Category:A | NULL |
| Category:B | SortkeyB |
| Category:B | NULL |
| Category:C | NULL |
Special:Categories displays Category:B only once, so pagination doesn't work correctly. E.g. num=50&offset=0 displays 45 entries (while the statement returns 50).
How should the resultset look like (or how does it look on other database-systems)?
Thanks for help! --hp 25-May-2009 01:15 PDT
I am using Jamwiki 0.7.1 and I implemented a custom authenticator as Spring UserDetailsService. Jamwiki however dies with error:
javax.servlet.ServletException: java.sql.SQLException: ORA-01400: cannot insert NULL into ("JAMWIKI.JAM_USERS"."PASSWORD")
This is a failure with either logic in JamwikiPostAuthenticationFilter or in database schema, or just issue with Oracle backend (or issue with me :)). JAM_USERS has password field declared as not null. However, in filter there are the following lines that set the authenticated password as empty:
// default the password empty so that the user cannot login directly String encryptedPassword = ""; WikiBase.getDataHandler().writeWikiUser(user, username, encryptedPassword);
This again fails in AnsiDataHandler on line 1682 where a new user is created with a empty password. This is an issue at least with Oracle, as it seems to consider an empty string \'\' as null.
I'm not sure which is the proper way to fix this. A crude one is to remove not null constraint and insert some magic number in ENABLED column to indicate external login only.
/WEB-INF/applicationContext-security.xml and modify the <authentication-provider> entry? Assuming another <authentication-provider> is specified then there shouldn't need to be a jam_users entry, although it's entirely possible there's a bug somewhere that your configuration might be triggering. -- Ryan • (comments) • 10-May-2009 21:09 PDTThere's already been discussion about this subject, but there still seems to be no fix available. A simple fix is to read the location of jamwiki.properties from Java system properties (as set up with "-D" parameter on server startup). For eg., in class Environment.java replace line
private static final String PROPERTY_FILE_NAME = "jamwiki.properties";
with (for example):
private static final String PROPERTY_FILE_NAME =
System.getProperty("jamwiki.property.file", "jamwiki.properties");
Now you can set it up when server starts and point to your location. This works at least as long as jamwiki is able to read something outside the war.
Move from FAQ:
We've been running Jam Wiki for several months now and our Oracle database password just changed. How can we update the password at this point? I tried WEB-INF/classes/jamwiki.properties, but that does not seem to help.
Thanks, Ryan, but my Oracle account gets immediatelly locked once I go to this page.
* JAMWiki 0.8.0 * Postgresql 8.3.0 * JDBC postgresql-8.3-604.jdbc4.jar (also tried jdbc3 version)
I tried to install the JAMWiki beta 0.8.0 version, using a Postgresql database, which produced immediately after pressing the 'Save changes' button the following message:
An unknown system error has occurred. The error message is: org.postgresql.util.PSQLException: Returning autogenerated keys is not supported..
Installing the JAMWiki version 0.7.2 works perfectly fine.
Hope anyone can help, I'm stuck here...
Regards.
It is possible to create a topic name that starts with "/" that can then never be viewed or deleted. Topics starting with "/" should be considered invalid topic names and generate errors before they are created. -- Ryan • (comments) • 27-Oct-2009 21:13 PDT
When editing the content of a category with the latest trunk code (0.8.0 beta 3), the "Preview" functionality shows the text below the list of categories, while the actual category view shows it above the list of categories. -- Ryan • (comments) • 30-Oct-2009 13:46 PDT
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? -- Floating World 27-Oct-2009 07:54 PDT
Confirmed as still present in the GA release of 0.8.0. --Floating World 12-Dec-2009 12:48 PST
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
While performing upgrade from 0.7.2 to 0.8.0 two optional step failed.
System specifications are: apache-tomcat-6.0 and mysql-5.1 with Java5 on RHEL5.
Here is the Upgrade Successful page from JAMWiki.
Upgrade successful: ScienceStudio Modified database column "group_id" in table "jam_group". Modified database column "id" in table "jam_group_members". Modified database column "topic_id" in table "jam_topic". Modified database column "topic_version_id" in table "jam_topic_version". Modified database column "virtual_wiki_id" in table "jam_virtual_wiki". Modified database column "file_id" in table "jam_file". Modified database column "file_version_id" in table "jam_file_version". Modified database column "wiki_user_id" in table "jam_wiki_us er". Added database table "jam_log". Added database column "wiki_user_display" to table "jam_topic_version". Dropped database column "wiki_user_ip_address" from table "jam_topic_version". Added database column "wiki_user_display" to table "jam_file_version". Dropped database column "wiki_user_ip_address" from table "jam_file_version". Added database column "version_params " to table "jam_topic_version". Dropped database table "jam_recent_change". Added database table "jam_recent_change". An optional step has failed while upgrading the system. The upgrade will continue and the system will function normally, but view the logs to determine what steps may have failed. Please see the /WEB-INF/UPGRADE.txt document for manual upgrade steps and report any errors in the logs at jamwiki.org. The error message is: You can't specify target table 'jam_topic_version' for update in FROM clause Added new record(s) to table "jam_role". Added new record(s) to table "jam_authorities". An optional step has failed while upgrading the system. The upgrade will continue and the system will function normally, but view the logs to determine what steps may have failed. Please see the /WEB-INF/UPGRADE.txt document for manual upgrade steps and report any errors in the logs at jamwiki.org. The error message is: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '|' Updated stylesheet for virtual wiki "en".
First warning from log:
WARNING: Failure while updating edit_type value in jam_topic_version. See UPGRADE.txt for instructions on how to manually complete this optional step.
java.sql.SQLException: You can't specify target table 'jam_topic_version' for update in FROM clause
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2362)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2280)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2265)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
at org.jamwiki.db.AnsiQueryHandler.executeUpgradeUpdate(AnsiQueryHandler.java:406)
at org.jamwiki.db.AnsiDataHandler.executeUpgradeUpdate(AnsiDataHandler.java:369)
at org.jamwiki.db.DatabaseUpgrades.upgrade080(DatabaseUpgrades.java:340)
at org.jamwiki.servlets.UpgradeServlet.upgradeDatabase(UpgradeServlet.java:210)
...etc...
Second warning from log:
WARNING: Failure during upgrade while reloading log items. Please use the Special:Maintenance page to complete this step.
org.jamwiki.DataAccessException: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '|'
at org.jamwiki.db.AnsiDataHandler.reloadLogItems(AnsiDataHandler.java:1428)
at org.jamwiki.servlets.UpgradeServlet.upgrade(UpgradeServlet.java:115)
at org.jamwiki.servlets.UpgradeServlet.handleJAMWikiRequest(UpgradeServlet.java:67)
at org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal(JAMWikiServlet.java:242)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:169)
at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
...etc...
# this statement is ugly and inexact - anyone who can write an ANSI version that is cleaner
# or more accurate, please do so and submit it to jamwiki.org.
UPGRADE_080_UPDATE_TOPIC_VERSION_UPLOAD_EDIT_TYPE = \
update jam_topic_version set edit_type = 9 \
where jam_topic_version.topic_version_id in ( \
select jam_topic_version.topic_version_id \
from jam_topic_version, jam_file, jam_file_version \
where jam_topic_version.topic_id = jam_file.topic_id \
and jam_file.file_id = jam_file_version.file_id \
and extract(year from jam_topic_version.edit_date) = extract(year from jam_file_version.upload_date) \
and extract(month from jam_topic_version.edit_date) = extract(month from jam_file_version.upload_date) \
and extract(day from jam_topic_version.edit_date) = extract(day from jam_file_version.upload_date) \
and extract(hour from jam_topic_version.edit_date) = extract(hour from jam_file_version.upload_date) \
and extract(minute from jam_topic_version.edit_date) = extract(minute from jam_file_version.upload_date) \
and (abs(extract(second from jam_topic_version.edit_date) - extract(second from jam_file_version.upload_date)) < 3) \
)
/WEB-INF/classes/mysql.properties file using this version. -- Ryan • (comments) • 09-Dec-2009 20:41 PSTThe Upgrade-Wizzard fails with the following Message:
Failure while updating edit_type value in jam_topic_version. See UPGRADE.txt for instructions on how to manually complete this optional step.
I manually executed the following Statement on the database, which seems to work for me:
update jam_topic_version set edit_type = 9
where jam_topic_version.topic_version_id in (
select jam_topic_version.topic_version_id
from jam_topic_version, jam_file, jam_file_version
where jam_topic_version.topic_id = jam_file.topic_id
and jam_file.file_id = jam_file_version.file_id
and DATEDIFF(s, jam_topic_version.edit_date, jam_file_version.upload_date) < 3
)
Have a nice day! --hp 05-Jan-2010 05:26 PST
In sql.mssql.properties the statement STATEMENT_SELECT_TOPIC_HISTORY is missing an "+ ' " after CONVERT(VARCHAR, @TOPIC_ID). I think Line 366 should be 'WHERE jam_topic.topic_id = '+CONVERT(VARCHAR, @TOPIC_ID)+ ' ' \ instead.
Line 365 + ') ' \ Line 366 + 'WHERE jam_topic.topic_id = '+CONVERT(VARCHAR, @TOPIC_ID) ' \ Line 367 + 'AND jam_topic.topic_id = jam_topic_version.topic_id ' \
After changeing this one, the Line 331 must be changed to a bigger varchar value, the statement exceeds the 300 (I simply turned it into varchar(3000)).
The created statement @SQL looks now like:
select * from ( select top 3 * from ( select top 101 * from ( SELECT jam_topic_version.topic_version_id, jam_topic.topic_id, jam_topic.topic_name, jam_topic_version.edit_date as change_date, jam_topic_version.wiki_user_id, coalesce(jam_wiki_user.login, jam_topic_version.wiki_user_display) as display_name, jam_topic_version.edit_type, jam_virtual_wiki.virtual_wiki_id, jam_virtual_wiki.virtual_wiki_name, jam_topic_version.edit_comment as change_comment, jam_topic_version.previous_topic_version_id, jam_topic_version.characters_changed, null as log_type, jam_topic_version.version_params as log_params FROM jam_topic, jam_virtual_wiki, jam_topic_version LEFT OUTER JOIN jam_wiki_user ON (jam_wiki_user.wiki_user_id = jam_topic_version.wiki_user_id) WHERE jam_topic.topic_id = 4 AND jam_topic.topic_id = jam_topic_version.topic_id AND jam_topic.virtual_wiki_id = jam_virtual_wiki.virtual_wiki_id AND jam_topic.delete_date is null order by change_date desc ) as jam_recent_change ) a order by change_date) b order by change_date desc
The last problem with it is the inner select, because it is ordered by change_date but doesn't selects 'TOP', so MS-SQL throws an error. Possible solutions are removing the "order by change_date desc" or changeing "SELECT jam_topic_version.topic_version_id..." to "SELECT TOP <put a number of maximum selected versions here> jam_topic_version.topic_version_id...". I removed line 370, now my history is displayed. --hp 05-Jan-2010 06:04 PST
null as log_type line is there to solely for code-reuse purposes - the results get stored in a org.jamwiki.model.RecentChange object, and initialization of that object with a ResultSet expects a log_type field to be available. However, since log messages aren't displayed in topic history the field is simply initialized to null. These changes will be included in 0.8.2, although that release probably won't go out for another month or so. -- Ryan • (comments) • 06-Jan-2010 09:15 PST
Like reported for Version 0.7, there is still a small bug in STATEMENT_SELECT_CATEGORIES for mssql... The number of results breaks pagination, because the number of different categories (for display) doesn't match the number of the selected ones.
I simply changed the inner select from STATEMENT_SELECT_CATEGORIES in sql.mssql.properties to
+ 'select distinct top '+CONVERT(VARCHAR, @OFFSET + @LIMIT)+' jam_category.category_name, sort_key=null '
so pagination does work, of course sort_key doesn't.
What should the result look like? If a category 'X' has two sort keys (AX and ZX for example), should the category be listed three times in Special:Categories? (If so, viewCategories in CategoryServlet must be changed) Or should the category 'X' be displayed only once in first appearance of (AX, X, ZX)? (Then of course the statement must be changed). Any other solutions?
Thanks for help!!! --hanspeterklapf 07-Jan-2010 00:43 PST
For MS-SQL STATEMENT_SELECT_LOG_ITEMS_BY_TYPE and STATEMENT_SELECT_LOG_ITEMS must be changed... The where-clause in the inner select appends @VWIKI_ID respectively @LOG_TYPE from type int, so they must be converted or casted. This change works for me:
STATEMENT_SELECT_LOG_ITEMS
+ 'where virtual_wiki_id = '+CAST(@VWIKI_ID AS VARCHAR) \
STATEMENT_SELECT_LOG_ITEMS_BY_TYPE
+ 'where log_type = '+CAST(@LOG_TYPE AS VARCHAR)+' and virtual_wiki_id = '+CAST(@VWIKI_ID AS VARCHAR) \
Thanks!! --hp 07-Jan-2010 01:09 PST
After upgrading to 0.8.1 the STATEMENT_SELECT_WATCHLIST_CHANGES is broken. in the innner select, edit_date is named change_date, so the outer selects must be ordered by change_date:
+ 'order by edit_date desc '\
+ ') a '\
+ 'order by change_date '\
+ ') b '\
+ 'order by change_date desc '\
Also the length of @SQL exceeds its varchar, varchar(5000) works for me. Nice Day (and no more bug reports from me :) ), --hp 07-Jan-2010 03:20 PST
Also must be convert @VWIKI_ID as vachar:
on line 226
+ 'where virtual_wiki_id = '+ @VWIKI_ID \
on line 255
+ 'where log_type = '+@LOG_TYPE+' and virtual_wiki_id = '+@VWIKI_ID \
the lost "space" and "quote": on line 366
+ 'WHERE jam_topic.topic_id = '+CONVERT(VARCHAR, @TOPIC_ID) ' \
Also error in query (STATEMENT_SELECT_TOPIC_HISTORY)
on line 370
+ 'order by change_date desc ' \
"The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified."
there must either write "top" or remove sorting
Moving Tech talk:Transactions to Tech comments:Transactions created a link to a non-existent topic and wiped out the history of the original article when accessed from the "History" tab. The history was still available by manually typing in the topic version ID, and a Special:RecentChanges entry was correctly created. There was no indication in the logs of what might have happened. Trying to reproduce the issue locally has thus far been unsuccessful, so this one will probably require some digging into the database to see what happened. -- Ryan 10-Apr-2008 02:27 PDT
The Migration-Tool in the admin section fails in 7.2 while trying to migrate the DB from MS-SQL to PostgreSQL 8.4 (postgresql-8.4-701.jdbc4.jar) with the message "Large Objects may not be used in auto-commit mode". Does anyone knows a work-around for this? Thanks in advance, --hp 28-Dec-2009 02:50 PST
I just upgraded from 0.6.7 to 0.8.2 and the upgrade was simple and without incident. The only problem I found is that a link on my StartingPoints page to a virtual wiki shows up as bolded text instead of a link. The same link works from the left menu and from every other page I've tested. I also tested links from the virtual wiki back to the default wiki and it had the same problem. My like is of the form
* [[:Hyperion:StartingPoints | Hyperion Wiki]]
Not really a big problem for me since I keep the same link in the left menu so I have the link I need but just wanted to report the problem. --Tom Schueller 28-Jan-2010 21:41 PST
I upgraded my version of jamwiki from 0.6.6 to 0.8.2. Foor safety reasons I went thru all of the versions step by step. The version I have installed works fine until we try to save a topic. When doing so we get the following error:
org.jamwiki.DataAccessException: java.sql.SQLException: Cannot insert an explicit value into a timestamp column. Use INSERT with a column list to exclude the timestamp column, or insert a DEFAULT into the timestamp column..
I have installed the wiki on the following systems: wiki database is installed on a SQL 2008 server on windows 2003 OS wiki webpages are installed on on windows 2003 OS with Tomcat 5.5 webserver JDBC version is 3.0 (used different versions to check if that was the problem
--Angel 25-Feb-2010 03:12 PST
I found the problem. Wile upgrading to the current version I had to manually execute the sql statement. When doing so I use the guidelines in de upgrade.txt file. In this file there where some non ms sql satements which I thought I translated correctly. Today I looked at the sql.mssql.properties file and found my mistake on the timestamp column. Maybe you can reffer to taht file in de upgrade.txt so the correct statement can be used is upgrading manually
--Angel 05-Mar-2010 02:21 PST
The login has an xss problem:
http://jamwiki.org/wiki/en/Special:Login?message=<script>alert("xss")</script>
frafu 04-Mar-2010 00:10 PST
See Test Table indent. Reported by User:RudiWiesmayr. -- Ryan • (comments) • 10-Mar-2010 22:30 PST