I'd like to be able to generate pure JSON from a wiki page, to use in other pages via AJAX. To that end I created a page with the following content:
{{velocity wiki="false"}}
$response.setContentType('application/json')
{
"greeting" : "Hello",
"location": "World"
}
{{/velocity}}
Calling this via /xwiki/bin/get/Sandbox/JsonTest I get the following code:
<p><br/>{<br/>"greeting" : "Hello",<br/>"location": "World"<br/>}</p>
I get the same via /xwiki/bin/view/AlertDB/JsonTest?xpage=plain.
If I remove the $response.setContentType('application/json')
https://dev.alertnessdb.net/xwiki/bin/view/AlertDB/JsonTest?xpage=plain
Currently, I'm using something like this to generate a list of pages whose
prefix is "Prefix:" and link to them:
{velocity}} (((
#foreach ($row in $services.query.hql("select doc.name, doc.fullName from
XWikiDocument doc where doc.space.hidden = false and doc.space not in
('XWiki', 'Sandbox', 'Main', 'Macros') and doc.name like
'Prefix:%'").execute())
* **[[$row[0].replaceFirst("Prefix: *", "").replaceAll("~",
"~~~~").replaceAll("[\x20-\x7f&&[^a-zA-Z0-9 ~]]",
"~~$0")>>doc:$row[1].replaceAll("~", "~~").replaceAll("[\x5b\x5d|]", "\\$0
<file:///\\$0> ")]]**
#end
))) {{/velocity}}
I have tested with some heavy test cases like
Prefix:
~~~!!!```@@@$$$%%%^^^&&&***((()))___----+++==={{{}}}[[[]]]\\\|||:::;;;'''"""
???///...>>>,,,<<<
And what I have above works correctly (both showing the title and linking to
the document). I only work on a few hard test cases, though, so I'm not sure
if I missed anything.
Is there a method that does all this automatically? Or is there a better
approach to this?
I have a Groovy script that takes input from a form textarea. I'd like to prevent html (and JS) markup from being submitted and, if HTML is submitted, strip it out. Is there a tool already packaged within XWiki to do this, or should I look to an external package like Jericho?
Thanks,
Bryn
Hi everybody, my name is Kévin Laîné, i'm a french guy.
I'm working on a collective project about "alternative models of family".
Xwiki seems to be the best community tool management I've discovered.
I'm really interested for opening an xwiki on the "XWiki Community farm". I have some questions before asking you to open a session.
1) Is it possible to use a domain name like "domain.tld" instead of "domain.myxwiki.org" ?
2) Is it possible to install some extensions as bulletin board or others ?
3) Is it possible to embed "Nabble Free Forums" or other Nabble apps ?
4) Is it possible to make private backup of the xwiki ?
Vincent Massol is working on "Alternate URL Scheme" http://dev.xwiki.org/xwiki/bin/view/Design/AlternateURLScheme
5) When it will be ready could I use this option on myxwiki even if I my xwiki is in production ?
Thank you very much for your answers.
Trying to track down the source of some persistent performance issues under
load with 6.2 RC 1 (haven't had time to upgrade to 6.2 final yet). I'm
maxing out at about 30 or so users before dying on a system with 4GB of RAM.
The java interpreter is getting pegged to 100% of the CPU, and about 70% of
the calls in the stack trace are futex lock errors. A good chunk of the
remainder are gettimeofday calls.
Potentially useful info (sorry for formatting):
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
72.75 5361.592109 45075 118947 14045 futex
12.28 905.064191 466 1943354 gettimeofday
4.83 356.110745 3709487 96 45 restart_syscall
2.88 212.173358 836 253729 clock_gettime
2.71 199.867690 8802 22706 recvfrom
2.10 154.843342 37841 4092 poll
1.14 84.282371 580 145307 130153 stat
Any ideas?
thanks,
aaron
Hello XWiki Community,
while creating an App within a Minute I get groovy executing failures for each element of the form. It is possible to save and finish the process but I cannot access the editor for the content field. That means I cannot enter default entries.
You can see the full failure message at the end of the mail.
I googled the problem and found entries for Confluence. Maybe they can guide a way:
Now I added the "-XX:ReservedCodeCacheSize=64m" option into JAVA_OPTS. (https://bobswift.atlassian.net/browse/SCRP-129)
and
It worked for me, I just added XX:ReservedCodeCacheSize to my setenv.sh and until now everything is ok. (https://answers.atlassian.com/questions/13535/problem-with-the-script-runne…)
I am running version 5.4.5
Thank you for your time!
Best regards,
Peter
Here is the error which is displayed when I reenter the wizard page for step 2:
Failed to execute the [groovy] macro:
java.lang.VerifyError: (class: org/codehaus/groovy/runtime/ArrayUtil, method: createArray signature: ()[Ljava/lang/Object;) Illegal type in constant pool
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
at Script89.run(Script89.groovy:41)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:346)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:146)
at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.eval(AbstractJSR223ScriptMacro.java:292)
at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.evaluateBlock(AbstractJSR223ScriptMacro.java:226)
at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.evaluateBlock(AbstractJSR223ScriptMacro.java:177)
at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.evaluateBlock(AbstractJSR223ScriptMacro.java:57)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:198)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:59)
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transformOnce(MacroTransformation.java:191)
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:132)
at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:87)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:252)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:125)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:55)
at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:80)
at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:38)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:253)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.applySheet(SheetDocumentDisplayer.java:212)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.maybeDisplayWithSheet(SheetDocumentDisplayer.java:164)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:102)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:50)
at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:67)
at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:41)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:997)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:976)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1007)
at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:619)
at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source)
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:395)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567)
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.SimpleNode.render(SimpleNode.java:342)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:228)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:187)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:105)
at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluate(DefaultPrivilegedTemplateRenderer.java:125)
at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluateTemplate(DefaultPrivilegedTemplateRenderer.java:75)
at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1687)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1627)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:918)
at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
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:395)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
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.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:228)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:187)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:105)
at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluate(DefaultPrivilegedTemplateRenderer.java:125)
at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluateTemplate(DefaultPrivilegedTemplateRenderer.java:75)
at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1687)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:167)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:304)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:129)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:121)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:126)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:269)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Hi,
As I have failed to find the related information of this subject, I hope
the email group can help me.
Why Glossary feature was not implemented in xwiki? Is there any extension
or alternatives?
I did think Glossary is a useful feature especially for a dev team.
Thanks
Regards
Peter
Dear XWiki users,
We’re getting close to the end of the XWiki 6.x cycle (6.4 is planned for the end of December) and in January we’ll start developing the XWiki 7.x cycle (which will last the whole 2015 year), starting with XWiki 7.0.
Thus it’s time for the XWiki devs to start defining the global roadmap for XWiki 7.x.
As XWiki users, I’d like to know if you have some needs for XWiki 7.x. What would you be interested in seeing in XWiki 7.x?
I’d like to start some proposal on the xwiki devs list (for the XWiki 7.x cycle) around end of December so it would be nice if you could shoot your suggestion ideas fast so that we can take them into account in the discussion! :)
Thanks a lot for your help and I hope you’re enjoying using XWiki!
-Vincent Massol
XWiki Committer
Hello Marius - thank you for the detailed reply. My goal is (2) - to find all documents with a .7z attachment, where those attachments include file(s) containing "foo". If I read your email correctly, Tika 1.6 (5) is root cause for my failure to search successfully for text within the files contained in a .7z attachment. I am successful with my search when using a .zip file as the attachment - so we will instruct wiki users to avoid .7z attachments.
Garth
> -----Original Message-----
> Message: 2
> Date: Thu, 11 Dec 2014 08:42:20 +0200
> From: Marius Dumitru Florea <mariusdumitru.florea(a)xwiki.com>
> To: XWiki Users <users(a)xwiki.org>
> Subject: Re: [xwiki-users] XWiki search/Solr support for additional
> filetypes
> Message-ID:
> <CALZcbBbprk=SJjhqGKKX1tx-TcMQbcq+qby6ZfnQqXZ-
> AkCcNA(a)mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> It depends what you mean by "search attachments that are 7-Zip .7z
> archives":
>
> (1) Give me all the documents that have an attachment of mime type
> application/x-7z-compressed
> (2) Give me all the documents that have a 7-Zip archive attached that
> includes a file that contains the word "foo"
>
> If you use Solr, the default search engine for XWiki 6.2.4, then the
> code that is responsible for indexing the attachments is
> AttachmentSolrMetadataExtractor [1]. This is a component so it can be
> overridden as per [2]. The current implementation uses Tika [3] to:
>
> (1) detect the mime type of the attachment
> (2) extract indexable content from the attachment (whatever its mime
> type may be)
>
> For (1) Tika supports detecting the 7-Zip mime type since version 1.2
> [4]. For (2) judging by [5] it seems Tika also supports reading 7-ZIP
> archives but there were some issues in 1.6 that have been fixed in
> 1.7. We are currently using Tika 1.6 in XWiki. We should probably
> upgrade.
>
> Hope this helps,
> Marius
>
> [1] https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-
> core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-
> search-solr-
> api/src/main/java/org/xwiki/search/solr/internal/metadata/AttachmentSolr
> MetadataExtractor.java
> [2]
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module
> #HOverrides
> [3] https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-
> core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-
> search-solr-
> api/src/main/java/org/xwiki/search/solr/internal/metadata/AbstractSolrMet
> adataExtractor.java#L458
> [4] https://issues.apache.org/jira/browse/TIKA-940
> [5] https://issues.apache.org/jira/browse/TIKA-1411
>
> On Wed, Dec 10, 2014 at 9:20 PM, Arnold, Garth <arnold.g(a)ghc.org> wrote:
> > Hello - is it possible to enable searching of additional filetypes within XWiki
> 6.2.4? Specifically I would like to be able to search attachments that are 7-Zip
> .7z archives. It looks to me as though the underlying library (Commons
> Compress) supports this filetype, but I am a new XWiki user and non-java
> programmer so I may be assuming too much.
> >
> > Thanks in advance for your thoughts on this -
> >
> > Garth Arnold
________________________________
GHC Confidentiality Statement
This message and any attached files might contain confidential information protected by federal and state law. The information is intended only for the use of the individual(s) or entities originally named as addressees. The improper disclosure of such information may be subject to civil or criminal penalties. If this message reached you in error, please contact the sender and destroy this message. Disclosing, copying, forwarding, or distributing the information by unauthorized individuals or entities is strictly prohibited by law.
Does anyone have experience deploying a whiteboard within a wiki page similar to https://awwapp.com/ , http://webwhiteboard.com/#/ , http://cosketch.com/ or similar?
I have a need to deploy one - and using a third party service and embedding it in the page is fine, but am having trouble displaying it.
This one with the code pasted below seems to work, but the app/ third party service isn't what we really want - it's a mind map service. Others seem to embed, but then don't display anything.
This one seems to be one that could be hosted on our own server (??) which would actually be ideal longterm. https://code.google.com/p/online-whiteboard/
Ideally, I'd like to be able to use one that doesn't require further fees - as it sort of defeats the purpose of our own wiki structure.
Anyway, any ideas or your experience here would be appreciated! We are currently running XWIKI ENTERPRISE 5.4.5, but looking at upgrading to 6.3 shortly.
{{html clean="false"}}
<iframe src="https://www.mindmup.com/#m:a18712bed014d6013247a842795da66744" width="800" height="600" frameBorder="0" webkitAllowFullScreen mozAllowFullscreen allowfullscreen></iframe>
{{/html}}
Paul Pinkerton
ACLCO/ KnowledgeNow Project