Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-3722

TOC macro conversion fails

    XMLWordPrintable

    Details

    • Difficulty:
      Unknown
    • Similar issues:

      Description

      The XWiki Syntax conversion fails on our toc macros:

       
      #toc("2","5","false")
      

      is converted to

       
      {{toc start="2" depth="," numbered=","/}}
      

      And then on the page this exception is displayed:

      Invalid macro parameters used for macro: toc
      java.lang.reflect.InvocationTargetException
      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:585)
      at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2155)
      at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2141)
      at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1948)
      at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:2054)
      at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1015)
      at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:830)
      at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:433)
      at org.xwiki.rendering.internal.transformation.MacroTransformation.transformOnce(MacroTransformation.java:155)
      at org.xwiki.rendering.internal.transformation.MacroTransformation.transform(MacroTransformation.java:112)
      at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:86)
      at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5079)
      at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5052)
      at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:501)
      at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:454)
      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:585)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
      at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
      at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
      at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
      at org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:178)
      at org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:143)
      at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
      at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1605)
      at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:656)
      at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
      at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
      at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
      at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
      at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
      at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
      at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
      at org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:178)
      at org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:143)
      at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
      at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1605)
      at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:124)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:226)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:145)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:111)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: org.xwiki.rendering.macro.parameter.ParameterValueTooLowException: The value is too low. The lowest allowed value is 1.
      at org.xwiki.rendering.macro.toc.TocMacroParameters.setDepth(TocMacroParameters.java:101)
      ... 90 more

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              hor Reto Hotz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: