Skip to main content
Table of contents

Publishing

Rename a country

Note

We recommend you test out these instructions in integration and then staging before using them in production.

Renaming a country affects these pages:

  • https://www.gov.uk/foreign-travel-advice/<country_slug>
  • https://www.gov.uk/world/<country_slug>
  • https://www.gov.uk/world/<country_slug>/news
  • https://www.gov.uk/foreign-travel-advice/<country_slug>/email-signup/
  • https://www.gov.uk/email/subscriptions/new?topic_id=<country_slug>

1. Update Travel Advice publisher

Example PR: https://github.com/alphagov/travel-advice-publisher/pull/539/files

This will update www.gov.uk/foreign-travel-advice/<country_slug> to www.gov.uk/foreign-travel-advice/<new_country_slug>.

In Travel Advice Publisher:

  1. Create a pull request with:

    • A migration to update the relevant country_slug of TravelAdviceEdition. Example
    • A change of the relevant name and slug in the lib/data/countries.yml file. Keep content_id and email_signup_content_id the same, and ensure the alphabetical order of the list is respected. Example
  2. Deploy Travel Advice publisher

  3. Run rake tasks

  4. Update the search metadata

    • In the UI, go to the country and create a new edition
    • Tick the “minor update” checkbox and update the Search title and Search description fields with the updated country name.
    • Save and publish.

2. Update Worldwide Taxons

Example PR: https://github.com/alphagov/search-api/pull/1436

This will update www.gov.uk/world/<country_slug> to www.gov.uk/world/<new_country_slug>.

In Search API:

  1. Create a pull request with a change to the relevant country taxon in config/govuk_index/migrated_formats.yaml
  2. Deploy Search API

In Content Tagger:

  1. View the taxon from the list
  2. Under Tasks go to Edit taxon, and update the base path, internal taxon name, external taxon name and any others with the new country name
  3. Save the draft and publish.

The old slug might still appear as a duplicate in our internal GOV.UK search,

Note

Updating the child taxons linked to the country taxon (“UK help and services in country”) will be a content task.

3. Update Whitehall

Example PR: https://github.com/alphagov/whitehall/pull/4643

This will update /world/<country_slug>/news.

In Whitehall:

  1. Create a data migration to update the slug and name fields of the WorldLocation table.
  2. Deploy the PR
  3. Update World Location News
    • Go to the relevant country in World Location News and in the “Details” tab edit the Title, Mission statement and relevant Featured links.

4. Update Smart-answers

Example PR: https://github.com/alphagov/smart-answers/pull/3899/

Note

smart-answers validates country names against the production worldwide API, which is managed by whitehall. So do this after deploying the Whitehall change.

This will update content from pages served by smart-answers such as:

  • https://www.gov.uk/marriage-abroad
  • https://www.gov.uk/check-uk-visa
  • https://www.gov.uk/register-a-death/y/overseas

In Smart-answers:

  1. Create a pull request that replaces all instances of country_name with new_country_name.

  2. Check changes are reflected in the affected smart answers

  3. Deploy the PR

5. Update Email-alert-api

The country’s subscription list(s) title and slug needs to be updated, such as:

  • “Publications related to <country_name>
  • <country_name> - travel advice”
  • <country_name>
  1. Run the rake task manage:find_subscriber_list_by_title[title] with the country name to see which subscription lists need to be updated
  2. Run the rake task manage:update_subscriber_list[slug,new_title,new_slug] to update the subscription lists

Note

You can test the emails are being sent out correctly in integration and staging by following Receive emails from Email Alert API in integration and staging

6. Remove duplicate search results

In Whitehall run SearchIndexDeleteWorker.perform_async(instance.search_index['slug'], instance.rummager_index)

Failing this, there is a rake task that takes care of this.

This page was last reviewed on 20 June 2019. It needs to be reviewed again on 20 December 2019 by the page owner #govuk-2ndline .
This page was set to be reviewed before 20 December 2019 by the page owner #govuk-2ndline. This might mean the content is out of date.