Details
-
Bug
-
Resolution: Unresolved
-
Blocker
-
15.10.11, 16.9.0
-
Unknown
-
Description
Reproduction steps:
- Create a page containing [[B>>xwiki:B.WebHome]]
- Click on the link to create that page
Expected result:
- A modal is opened to propose creating that page
Obtained result:
- An error appears in the UI:
- The following stacktrace appears in the console:
Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with namespace [environment:/templates/createinline.vm] at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:227) at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:107) at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:219) ... 81 common frames omitted Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'createDocumentReference' in class org.xwiki.model.script.ModelScriptService threw exception java.lang.IllegalArgumentException: Invalid parent reference [null] in a document reference at environment:/templates/createinline.vm[line 400, column 62] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:308) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:235) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368) at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:704) at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:75) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:242) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439) at org.apache.velocity.Template.merge(Template.java:358) at org.apache.velocity.Template.merge(Template.java:262) at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:225) ... 83 common frames omitted Caused by: java.lang.IllegalArgumentException: Invalid parent reference [null] in a document reference at org.xwiki.model.reference.DocumentReference.setParent(DocumentReference.java:246) at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:158) at org.xwiki.model.reference.AbstractLocalizedEntityReference.<init>(AbstractLocalizedEntityReference.java:76) at org.xwiki.model.reference.DocumentReference.<init>(DocumentReference.java:177) at org.xwiki.model.script.ModelScriptService.createDocumentReference(ModelScriptService.java:146) at jdk.internal.reflect.GeneratedMethodAccessor573.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:569) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221) ... 93 common frames omitted
Attachments
Issue Links
- is caused by
-
XWIKI-20869 Users can be tricked to execute scripts as the create action doesn't display the page's title
- Closed