This tutorial is designed for giving an easy and complete guide for automatic content migration between Satellite websites. The original motivation for the task was the desire to push National Partners to all local websites in order to make life easier for the Partnership Manager and for increasing the stance of the National Board in negotiation with partners.
At this point, I'd like to express my big thanks to Petr ZoufalĂ˝, who has already worked on a similar project and given very helpful information.
The setup is quite easy to understand and partitioned into two major parts: the export setup of the sending website and the import setup of the receiving website. If you just want to transfer standard content types (event, page, news, partner), you should be able to complete the task in about 30 minutes. For working on more complex cases, I recommend you to take some hours of your time. The options are very flexible and you can save a considerable amount of time and work for your protegés over the course of the years. This tutorial is also suitable for automatically migrating content from one website to another without having to create every piece of content manually.

PART 1: SETTING UP THE EXPORTING PAGE

Introduction

It is sensible to start off with the page that the content is to be copied from. To give an example, I'll take esn-germany.de. The content you want to send to another site needs to be formatted in a way that is readable by the modules of the receiving site. This can be accomplished in the form of a feed. By standard, every Satellite page creates RSS feeds for the content types Partner, News, and Event (available e.g. at http://esn-germany.de/partners/feed). This feed can be used, but it does not contain all fields that need to be transferred for the complete transmission of the content. Therefore, an export feed in XML format will be set up in this step-by-step tutorial.

Prearrangement

Install and activate the module Views data export.
Set the necessary rights at People >> Permissions. You need to be logged in with an account that has the permission Administer views. There have been some issues with the permissions settings, meaning that the permissions were set correctly, but access was still denied. If you receive any "access denied" message in the process, please try using the User 1 account (the one that has been created during the installation of the website). It automatically receives all permissions.

Setting up the export feed

The easiest way for setting up an export view is to use the code provided in this file:

xml_export_view.txt

Just navigate to Structure >> Views >> Import and paste the text from the file into the marked field and hit Import and Save in the following window. For the example of the partners, you will now find the export feed under http://esn-germany.de/partners/xml or in the same relative position in your own domain, respectively. For the other content types, just adapt the URL accordingly (e.g. http://esn-germany.de/events/xml).
The settings are designed to deal with the standard content types of Satellite 4.5, but should generally work for newer and older versions as well. If you are experiencing trouble, please contact me. I'll try to help you. If you want to transfer self-made content, I'll try to help you as well, if you contact me.

PART 2: SETTING UP THE IMPORTING PAGE

Introduction

You have successfully configured the export page's feed in the first part of this tutorial. We're already half way there. The second part is the setup of the importing page. As an example, I'll take http://braunschweig.esn-germany.de. The page is supposed to copy all partners from esn-germany.de and add them to the local partners.

Prearrangement

Install and activate the modules Feeds Extensible Parser and Feeds Admin UI (the latter is already installed in Satellite and just needs to be activated). The permission settings are the same as the ones in the first part of the tutorial.
Note: If you want to import Events, you additionally need to install and activate the module Feeds Tamper to adapt the date format to a machine-readable format.

Setting up the feed importers

Analogous to the export setup in part 1, the easiest way for setting up the imports is to use the code provided in these files:

xml_event_importer.txt
xml_news_importer.txt
xml_page_importer.txt
xml_partner_importer.txt

Please navigate to Structure >> Feeds Importers >> Import Importer and paste the text from the respective file into the marked field and hit Import. You can ignore the other options.
For the example of the Partners, you can now navigate to Content >> Import >> XML Partner Importer. If the items are not shown in your menu, just type your equivalent to http://braunschweig.esn-germany.de/import in the address bar. Now please enter the feed's URL that you have set up earlier in the tutorial (e.g. http://esn-germany.de/partners/xml) into the field named URL. You can manually import the content right now or you can wait until cron has run next time (which usually happens every few hours). The predefined settings in the text files cause an update of the content types Partner, Event, and News once per day. Pages are only imported on submission. For changing the settings, navigate to Structure >> Feeds Importers and look for the point Basic Settings.
Note: For importing the date of the events, it is necessary to tamper with the format of the start and end date. To do so, please navigate to Structure >> Feeds Importers >> XML Event Importer >> Tamper and search for the field start-date -> Date: Start. Hit Add plugin, choose the option Truncate, and set the options to 10 characters (e.g. for 2017-01-11). Repeat the same for end-date -> Date: End. Thus, only the days are transferred and the hours and minutes are lost. I haven't found a suitable format for the complete time, yet. If you know one, I'd be thankful for the information.

Happy hacking and please feel free to contact me :)

Satellite 4
Last modified: 
Fri, 03/08/2018 - 10:34