How to remediate Files

Links should always be checked after a site has migrated. Linked files often can direct to page not found or to the WCMS 2 version of the site. If a file is opened and the URL includes ca.site-name, it is opening on the WCMS 2 server. This is unwanted since the link will break once the WCMS 2 site is culled.

There are a variety of ways to remediate file links. Complete the following file remediation practices in order and only try the next method if the previous one did not work.

When the file directs to a page not found or the WCMS 2 version of the site, open the page with the linked file and select the Layout tab. Configure the block that contains the URL of the file and complete the following.

Edit the WCMS 3 link

This method should always be attempted first. These steps are generalized for files linked to CTAs and copy text content.

  1. First edit the link directly by replacing ca.site-name in the URL with default.
    • Example: On the Testing website, staging.uwaterloo.ca/testing/sites/ca.testing/files/uploads/files/testing.pdf would become
      staging.uwaterloo.ca/testing/sites/default/files/uploads/files/testing.pdf
  2. Ensure that the site-name is entered before /sites/.
    • Example: On the Testing website, /sites/default/files/uploads/files/testing.pdf would become
      /testing/sites/default/files/uploads/files/testing.pdf
  3. Make the URL internally linked by removing anything before the site-name (take out https://staging.uwaterloo.ca)
    • Example: staging.uwaterloo.ca/testing/sites/default/files/uploads/files/testing.pdf would become
      /testing/sites/default/files/uploads/files/testing.pdf
  4. If it still does not work, try replacing the second 'files' with 'documents'.
    • Example: On the Testing website, /testing/sites/ca.testing/files/uploads/files/testing.pdf would become
      /testing/sites/default/files/uploads/documents/testing.pdf
  5. Select Update, and select Save layout.
  6. Test the file by selecting the link. The URL should not include ca.site-name.

Find the original file

If replacing ca.site-name or the second files does not work, you will have to locate the original file that was migrated and access its URL path.

  1. In a new tab, from the administration bar, select Workbench, and then select My Dashboard.
  2. Navigate to the Site management menu and select Manage all media.
  3. Select the Files tab.
  4. Search for the file using the Filename (found at the end of the file link) and select Filter.
    • Example: In /testing/sites/default/files/uploads/documents/testing.pdf the filename is testing.pdf
  5. Locate your file in the filtered list and select the hyperlink under the NAME section. Copy anything after uwaterloo.ca from the URL, make sure to include the forward slash before the site name.
    • Example: /testing/sites/default/files/uploads/documents/testing.pdf
      /training-userid/sites/default/files/uploads/documents/testing.pdf of URL is highlghted in yellow
  6. Replace the broken file link, on the page with the broken link.
    1. In the Layout tab, Configure the block containing the file link.
    2. Right-click the link and select Edit Link.
    3. Replace the broken URL with the one copied in Step 5.
    4. Select Save
  7. Select Update.
  8. Select Save layout.

The file does not exist or was not migrated with the site. 

If the orginal file cannot be located, manually upload the file to WCMS 3. Be sure to only upload new files if the orginal absolutely cannot be found. The servers have a file capacity and it’s best practice to avoid duplicated files.

  1. In a new tab, from the administration bar, select Workbench, and then select My Dashboard.
  2. Navigate to the Site management menu and select Manage all media.
  3. Select +Add media, then select File.
  4. Enter the corresponding file Name.
  5. Transfer the original file from WCMS 2 to WCMS 3.
    1. Below File, select Remote URL.
    2. On the WCMS 2 site, navigate to Upload a file and locate the orginal file.
    3. Right-click the filename and select Copy link.
    4. On the WCMS 3 site, paste the link into the File field. Be sure that the link ends with the file extension (e.g. .pdf, .docx, .csv, etc.).
    5. Select Transfer.
  6. Select Save.
  7. Replace the broken file link, on the page with the broken link. For detailed steps refer to How to upload a file.
  8. Select Update.
  9. Select Save layout.

Record file remediations in the Site Migration Remediation Tracker spreadsheet for your site. The spreadsheet template along with instructions and a remediation checklist can be found on the WCMS 3 site migration remediation training page.

Please refer to the known issues web page to view a current list of known issues and their workarounds.