There are 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-d7780f2a-871b-4a99-883c-649d3bc52482 XWIKI-18718 Open

Additional unnecessary characters displayed in warning message when editing a subwiki descriptor from Administration

 
View issue   ยท   Add comment
 

2 comments

 
cid:jira-generated-image-avatar-7f673e82-7d8a-4f38-93e2-46ac6f09b803 Nikita Petrenko on 12/Jun/25 09:55
 
Such warning only is displayed on my end (XWiki 17.4.0) if I replace creator of wiki with non-existent user and try to update a description. In the [code|https://github.com/xwiki/xwiki-platform/blob/a017d87871e2cb0a47a8e5b525cc2f4c81c8fdb4/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-ui/xwiki-platform-wiki-ui-common/src/main/resources/WikiManager/AdminWikiDescriptorSheet.xml#L544-L552], - however calling replace function with regex expression and single new line character on content for confirm function doesn't do work and manipulation directly on translation keys in JSX object breaks the load of such component. -

Actually, it seems, parser doesn't like the regex expression at all
{noformat}
/\\n/g {noformat}
 
cid:jira-generated-image-avatar-7f673e82-7d8a-4f38-93e2-46ac6f09b803 Nikita Petrenko on 12/Jun/25 10:03
 
Such warning only is displayed on my end (XWiki 17.4.0) if I replace creator of wiki with non-existent user and try to update a description. In the [code|https://github.com/xwiki/xwiki-platform/blob/a017d87871e2cb0a47a8e5b525cc2f4c81c8fdb4/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-ui/xwiki-platform-wiki-ui-common/src/main/resources/WikiManager/AdminWikiDescriptorSheet.xml#L544-L552], -however calling replace function with regex expression and single new line character on content for confirm function doesn't do work and manipulation directly on translation keys in JSX object breaks the load of such component.-

Actually, it seems, parser doesn't like the regex expression at all
{noformat}
/\\n/g {noformat}


{code}
Caused by: org.apache.velocity.exception.ParseErrorException: Encountered "/" at subwikiglobal:WikiManager.AdminWikiDescriptorSheet[line 21, column 74]
Was expecting one of:
    "\u001c" ...
    "\u001c" ...
    "||" ...
    "|" ...
    "(" ...
    ")" ...
    <ESCAPE_DIRECTIVE> ...
    "]]#" ...
    <WHITESPACE> ...
    <NEWLINE> ...
    <SUFFIX> ...
    <STRING_LITERAL> ...
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <DOT> ...
    "{" ...
    "}" ...
    "\\\\" ...
    "\\" ...
    <TEXT> ...
    <INLINE_TEXT> ...
    <EMPTY_INDEX> ...
    "{" ...
    "\u001c" ...
    "\u001c" ...
    <WHITESPACE> ...
    <NEWLINE> ...
    <WHITESPACE> ...
    <NEWLINE> ...
    <STRING_LITERAL> ...
    "{" ...
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    "(" ...

        at org.apache.velocity.Template.process(Template.java:154)
        at org.xwiki.velocity.VelocityTemplate.compile(VelocityTemplate.java:81)
        at org.xwiki.velocity.internal.DefaultVelocityManager.compile(DefaultVelocityManager.java:186)
        at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:178)
        at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:171)
        at com.xpn.xwiki.web.sx.SxDocumentSource.getContent(SxDocumentSource.java:154)
        at com.xpn.xwiki.web.sx.AbstractSxAction.renderExtension(AbstractSxAction.java:86)
        at com.xpn.xwiki.web.JsxAction.renderExtension(JsxAction.java:120)
        at com.xpn.xwiki.web.sx.AbstractSxAction.render(AbstractSxAction.java:142)
        at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:636)
        ... 56 common frames omitted
{code}