-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
4.3.3, 4.3.7, 5.4.1
-
None
If you insert a viewdoc macro using the wiki markup shortcut, that is typing
{viewdoc:filename.doc}
the wiki markup code differs from the one generated by adding the same macro from the macro browser:
Using wiki markup | <ac:macro ac:name="viewdoc"><ac:default-parameter>test.doc</ac:default-parameter></ac:macro> |
Using macro browser | <ac:macro ac:name="viewdoc"><ac:parameter ac:name="name">test.doc</ac:parameter></ac:macro> |
As a consequence, macros added using wiki markup shortcuts cannot be edited.
This is also affecting content migrated from previous versions using wiki markup.
Workaround:
You can add the macro using the following string instead:
{viewdoc:name=filename.doc}
In Oracle database this can be changed in DB with the following query:
This will modify your database. Please take a backup or your instance before applying these changes.
UPDATE bodycontent SET body = REGEXP_REPLACE(body, '<ac:macro ac:name="viewfile"><ac:default-parameter>(.+)</ac:default-parameter></ac:macro>', '<ac:macro ac:name="viewfile"><ac:parameter ac:name="name">\1</ac:parameter></ac:macro>') WHERE contentid IN ( SELECT contentid FROM content WHERE prevver IS NULL AND contenttype IN ('PAGE','BLOGSPOT') AND content_status='current');
You will need to change the text viewfile by the name of the macro you want to migrate (viewdoc, viewxls,...).