Hi,
I'd like to change for EntityReferenceResolver from:
EntityReference resolve(T entityReferenceRepresentation, EntityType type);
to
EntityReference resolve(T entityReferenceRepresentation, EntityType type, Object... parameters);
And for EntityReferenceSerializer, from:
T serialize(EntityReference reference);
to
T serialize(EntityReference reference, Object... parameters);
The rationale is that we need a new resolver that can normalize an EntityReference against a fixed EntityReference. Right now to implement this we need to use the execution context and modify it to modify the current doc to have that ref, do the resolving and then restore the context. It's complex and requires extra work:
private <T> DocumentReference resolveReference(T referenceToResolve, DocumentReferenceResolver<T> resolver,
DocumentReference defaultReference)
{
XWikiContext xcontext = getXWikiContext();
String originalWikiName = xcontext.getDatabase();
XWikiDocument originalCurentDocument = xcontext.getDoc();
try {
xcontext.setDatabase(defaultReference.getWikiReference().getName());
xcontext.setDoc(new XWikiDocument(defaultReference));
return resolver.resolve(referenceToResolve);
} finally {
xcontext.setDoc(originalCurentDocument);
xcontext.setDatabase(originalWikiName);
}
}
So I'd like to write a new resolver that would be used like this:
docResolver.resolve(refToNormalize, defaultReference)
Notes:
1) **IMPORTANT**: Note that this could break backward compat for anyone who's done implementations based on Resolver/Serializer APIs but I still think it's ok to go with it in
2) I'd need this for XE 2.2.2 since I need this new resolver. I could hack it and continue using the code above though and only make the change in 2.3 (trunk).
Here's my +1
Thanks
-Vincent
Hi guys, have you ever experienced such an issue?
I had to set nullable "XWIKISTATSDOC"."XWS_CLASSNAME" to make statistics
working, because I was receiving this:
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-01400:
cannot
insert NULL into (...."XWIKISTATSDOC"."XWS_CLASSNAME")
Well, sometimes I'm getting anothererror message ROR
util.JDBCExceptionReporter - ORA-00932: inconsistent datatypes: expecte
d - got CLOB
Any clue?
Cheers
Nicola
--
View this message in context: http://n2.nabble.com/Statistics-flawed-in-my-case-Oracle-XE-10g-tp4709339p4…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi,
I need your help.
So I have used an Editor WYSIWYG in my form for adding some article.
http://code.xwiki.org/xwiki/bin/view/Modules/WysiwygEditorModule
There is no problem to create new article but when I need to edit and modify
this I don't find any way to set the default conent of textarea(Inwysiwyg
editor)
<textarea id="demo"></textarea>
Wysiwyg.onModuleLoad(function() {
Editor = new WysiwygEditor({hookId: 'content'});
});
My question is: is there setRichTextArea() method or similar to set default
content to textarea (dem).
I think you so much for.
I originally added captcha.enabled to xwiki.properties when there was no configuration for the registration
page and I felt there should be settings on both administration and config file levels but in retrospect I
think the decision reflected my lack of knowledge about the configuration system.
I'd like to remove captcha.enabled, it will make no change to the default behavior because the captcha is
disabled by default in each of it's current uses.
WDYT?
Caleb
Hi,
Discussing with Thomas today we think we need to use relative refs in XWikiDocument for storing the Parent reference and in XObject (BaseCollection to be precise) to store the XClass reference.
The rationales are:
* the copy wiki use case: Imagine that you've set a relative parent reference in the UI, you'll want that the copied document retains the relativity
* have the same behavior as relative links in document contents.
* we had this feature and lost it during the reference refactoring in XE 2.2.
Regarding the implementation the idea is to:
* store relative reference using the EntityReference class and to introduce a RelativeStringEntityReferenceResolver class.
* modify the XWikiDocument's javadoc to deprecate setDocumentReference and all setXXX that change the reference since XWikiDocument should be immutable re its reference (the storage impl today doesn't support a XWikiDocument that has its reference that is modified).
Let me know if you see a problem. I'm starting to implement this.
Thanks
-Vincent
Hello,
I installed an XEM 2.2.1 on glassfish + mysql... OK
Then I imported xwiki-enterprise-manager-wiki-administrator-2.2.1.xar into
the Wiki... it works and I get the XEM pages...
I login as XWiki.Admin
I try to create a new Wiki and I get this exception
[#|2010-03-05T01:16:21.719+0100|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=25;_ThreadName=Thread-1;|2010-03-05
01:16:21,718 [
http://MY_IP:8080/xwiki/bin/view/WikiManager/CreateNewWiki?wikiname=mywiki&…]
ERROR kimanager.WikiManagerPluginApi - Wiki
[Main.WebHome,my-adress.info,XWiki.Admin]
creation failed
com.xpn.xwiki.plugin.wikimanager.WikiManagerException: Error number 9001 in
5: com.xpn.xwiki.plugin.wikimanager.WikiManagerPlugin: You dont have right
to create wiki [{0}]
at
com.xpn.xwiki.plugin.wikimanager.WikiManagerPluginApi.createNewWiki(WikiManagerPluginApi.java:204)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252)
at
org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:493)
at
org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
at
org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:191)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:116)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:272)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:202)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:170)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderDocument(DefaultXWikiRenderingEngine.java:159)
at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:741)
at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:758)
at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:492)
I've seen a closed/Won't fix bug in Jira
http://jira.xwiki.org/jira/browse/XAWM-115 but the given information brings
no help...
I create a page in Wiki WikiManager as indicated in this bug:
{{velocity}}
#set($xwikicontext = $context.context)
#set($rightService = $xwikicontext.getWiki().getRightService())
* Is the wiki in virtual mode: $xwikicontext.getWiki().isVirtualMode()
* The user [$context.user] has admin rights:
$rightService.hasAdminRights($xwikicontext)
* The user [$context.user] has programming rights:
$rightService.hasProgrammingRights($xwikicontext)
{{/velocity}}
It gives:
Is the wiki in virtual mode: true
The user [XWiki.Admin] has admin rights: true
The user [XWiki.Admin] has programming rights: true
I tried with the template "templatexe" also but nothing better...
Has anyone encountered the same error as me or any idea?
regards
Pascal