Skip to content

Instantly share code, notes, and snippets.

@sidedwards
Last active February 18, 2020 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sidedwards/ef9fea2e4283f456766b84e6eb627f99 to your computer and use it in GitHub Desktop.
Save sidedwards/ef9fea2e4283f456766b84e6eb627f99 to your computer and use it in GitHub Desktop.

Translations Upgrade Workflow (3.1 => 3.2)

Important Notes:

Craft 3.2 introduces a new Draft service that allows drafts to be created for all elements instead of being Entry specific. Unfortunately, with this new draft service the original draftIds from the entrydrafts table are not retained. Due to this fundamental restructuring of how Craft handles its Drafts, we are unable to retain any drafts created with previous versions of the plugin.

We apologize and understand the inconvenience, and did everything we could to prevent this scenario, but due to the nature of this change in Craft, we were unable to preserve existing drafts.

We strongly recommend completing all existing translation orders and publishing their drafts prior to upgrading. If you're unable to complete these orders, please reference this gist which will show you how to create a list of Entries along with their target sites to help speed up the order re-creation process post upgrade.

For Acclaro Services Customers: All previously translated content is stored in Acclaro's translation memory system and is in not impacted by this Craft update. If translation Orders need to be recreated for already translated content, let us know any help you need. Once the re-orders are submitted existing translations can be re-delivered very quickly.

Upgrade Guide

Step 1. Complete translation orders

  • Complete all in-progress or outstanding translations orders and ensure that translations are published

Step 2. Clean up existing drafts

  • Create database backup

  • Clean up entrydrafts table by running the following SQL query

      -- Don't forget to add table prefixes if necessary
    
      delete
      from `entrydrafts`
      where `id` in (select `draftId` from `translations_files`);

    Note: This will speed up the upgrade process. In v1.2+ we automatically delete translation drafts if an order is deleted or if the plugin is uninstalled.

Step 3. Upgrade Craft

  • Perform Craft 3.2 upgrade
  • Upgrade any relevant 3rd party Field plugins
  • Create another database backup now that we're on Craft 3.2

Step 4. Upgrade Translations plugin

  • Upgrade Translations plugin to v1.2 via composer or the plugin store

      composer update acclaro/translations

    IMPORTANT: v1.2.0 includes a migration which removes all existing rows from the translations_files and translation_orders tables.

    This will remove all translation orders and files from your install.

Step 5. Recreate Orders (if applicable)

  • If there were any orders that were not completed prior to upgrading, please reference the CSV spreadsheet created above to create and submit the new orders.

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment