Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-24785

Pages can't be "included" if they contain symbols on their titles

    XMLWordPrintable

Details

    Description

      Summary:

      As you can see in my example, the include macro won't work with page names that includes special characters like the slash / symbol

      https://wiki.childno.de/x/IABe

      Steps to Reproduce:

      1. Create page with slash in title
      2. Create a second page. Add include macro to this page

      Workaround:

      Removing the slash from the title of the page will solve the problem for any new pages, but you'll still have old pages which had the broken include macro in your instance. You can delete these pages via the following:

      You'll need to find out what the contentid of the page is, via this query:

      select contentid from content where title = 'TITLE_OF_PAGE_YOU_WANT_TO_DELETE' and prevver is null;
      

      You can then paste the following link into your browser:

      <confluence_base_url>/pages/removepage.action?pageId=THE_CONTENTID_FROM_DB_QUERY

      If you need to recover the contents of the page, you'll need to remove the include macro from the page. Prior to doing any update or delete on your database please make sure to backup both the filesystem and database. Having done so, run:

      update bodycontent set body = regexp_replace(body, '<ac:macro ac:name="include"><ac:default-parameter>.*/.*</ac:default-parameter></ac:macro>', '')  where contentid = (select contentid from content where title = 'YOUR_PAGE_TITLE' and prevver is null);
      

      This will find any include macro with a slash in the the included page's title and remove it from your page.

      Note: This was written for a Postgres database. If you are using something else, you may need to tweak the query.

      Attachments

        Issue Links

          Activity

            People

              vvo Vu Truong Vo (Inactive)
              c34ad611bdfc childnode
              Votes:
              27 Vote for this issue
              Watchers:
              41 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: