Hi everybody,
I am finishing the XMLRPC interface but I am stuck on some points... I
still haven't found the way to do this so I am asking here to the API
gurus that surely have the solutions I am looking for:
1) I don't know how to retrieve the list of language IDs that are
configured in the "xwiki/bin/admin/XWiki/XWikiPreferences" in the
Parameters/Languages field. I would need this for knowing what are the
"available" languages in a XWiki instance.
2) I cannot understand how to create a new "translated document".
Currently I do
Document doc = xwiki.getDocument(pageId);
doc = doc.getTranslatedDocument(language);
Now, if a translation for the given language is not *already*
available, getTranslatedDocument returns the same document returned by
getDocument (i.e., the default translation). But here I would like to
"create" the new translated document that does not yet exist.
Basically I am looking for something semantically equivalent to
getDocument that creates a page if it doesn't already exist.
3) Removing an attachment seems impossible without switching from the
API to the low-level functions. In order to remove an attachment I
tried to do this:
Document doc = xwiki.getDocument(pageId);
Attachment xwikiAttachment = doc.getAttachment(fileName);
doc.getDocument().deleteAttachment(xwikiAttachment.getAttachment(),
xWikiContext);
but xwikiAttachment.getAttachment() returns null, and this happens
when the hasProgrammingRights() check fails. The same user is able to
delete attachments via web, but I cannot understand how to mimic the
same functionality by having the API as the entry point.
Sorry if these are trivial questions but, as I said before, I am stuck
and looping :)
Thanks.
Cheers,
Fabio
Forwarding to the proper mailing list.
-------- Original Message --------
Subject: Re: [xwiki-notifications] r8905 -
xwiki-platform/core/branches/xwiki-core-1.3/xwiki-core/src/main/resources/META-INF/services
Date: Tue, 1 Apr 2008 22:24:01 +0200
From: Vincent Massol <vincent(a)massol.net>
Reply-To: XWiki Notifications <notifications(a)xwiki.org>
To: XWiki Notifications <notifications(a)xwiki.org>
References: <20080401193540.8E8996C0A93(a)vsvn.xpertnet.biz>
Hi Ludovic,
This needs to be commented in the code to explain why we're commenting
out the EscapeFilter.
Thanks
-Vincent
PS: I spent lots of time (> 8 hours) fixing my Velocity code because a
very tricky code was done in the old XWikiVelocityRenderer code with
NO comments at all. We need to really start improving the quality of
our code and we need everyone's help. That'll save us from a lot of
trouble in the future.
On Apr 1, 2008, at 9:35 PM, ludovic (SVN) wrote:
> Author: ludovic
> Date: 2008-04-01 21:35:40 +0200 (Tue, 01 Apr 2008)
> New Revision: 8905
>
> Modified:
> xwiki-platform/core/branches/xwiki-core-1.3/xwiki-core/src/main/
> resources/META-INF/services/com.xpn.xwiki.render.filter.XWikiFilter
> Log:
> XWIKI-2269 \\ in wiki syntax does not convert to 2 <br /> but
> instead escaped one \ in HTML
>
> Modified: xwiki-platform/core/branches/xwiki-core-1.3/xwiki-core/src/
> main/resources/META-INF/services/
> com.xpn.xwiki.render.filter.XWikiFilter
> ===================================================================
> --- xwiki-platform/core/branches/xwiki-core-1.3/xwiki-core/src/main/
> resources/META-INF/services/com.xpn.xwiki.render.filter.XWikiFilter
> 2008-04-01 19:32:54 UTC (rev 8904)
> +++ xwiki-platform/core/branches/xwiki-core-1.3/xwiki-core/src/main/
> resources/META-INF/services/com.xpn.xwiki.render.filter.XWikiFilter
> 2008-04-01 19:35:40 UTC (rev 8905)
> @@ -2,7 +2,7 @@
> # The content is restored later on in the CodeRestoreFilter. The
> filter has to be executed first
> # to ensure no modifications is done to the content.
> com.xpn.xwiki.render.filter.CodeRemoveFilter
> -com.xpn.xwiki.render.filter.EscapeFilter
> +#com.xpn.xwiki.render.filter.EscapeFilter
> org.radeox.filter.ParamFilter
> com.xpn.xwiki.render.filter.StyleFilter
> com.xpn.xwiki.render.filter.MacroFilter
_______________________________________________
notifications mailing list
notifications(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
We'd like to release XE 1.3.1 as soon as possible (on march 28th or
april 1st). Here are the current changes done since 1.3 final :
* XWIKI-2206 : Cookie domains not compliant with RFC 2019
* XWIKI-2130 : Document.getPreviousDocument() and
Document.getPreviousVersion() seems not to work
* 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-2248 : DBTreeListClass needs to support translations
* 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-2247 : The rendering component does not handle \\ and empty
line correctly together
* XWIKI-2209 : XWiki GWT Api breaks UTF translations
* XWIKI-2205 : add better Active Directory support - case insensitive username
* XWIKI-2235 : Cannot deploy XWiki as ROOT application
* 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-2255 : Exception while saving some documents
* XSTOUCAN-27 : Fields of Add Property Panel are shrinked in Class
Editor using IE7
* XSALBATROSS-22 : On IE7 the combo box for selecting Objects is not
large enough
Here's my +1
Anything else that's absolutely required for 1.3.1?
Thanks,
--
Jean-Vincent Drean
> Now that we've started creating the branch for 1.3 I'd like to remove the 1.1 branches for Core, Web, Panels and XE.
>
> Rationale:
>
> * Cleanliness
> * Having opened branches can tempt committers to commit stuff to the branch. Closing it clearly shows that we don't intend to work on it anymore
> * We still have the latest released 1.1.x versions, so if there's an urgent need to release a 1.1.3 version we can still do it.
> * This will allow us to remove the 1.1.3 version in JIRA thus keeping it clean too and again preventing people from using it.
> * We can't work/support too many branches at once, that's just too much work
> * We want people to upgrade to newer versions.
> * XE 1.2 was released quite some time ago and is stable. 1.3 is about to be released as final too.
six +1, no 0 ..
There was a -1 which is now deprecated since Curriki 1.5.2 release is
based on xwiki 1.3.
I'll delete the 1.1 branches today.
Thanks,
--
Jean-Vincent Drean
I did a bit of debugging and traced the problem to line 65 in XWikiRemoteDAO.java
try {
Page page = swizzleXWiki.getPage("XWiki.WebHome");
} catch (ClassCastException e) {
...
} catch (Exception e) {
The date is was earlier complaining about is the modification date of the wiki space I believe.
Seems like there is a SwizzleConversionException thrown which the workaround mentioned in the comments fails to catch and I think the ClassCastException there was actually supposed to be a SwizzleConversionException so I changed the code to:
try {
Page page = swizzleXWiki.getPage("XWiki.WebHome");
} catch (SwizzleConversionException e) {
Now, it disables the conversion as the workaround says but now I`m getting this exception:
org.xwiki.eclipse.model.XWikiConnectionException: org.xwiki.eclipse.model.impl.XWikiDAOException: org.codehaus.swizzle.confluence.ConfluenceException: Null values aren't supported, if isEnabledForExtensions() == false
at org.xwiki.eclipse.model.impl.XWikiPlainConnection.connect(XWikiPlainConnection.java:83)
at org.xwiki.eclipse.XWikiEclipsePageIndexer$IndexerJob.run(XWikiEclipsePageIndexer.java:67)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.xwiki.eclipse.model.impl.XWikiDAOException: org.codehaus.swizzle.confluence.ConfluenceException: Null values aren't supported, if isEnabledForExtensions() == false
at org.xwiki.eclipse.model.impl.XWikiRemoteDAO.<init>(XWikiRemoteDAO.java:79)
at org.xwiki.eclipse.model.impl.XWikiPlainConnection.connect(XWikiPlainConnection.java:71)
... 2 more
Caused by: org.codehaus.swizzle.confluence.ConfluenceException: Null values aren't supported, if isEnabledForExtensions() == false
at org.codehaus.swizzle.confluence.Confluence.call(Confluence.java:778)
at org.codehaus.swizzle.confluence.Confluence.call(Confluence.java:751)
at org.codehaus.swizzle.confluence.Confluence.login(Confluence.java:49)
at org.xwiki.eclipse.model.impl.XWikiRemoteDAO.<init>(XWikiRemoteDAO.java:54)
... 3 more
After digging some more, I found out that this is caused by
XWikiConnectionManager.getDefault().getPasswordForConnection(connection);
at line 67 in XWikiEclipsePageIndexer.java where the connection manager is supposed to get the password associated to the connection but from what I see, the ID of the connection being resolved does not exist in the xwikiConnections HashTable which is, btw, populated with the correct initial connection containing the entered username and password.
I don`t understand where does this second conenction come from that is not listed in the xwikiConnections with its ID, thus returning a null password and generating the above exception upon issuing connect().
Hope this helps on speeding things up.
Thank you and hope someone comes to the rescue :)
----- Original Message ----
From: Enygma <enygma2002_ro(a)yahoo.com>
To: users(a)xwiki.org
Cc: devs(a)xwiki.org
Sent: Tuesday, April 1, 2008 2:23:13 AM
Subject: [xwiki-devs] XEclipse - problem connecting to local XWiki
Hello XWiki users and developers.
My name is Eduard Moraru and I'm going to apply this year for Google Summer of Code at XWiki on the project XWiki Offline.
I am planning on embedding this project in the already existing XEclipse on which I've understood there is already some work done.
My problem is that I tried out XEclipse (xwiki-eclipse-rcp-linux-gtk-x86-1.1.zip and xwiki-eclipse-1.1.zip) on a local installation of XWiki (xwiki-enterprise-installer-generic-1.3.jar) using both user Admin and a new test user and did not manage to connect to the wiki.
I then tried to connect to xwiki.org using a newly registered account and it worked perfectly.
On the local installation, XEclipse pops an exception which I can't get past:
org.xwiki.eclipse.model.XWikiConnectionException:org.xwiki.eclipse.model.impl.XWikiDAOException:org.codehaus.swizzle.confluence.SwizzleConversionException:java.text.ParseException: Unparseable date: "mer. juil. 11 18:57:54EEST 2007"
at org.xwiki.eclipse.model.impl.XWikiPlainConnection.connect(Unknown Source)
at org.xwiki.eclipse.wizards.NewConnectionWizard$1.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Caused by: org.xwiki.eclipse.model.impl.XWikiDAOException:org.codehaus.swizzle.confluence.SwizzleConversionException:java.text.ParseException: Unparseable date: "mer. juil. 11 18:57:54EEST 2007"
at org.xwiki.eclipse.model.impl.XWikiRemoteDAO.<init>(Unknown Source)
... 3 more
Caused by: org.codehaus.swizzle.confluence.SwizzleConversionException:java.text.ParseException: Unparseable date: "mer. juil. 11 18:57:54EEST 2007"
at org.codehaus.swizzle.confluence.ConfluenceObjectConvertor.revert(ConfluenceObjectConvertor.java:56)
at org.codehaus.swizzle.confluence.MapConvertor.revert(MapConvertor.java:39)
at org.codehaus.swizzle.confluence.Confluence.revert(Confluence.java:791)
at org.codehaus.swizzle.confluence.Confluence.getPage(Confluence.java:127)
... 4 more
Caused by: java.text.ParseException: Unparseable date: "mer. juil. 11 18:57:54 EEST 2007"
at java.text.DateFormat.parse(DateFormat.java:355)
at org.codehaus.swizzle.confluence.ConfluenceObjectConvertor.revert(ConfluenceObjectConvertor.java:53)
... 7 more
I also posted a bug on JIRA at http://jira.xwiki.org/jira/browse/XECLIPSE-100 regarding this issue but I figured on the mailing list I'd get faster feedback.
My question is: Am I doing something wrong with my local installation? Are there some other privileges to give that I left out?
At a first look, I`d say It`s a hardcoded date "mer. juil. 11 18:57:54 EEST 2007"(it's always the same), left there during development, but I`m not sure if it`s on the XEclipse side or the XWiki side.
Thank you very much for your time and I await your suggestions.
____________________________________________________________________________________
No Cost - Get a month of Blockbuster Total Access now. Sweet deal for Yahoo! users and friends.
http://tc.deals.yahoo.com/tc/blockbuster/text1.com
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
Alrite. I thought that might be the case. Thanks.
I need to add functionality for SVN integration of the attachments in XWiki.
Hence, the building and re-building.
Also, I wanted to know:
Does the Lucene search plugin update indices everytime attachments are
uploaded or at certain regular intervals?
Thanks
See in maven when we build a module it also looks for dependent module
first.
So they have to be built before.
When you are building say product-enterprise-web you should always build the
following first:
1. platform-core
2. platform-plugins
3. platform-skins
4. platform-web
In that said order.
Now if you notice that product-enterprise-web = platform-web +
platform-plugin
So if you just always build the platform-web and add plugins to it you get
the product-enterprise (of course you have to modify xwiki.cfg to add built
plugins).
I suspect in your case it might be getting the platform-web war from the
maven repository, may be -nsu flag prevents it.
Here is a process you may want to follow:
I build xwiki from source daily and the whole process is automated via ant
scripts. Ant executes mvn targets and using ant-maven dependency tasks it
automatically copies the additional plugin jars to lib folder of my build.
Whole process takes not more that 2 - 3 minutes.
Thanks
Sachin
------------------------------
>
> Message: 6
> Date: Tue, 1 Apr 2008 17:34:59 -0500
> From: "Kamna Jain" <kammy.scorpi(a)gmail.com>
> Subject: [xwiki-devs] Question about the Build process.
> To: devs(a)xwiki.org
> Message-ID:
> <fb681d280804011534vb5ab05er53106c04f3464b0c(a)mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello,
>
> I am trying to make soem changes to the XWikiHibernateAttachmentStore
> class.
>
> So the procees I follow while building is:
>
> 1) Build the xwiki core using mvn install
> 2) build the Xwiki Enterprise application using - mvn -nsu install -Pxe
> 3) after this I replace the existing xwiki folder with the newly updated
> one
> (from the target folder)
>
> Is this the right way to do. I am wondering because it takes almost 8 -
> 10
> mins to build the Enterprise every time I make any small change in the
> Core
> code.
>
> Thanks.
>
>
>
Hello,
I am trying to make soem changes to the XWikiHibernateAttachmentStore class.
So the procees I follow while building is:
1) Build the xwiki core using mvn install
2) build the Xwiki Enterprise application using - mvn -nsu install -Pxe
3) after this I replace the existing xwiki folder with the newly updated one
(from the target folder)
Is this the right way to do. I am wondering because it takes almost 8 - 10
mins to build the Enterprise every time I make any small change in the Core
code.
Thanks.