How Can We Help?

Multiple Language Bug Report

Mukurtu CMS 2.1.7 includes a fix for a bug that could occur when an item was created through the web interface and later updated through roundtrip batch import. Depending on the workflow used in your site, this may have affected none of your items, a small number of items, or potentially many items. 

When updating affected items through batch import, certain fields could be stored using multiple language tags, effectively creating two versions of the same field(s) within the item. For affected items, this is most obvious in the following two ways:

  • When an item is exported, the exported metadata in the CSV spreadsheet does not match the metadata displayed on the site when viewing (not editing) the item. 
  • When an item is edited in the web interface, the metadata shown on the edit page does not match the metadata displayed when viewing the item. 

Beginning with Mukurtu CMS 2.1.7, this bug has been fixed and will not affect new items (a partial fix was included in 2.1.6). However, if an item was affected before updating to 2.1.7, it will need to be identified and corrected.  

We strongly recommend that all users updating to 2.1.7 who make use of roundtrip tools follow the steps below to identify affected items and resolve any issues.  

Running the Multiple Language Report Tool 

1) As a drupal administrator or a Mukurtu Administrator, go to /admin/reports/mukurtu/run-multiple-language-report (eg: https://myURL.com/admin/reports/mukurtu/run-multiple-language-report). The system will automatically begin running a check for affected items. 

2) If no items that have fields with multiple languages are found, no further action is needed! 

3) If the report does identify affected items, they will be displayed by their node ID (hyperlinked to the items in question), and the affected fields will be listed. 

Not all the field names will be immediately obvious. For example, in these screenshots, “body” is the Cultural Narrative field, and “field_tags” is the Keywords field, respectively.  

If you need to check the field name, you can see a complete list (compare the Label and Name columns) at /admin/structure/types/manage/digital_heritage/fields (eg: https://myURL.com/admin/structure/types/manage/digital_heritage/fields) 

4) Affected items will have the relevant fields will colored either green or red. 

4a) Fields in green indicate that there are multiple versions of the field, and they have the same metadata in both fields. If an affected item only lists green fields, the item can be resolved by following the steps below without performing a detailed comparison of both versions of the field(s). 

4b) Fields in red indicate that there are multiple versions of the field, with DIFFERENT metadata. These fields need to be closely inspected to ensure that the correct metadata is preserved when resolving the item. It is strongly recommended that someone who is familiar with the item and can verify what the correct metadata is should be involved in reviewing any of these items. 

5) To inspect affected fields, click on the hyperlinked node ID in the report to go to the item in question. In this example, we are looking for an issue in the category field. 

5a) When viewing the item, we can see that the only category displayed is “General”. However, when on the edit page for the item, we can see that additional categories are selected, but not displaying. 

Backing up site data 

If the Multiple Language Report Tool identifies a substantial number of affected items, we strongly recommend generating a backup of the site (or identifying a recent backup to use if needed) before resolving affected items. The steps below will effectively override and replace the metadata with a new version, and older versions can only be restored from a site backup. 

Generating a site backup is *not* the same as simply exporting items through roundtrip tools, as that will only export one set of the multiple fields. A more comprehensive “database dump” or full backup is required – contact your hosting provider for more information. 

Resolving items identified by the Multiple Language Report Tool 

Affected items can be corrected by exporting the items, ensuring that the exported spreadsheet has the correct metadata, and then re-importing the items. At this time, we do not have an option to batch process affected items, since they may need individual review – this must be done one item at a time. 

For “green” items (multiple versions of field(s), but with the same metadata), you can omit steps 6-8 below. These items only need to exported and re-imported, with no editing or review required. 

For “red” items (multiple versions of field(s) with conflicting metadata), you should follow all steps below and closely review affected fields. 

It is strongly recommended that someone who is familiar with the item and can verify what the correct metadata is should be involved in reviewing any of these items. 

1) Export the item by clicking on the “Item Menu”, then selecting “Export” from the dropdown menu. 

2) In the export settings, select the three options shown below, and click “Next”. 

  • Content identifier format * 
    • Export internal content identifiers for re-import 
  • Export related content * 
    • Export only the selected content 
  • Export files * 
    • Export metadata only 

3) The field export settings likely do not need to be changed, just ensure that the affected fields are checked for download (they likely will be by default). When ready, click “Download”. 

4) You will likely be prompted to save an “export.zip” file, or the file will automatically download (the exact behavior will depend on your operating system and browser settings). 

5) Expand the “export.zip” folder to view the included “Node – Digital Heritage.csv” file. In most modern operating systems, you can expand a zip folder by double clicking, or right clicking on it to expand or extract the contents. This will vary by operating system. 

6) Open “Node – Digital Heritage.csv” in a compatible spreadsheet tool. We suggest LibreOffice, OpenOffice, or Google Sheets. Microsoft Excel is not recommended. Please see File formats, character encoding, and spreadsheet tools for more information. The example shown here uses LibreOffice on a mac. 

7) Locate the affected fields and ensure that the metadata is correct/as expected. Please see Digital heritage metadata fields for roundtrip for more information on correctly filling in all fields.  

7a) If the correct information had already been batch imported, but wasn’t displaying, the information in this sheet may already be correct. 

7b) You will likely want to compare the affected fields in the spreadsheet with the item as it displays on the site.  

8) If you made any changes to the spreadsheet, save it, ensuring that it is saved as a UTF-8 encoded CSV file. 

9) Re-import the updated spreadsheet following the directions in Importing a digital heritage metadata spreadsheet