Adding viewfile, viewdoc,... macros using wiki markup does not generate the right XHTML

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Low
    • None
    • Affects Version/s: 4.3.3, 4.3.7, 5.4.1
    • Component/s: 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,...).

            Assignee:
            Steve Haffenden (Inactive)
            Reporter:
            Alejandro Conde Carrillo (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: