Details
-
Bug
-
Resolution: Solved By
-
Major
-
None
-
1.47
-
None
-
None
-
Unknown
-
Description
When copying an table row that contains one or multiple macro (in this example the calc macro), the pasted row contains the macro code instead of the macro tag in the CKEditor source:
Before:
|=Type|=Description|=Mfg Number|=Serial / Product Key|=Delivery Date|=Supplier|=Our Price|=Cur.|=Ex Rate|=Our Price CHF|=Margin|=Gain|=Ship Cost|=Total |Storage|This is the INTERNAL product description,| | | | |11.23|CHF|1.0000|{{calc formula="$G*$I"/}}|1.05|{{calc formula="$J*$K - $J"/}}|8.00|{{calc formula="$J*$K+$M"/}}
After pasting the lower row again to the same table:
|=Type|=Description|=Mfg Number|=Serial / Product Key|=Delivery Date|=Supplier|=Our Price|=Cur.|=Ex Rate|=Our Price CHF|=Margin|=Gain|=Ship Cost|=Total |Storage|This is the INTERNAL product description,| | | | |11.23|CHF|1.0000|{{calc formula="$G*$I"/}}|1.05|{{calc formula="$J*$K - $J"/}}|8.00|{{calc formula="$J*$K+$M"/}} |Storage|This is the INTERNAL product description,| | | | |11.23|CHF|1.0000|(% contenteditable="false" tabindex="-1" data-widget="xwiki-macro" class="macro macro" data-macro="startmacro:groovy|-||-| def calc = xwiki.parseGroovyFromPage(~"xwiki:Macros.CalcGroovy~") def value = calc.calc(xcontext.macro.context.getCurrentMacroBlock(), xcontext.macro.params.type, xcontext.macro.params.formula, xcontext, xwiki) println calc.format(value, xcontext.macro.params.format) if (request.debug) { // println calc.getDebug() }" %)11.23|1.05|(% contenteditable="false" tabindex="-1" data-widget="xwiki-macro" class="macro macro" data-macro="startmacro:groovy|-||-| def calc = xwiki.parseGroovyFromPage(~"xwiki:Macros.CalcGroovy~") def value = calc.calc(xcontext.macro.context.getCurrentMacroBlock(), xcontext.macro.params.type, xcontext.macro.params.formula, xcontext, xwiki) println calc.format(value, xcontext.macro.params.format) if (request.debug) { // println calc.getDebug() }" %)0.56|8.00|(% contenteditable="false" tabindex="-1" data-widget="xwiki-macro" class="macro macro" data-macro="startmacro:groovy|-||-| def calc = xwiki.parseGroovyFromPage(~"xwiki:Macros.CalcGroovy~") def value = calc.calc(xcontext.macro.context.getCurrentMacroBlock(), xcontext.macro.params.type, xcontext.macro.params.formula, xcontext, xwiki) println calc.format(value, xcontext.macro.params.format) if (request.debug) { // println calc.getDebug() }" %)19.79 | | | | | | | | | | | | | |
When the document is saved this way, the page cannot be opened in CKEditor any more. Displaying the xWIKI source will display a mix of any macro's part of that page and also sometimes a stack trace.
Usually one needs to revert to a previous version ... funny part. Displaying the page works!
Attachments
Issue Links
- relates to
-
XWIKI-22391 Error in WYSIWYG when copy/pasting a row with the mention macro
- Closed
- links to