File Manager - FileManagerTemplate

Page / - 最后修改者 ybq sz 打开 2022-11-21 20:00

FileManagerTemplate

最后修改者 ybq sz

打开 2022-11-21 20:00

内容列表

Failed to execute the [velocity] macro. Cause: [Error number 9001 in 9: Access denied in edit mode on document xwiki:FileManager.FileManagerTemplate]. Click on this message for details.

org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [#set($url = "$xwiki.getURL($doc.getDocument(), 'view', 'change=true')#Attachments")

#set($change = $request.change)

#if($request.description)

$doc.set('description', $request.description)

$doc.save()

#end

{{html wiki="true"}}

$xwiki.ssx.use('AppWithinMinutes.ClassSheetGenerator')

$xwiki.ssx.use('FileManager.SkinExtension')

#set($discard = $doc.use('FileManager.FileManagerClass'))

## We don't have access to the form element to set the CSS class for the vertical form layout standard.

#if($context.action=="view" && !$change) ##For viewing the document

#if($!doc.display('description')!='')

; <label for="FileManager.FileManagerClass_0_description">Description</label>

: $doc.display('description')

#else

//$msg.get('contrib.FM.noDescription')//

#end

#set($filename = "")

#set($pdf='')

#foreach($attach in $doc.getAttachmentList())

<p><a href="$doc.getAttachmentURL($attach.filename)">${attach.filename}</a></p>

#if($attach.filename.endsWith(".ppt")||$attach.filename.endsWith(".odp")||$attach.filename.endsWith(".ods")||$attach.filename.endsWith(".pptx")||$attach.filename.endsWith(".xls") ||$attach.filename.endsWith(".xlsx")||$attach.filename.endsWith(".odt")||$attach.filename.endsWith(".doc")||$attach.filename.endsWith(".docx"))

#set($filename = $attach.filename)

#end

#if($attach.filename.endsWith('.pdf'))

#set($pdf = $attach.filename)

#end

#end

#if($filename!="")

{{office attachment="${filename}" filterStyles="false"/}}

#elseif($pdf!='')

{{pdfviewer file="$pdf" /}}

#elseif($doc.getAttachmentList().size() == 0)

<p>//$msg.get('contrib.FM.noAttachment')//</p>

#end

#elseif($change)

<form action='$doc.getURL('view')' method='post'>

<div>

<label for='description'>**$msg.get('contrib.FM.description')** : </label> <br>

<textarea name='description' rows='4' cols='60'>$!doc.getValue('description')</textarea>

</div>

<br>

<div id='bottom'>

<p><label>$msg.get('contrib.FM.change.explanations')</label></p>

<input type='submit' class='button' value="$msg.get('contrib.FM.editDescription')">

</div>

</form>

#else

$doc.save()

$response.sendRedirect($url)

#end

{{/html}}]

at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:139)

at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:52)

at org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:286)

at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:182)

at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:58)

at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:297)

at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)

at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:101)

at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:263)

at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:133)

at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:58)

at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:96)

at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:39)

at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:245)

at org.xwiki.sheet.internal.SheetDocumentDisplayer.applySheet(SheetDocumentDisplayer.java:225)

at org.xwiki.sheet.internal.SheetDocumentDisplayer.maybeDisplayWithSheet(SheetDocumentDisplayer.java:180)

at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:111)

at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:52)

at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:68)

at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:42)

at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1202)

at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1243)

at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1220)

at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1251)

at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:738)

at sun.reflect.GeneratedMethodAccessor455.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

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.Foreach.render(Foreach.java:420)

at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)

at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)

at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:259)

at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)

at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:358)

at com.xpn.xwiki.internal.template.InternalTemplateManager.evaluateContent(InternalTemplateManager.java:874)

at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:750)

at com.xpn.xwiki.internal.template.InternalTemplateManager.lambda$renderFromSkin$0(InternalTemplateManager.java:725)

at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)

at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:724)

at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:703)

at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:689)

at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:78)

at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2351)

at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:2329)

at com.xpn.xwiki.pdf.impl.PdfExportImpl.export(PdfExportImpl.java:151)

at com.xpn.xwiki.web.ExportAction.export(ExportAction.java:414)

at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:191)

at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:473)

at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:210)

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:655)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)

at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:112)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)

at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)

at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)

at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)

at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)

at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)

at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:750)

Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id [xwiki:FileManager.FileManagerSheet]

at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:227)

at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:358)

at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:131)

... 100 more

Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'save' in class com.xpn.xwiki.api.Document threw exception com.xpn.xwiki.XWikiException: Error number 9001 in 9: Access denied in edit mode on document xwiki:FileManager.FileManagerTemplate at 3335:xwiki:FileManager.FileManagerSheet[line 56, column 6]

at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:243)

at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:187)

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.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.evaluateInternal(DefaultVelocityEngine.java:259)

at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)

... 102 more

Caused by: com.xpn.xwiki.XWikiException: Error number 9001 in 9: Access denied in edit mode on document xwiki:FileManager.FileManagerTemplate

at com.xpn.xwiki.api.Document.save(Document.java:2450)

at com.xpn.xwiki.api.Document.save(Document.java:2436)

at sun.reflect.GeneratedMethodAccessor1058.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

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)

... 110 more