Hi all,
there is possibly a litte bug I stumbled upon while writing multi-
lingual support in XMLRPC API.
Actually I am not sure if it's a bug or it is due to the fact that I
am not doing things properly.
Anyway what happens is the following: after that I successfully store
a new translation for a page in a "random" language X (where X is a 4-
character string) the subsequent calls to getDocument(pageId) return a
document that has the content of the "default" language page but,
instead of having the language field set to "", it has this field set
to "X".
So basically XWiki returns a document that appears to be in language
"X" but it is actually the document in the default language.
Other strange things happened while playing with that support, for
example using the web interface at a given time new pages started to
be created by using one of the "random" languages X as the default one
(I am trying to reproduce this but I cannot :( )
Basically this is the code I am using for storing a new translation
(i.e., a translation that didn't exist before):
com.xpn.xwiki.XWiki baseXWiki = xwikiXmlRpcContext.getBaseXWiki();
XWikiDocument xwikiDocument = baseXWiki.getDocument(pageId,
xwikiXmlRpcContext.getXWikiContext());
xwikiDocument.setLanguage(lanuage);
doc = new Document(xwikiDocument, xwikiXmlRpcContext.getXWikiContext());
doc.setContent(content);
doc.save();
Do you see anything wrong here so far?
Thanks.
Cheers,
Fabio
To reproduce, goto /trunks/xwiki-platform-core/xwiki-core and execute `mvn
install`
i get the following,
<DUMP>
[INFO] Starting audit...
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:110:
warning: Comment matches to-do format 'TODO:'.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:256:
warning: Comment matches to-do format 'TODO:'.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:258:27:
The String "Failed to load internationalization document bundle [" appears 2
times in the file.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:259:23:
The String "]." appears 2 times in the file.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:276:64:
Expected @param tag for 'defaultLanguage'.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:278:9:
Declaring variables, return values or parameters of type 'ArrayList' is not
allowed.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:297:
warning: Comment matches to-do format 'TODO:'.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:307:5:
Missing a Javadoc comment.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/plugin/fileupload/FileUploadPlugin.java:236:
warning: Comment matches to-do format 'TODO:'.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/plugin/zipexplorer/ZipExplorerPlugin.java:289:
warning: Comment matches to-do format 'TODO:'.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/plugin/zipexplorer/ZipExplorerPlugin.java:315:
warning: Comment matches to-do format 'TODO:'.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/plugin/zipexplorer/ZipExplorerPlugin.java:319:
warning: Comment matches to-do format 'TODO:'.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/plugin/zipexplorer/ZipExplorerPlugin.java:325:
warning: Comment matches to-do format 'TODO:'.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/store/hibernate/HibernateAttachmentRecycleBinStore.java:32:8:
Unused import - com.xpn.xwiki.XWiki.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/store/hibernate/HibernateAttachmentRecycleBinStore.java:125:31:
The String "unchecked" appears 2 times in the file.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/store/hibernate/HibernateAttachmentRecycleBinStore.java:131:43:
The String "docId" appears 2 times in the file.
/home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/store/hibernate/HibernateAttachmentRecycleBinStore.java:136:69:
The String "date" appears 2 times in the file.
Audit done.
[INFO] There are 9 checkstyle errors.
[WARNING] Unable to locate Source XRef to link to - DISABLED
[INFO] Ending forked execution [fork id: 341048484]
[ERROR]
Mojo:
org.apache.maven.plugins:maven-checkstyle-plugin:2.1:check
FAILED for project:
com.xpn.xwiki.platform:xwiki-core:jar:1.4-SNAPSHOT
Reason:
You have 9 checkstyle violations.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run with the -e flag
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILED
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 minute 6 seconds
[INFO] Finished at: Thu Apr 03 18:18:24 LKT 2008
[INFO] Final Memory: 9M/24M
[INFO]
------------------------------------------------------------------------
</DUMP>
Could I be doing anything wrong ?
Thanks.
- Asiri
The XWiki development team is pleased to announce the release of XWiki
Enterprise1.4 Milestone 1.
Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
First milestone of the XWiki Enterprise 1.4 version.
Note that general goals for XWiki Enterprise 1.4 are:
* Switch to Java 1.5
* Improved stats performances
* XMLRPC improvements
* Improved performances (less Javascript files, more optimized
CSS, better caching, etc)
* Skins extensions
* Bug fixes
* More automated tests
For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise14M1
Thanks -The XWiki dev team
Hi,
Since XWiki Enterprise 1.4M1 has been delayed by 1 week we have to
modify the planning a bit.
So here are the proposed dates:
* XE 1.4 M1 - Tomorrow
* XE 1.4 M2 - April 3rd
* XE 1.4 RC1 - April 25
* XE 1.4 RC2 - May 8
* XE 1.4 Final - May 13
Let me know if you have any concern with these dates.
Thanks,
--
Jean-Vincent Drean
Hi,
I need to write the following xwiki extension:
- Able to store objects with a part number and part description property
- XWiki users need to be able to change part descriptions
- When clicking on a part (in the table), users can cerate/edit an xwiki
page with the full description
- Display these items in a table, and link to a page with the part number as
title (in a specific space)
- We currenly have a csv export of the parts database, and would like to be
able to upload this to xwiki
- Later on, when uploading the csv again, the system needs to only create
newer parts in xwiki, and leave the existing ones intact.
- Exporting a csv from xwiki would be great as well
I would create a class with a part number property and part description, and
know how to display these in a grid, but am not sure on how to import a
csv.I don't have any programming experience in xwiki, so how would you
suggest to do this.
Best regards,
Leen Toelen
I'd like to release XE 1.4M1 as soon as possible. It has the following
changes compared to 1.3 :
Release Notes - XWiki Platform - Version 1.4 M1
----------------------------------------------------------------------
Bugs
====
XWIKI-2206 : Cookie domains not compliant with RFC 2019
XWIKI-2130 : Document.getPreviousDocument() and
Document.getPreviousVersion() seems not to work
XWIKI-2255 : Exception while saving some documents
XWIKI-1252 : Blog comment page missing elements like stylesheet
XWIKI-2210 : Can't use differents uid name configuration for the same
ldap server for two differents wikis
XWIKI-2211 : Cannot log in using Internet Explorer
XWIKI-2214 : Changing parameters of number properties fails
XWIKI-2248 : DBTreeListClass needs to support translations
XWIKI-1067 : Generated HTML IDs should be unique for all items when
using a checkbox List as a Class property
XWIKI-2240 : Heading IDs not unique when including multiple documents
XWIKI-796 : Import Wizard fails if one document from the XAR fails to
be loaded
XWIKI-2200 : Import of "homemade" xar doesn't function
XWIKI-2161 : Inconsistent diff API
XWIKI-2215 : LDAP Authenticator should add proper error message in the
context when authentication fail
XWIKI-2201 : LDAP group mapping defined in XWikiPreferences is not working
XWIKI-2208 : LDAP parameter "user_group" is not taken into account.
XWIKI-2202 : LDAP user update corrupt XWiki user page
XWIKI-1903 : New UI - Empty group shows 1 member
XWIKI-1855 : Prevent invalid Class property names from being created
XWIKI-2173 : Remote file inclusion vulnerability
XWIKI-1965 : RightsManageRightsApi and RightsManageUsersApi has wrong names
XWIKI-2247 : The rendering component does not handle \\ and empty line
correctly together
XWIKI-1081 : The show code view renders URL escaped characters when it
shouldn't
XWIKI-662 : User emails should not be displayed in XML view
XWIKI-2209 : XWiki GWT Api breaks UTF translations
XWIKI-950 : eMail (XWiki.sendMessage) defaults to illegal SMTP HELO
XWIKI-2213 : remove api.Attachment#getArchive() and wrap #getAttachmentRevision
XWIKI-2165 : Accidentally created case sensitive document translations
XWIKI-2235 : Cannot deploy XWiki as ROOT application
XWIKI-980 : EventCalendar generates prev-next links forever
XWIKI-2186 : Footnotes cause line breaks in lists
XWIKI-2195 : It is possible to delete a version from the history only
with edit rights
XWIKI-2193 : LDAP error message with stack trace in xwiki.log when
processing invalid LDAP credentials. User gets "Internal Error"
feedback on UI.
XWIKI-921 : When using XWikiDocuments as resource bundles, no default
value is used
XWIKI-2236 : doc#getLastChanges() does not work with the new versioning scheme
XWIKI-2197 : Wrong mapping for 404 errors in web.xml
Improvements
==========
XWIKI-2187 : Document the Context class from the Core APIs properly
XWIKI-68 : History page too big when the document has many versions
XWIKI-2230 : Rename XWikiContext/Context.isVirtual and XWiki.isVirtual
XWIKI-2252 : Add ability to look up all components for a given role
XWIKI-2237 : Boolean class meta properties should be displayed as checkboxes
XWIKI-2160 : Object add and remove markers in the object differences
XWIKI-2207 : The Document API does not allow saving a minor edit
XWIKI-2253 : The attachment archive should be loaded only if it wasn't
already loaded
XWIKI-2196 : Deleting a page : wrong text in the warning message
XWIKI-2212 : Improve the paged view links macro
XWIKI-2198 : When updating backlinked pages during rename, save them
with minorEdit and a proper comment
XWIKI-2245 : RightsManager class sould be public
XWIKI-2219 : Skins should be allowed to have their own macros.vm files
where to put global macros
New Features
==========
XWIKI-2159 : Make revision querying easier by adding
getRevisions(RevisionCriteria) method to Document, add a
CriteriaService to XWiki
XWIKI-2205 : add better Active Directory support - case insensitive username
XWIKI-2175 : Add reverseList(List) method to the Util API
XWIKI-2238 : Cannot find out the type of a class metaproperty from Velocity
XWIKI-2143 : Keyboard shortcuts generic feature + standard keyboard
shortcuts set
XWIKI-2242 : Api to select all objects of a given type matching a
key=value criteria
XWIKI-1966 : Add a methods in XWikiStoreInterface to know if a wiki
name is available
Tasks
====
XWIKI-1867 : Document the new rights UI
XWIKI-1695 : Activate velocity-tools
XWIKI-1242 : Horizontal Line XWiki syntax
XWIKI-2153 : Switch to Java 1.5
XWIKI-2220 : Replace current Velocity configuration code by a Velocity
Component
Release Notes - XWiki Enterprise - Version 1.4 M1
-------------------------------------------------------------------------
Bugs
====
XE-168 : Parent and title field are missing as hidden field in the
inline template
Improvements
==========
XE-214 : Allow specifying a build profile to run Selenium Tests under
the YourKit profiler
XE-207 : Replacement of Rico Accordion with Scriptaculous one
Here's my +1
Please shout if you think there's something missing in this list.
Thanks,
JV.
Hi Ludovic,
I've been working on assembling a servlet using your webdav code, xwiki-core
and other relevant dependencies. Although i could deploy the WebDAV servlet,
I have few things I can't get pass,
* What do I need to do so that once deployed the webdav servlet will use an
instance of hsqldb ( like the stand-alone xwiki installation ) ?
* Currently when I make a request to the servlet, I get the following error,
2008-04-02 20:21:19,597 [http://localhost:8080/DAVServer/]
[http-8080-Processor24] ERROR [/DAVServer].[DAVServlet] -
Servlet.service() for servlet DAVServlet threw exception
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:396)
at com.xpn.xwiki.web.Utils.prepareContext(Utils.java:274)
at
com.xpn.xwiki.plugin.webdav.XWikiDavResourceImpl.getXWikiContext(XWikiDavResourceImpl.java:317)
at
com.xpn.xwiki.plugin.webdav.XWikiDavResourceImpl.<init>(XWikiDavResourceImpl.java:180)
at
com.xpn.xwiki.plugin.webdav.XWikiResourceFactoryImpl.createResource(XWikiResourceFactoryImpl.java:96)
at
com.xpn.xwiki.plugin.webdav.XWikiResourceFactoryImpl.createResource(XWikiResourceFactoryImpl.java:63)
at
com.xpn.xwiki.plugin.webdav.XWikiDavServlet.service(XWikiDavServlet.java:340)
Tracking down reveals that the code in Utils,
ComponentManager componentManager =
(ComponentManager)
engine_context.getAttribute(ComponentManager.class.getName());
context.put(ComponentManager.class.getName(), componentManager);
Is throwing a null-pointer exception where componentManager is NULL. I
believe this has something to with plexus, could tell me how to overcome
this ?
I'm sort of stuck at this point, any help is really appreciated.
Btw, Ludovic, how were you able to test your code ?
Thanks a lot.
- Asiri