We get a lot of questions asking how to migrate data from a D6 YaleSites to D7 or from other web formats (HTML or other CMS). At this time, there is no direct method to migrate content, however, much of the data can be migrated using the Feeds Module. With a little preparation, this process can provide a relatively painless way to facilitate moving the content from one location to the other.
Feeds Module pulls data from a feed or file into a Content Type with fields that match data structure being imported. When configuring the Feeds module, the fields are mapped so the data is available in the correct fields the field names in the file are mapped to the fields in the Content Type.
**Important Note: some of the techniques in this tutorial require advanced knowledge i.e. creating Custom Content Types, Views, Excel Macros etc.
You have a page that lists the department names, chairs, phone and fax numbers. You will need a comma delaminated text file and Content Type with those fields. The Content Type needs to be structured with the same fields as the data that is being imported.
The text file would be structured like this:
The Content Type would require the following fields:
In order to import the data, the content needs to be in a format that can be read by the Feeds importer – in this case a CSV file which is a text format that can be generated with an Excel spreadsheet. If the data is already in table form, where each field is in its own column, you can copy and paste it from the web page directly to an Excel Spreadsheet. If not, you will need to do some configuration to ensure the data can be mapped to the fields in your content type. Important Note: If you do not have a unique field in your listing, you will need to create a GUID field/column to ensure no overlap of data.
If you are importing from another YaleSites (D6 or D7) you can create a page display in a View using the Table format, where each column contains a where the data displays. Be sure to set the view to display all records.
Department |
Chair |
Phone |
FAX |
English |
Michael Warner |
203-432-2233 |
203-432-7066 |
Physics |
C. Meg Urry |
203-432-3650 |
203-432-6175 |
The Content Type is where the data is transferred with the fields module. For each column in your table/or text field, you need to have a field where the data ultimately will live. For this example, we would create a Content Type with the following fields:
Once you have created your importer and your CSV file is all set, you just need to import the data.
OK, you’ve created the importer and prepared the data. You click on the Import button and nothing happens - either no records are imported or only a partial list was imported. This is actually very common because the data needs to be cleaned up a little so that is can be read by the database. Here are some things you can do to ensure that your data gets imported quickly and accurately:
The Feeds Tamper Module allows you to adjust content that a feed is importing before it is saved. When enabled, the Feeds Tamper Module provides a variety of plugins that help to “purify” the data before it is imported by decoding or encoding HTML characters, stripping HTML, changing the case of characters and many more. See the Full List of Plugins for existing plugins.
Gremlins are are unwanted characters that you can’t see but the database can (and it doesn’t like them). This is very frustrating because you can’t “see” the problem in your basic text or CSV file; but the import will stop when the database gets to the first hidden character. In order to avoid this, you need to remove the gremlins/unwanted characters before you import the file:
MAC
PC