Hello,

I am looking to switch my website to Drupal and was looking for information. My site is currently using Zikula (the most recent version) and I would like to be able to migrate all of the content (over 38,000 articles and other pages) to Drupal. What would be involved in migrating from Zikula to Drupal and can I do it myself. I have a pretty good grasp of PHP, CSS, HTML, SQL, and other technologies involved and I like to think that I'd be able to handle it.
Any suggestions would be appreciated.
Thanks,

Chris

Comments

yelvington’s picture

If you can dump your data out of Zikula in pretty much any sane format (arbitrary XML would do), importing is pretty straightforward.

https://www.drupal.org/project/feeds
https://www.drupal.org/project/feeds_ex
https://www.drupal.org/project/feeds_tamper

You also could take a look at the Migrate module, which is a fair bit more complicated.

nview’s picture

So I would use Feeds to dump the data and then use Migrate? Or would I be able to just use Migrate and import the SQL table?
Also, I'm going to guess that doing a data dump would mess up the formatting of the articles. So perhaps Migrate might be able to preserve the formatting? Would this also affect images in the articles?

bander2’s picture

First you need to create content types or make sure the existing ones meet your needs:

https://www.drupal.org/node/21947

Exporting your content from Zikula is up to you, but when you do, make sure it is a format Feeds will understand (information about that is in the links yelvington provided - SQL us not one of them). Then you use Feeds to import data into Drupal.

But that is really just about getting the content moved over. Before you do any of that, you need to build your site with Drupal.

- Brendan

nview’s picture

Looks like that's the best place to start. I'll give it a go and see what I can come up with. Thank you for the suggestions.

nview’s picture

So When I create a new content type do I need to essentially recreate the table from the database so that all of the data goes into the correct fields?
In SQL, the fields for the "News" table are as follows:
# Name Type Collation Attributes Null Default Extra
1 sid int(11) No None AUTO_INCREMENT
2 title varchar(255) utf8_unicode_ci Yes NULL
3 urltitle varchar(255) utf8_unicode_ci Yes NULL
4 hometext longtext utf8_unicode_ci No None
5 bodytext longtext utf8_unicode_ci No None
6 counter int(11) Yes 0
7 contributor varchar(25) utf8_unicode_ci No None
8 approver int(11) Yes 0
9 notes longtext utf8_unicode_ci No None
10 displayonindex tinyint(4) No 0
11 language varchar(30) utf8_unicode_ci No None
12 allowcomments tinyint(4) No 0
13 format_type tinyint(4) No 0
14 published_status tinyint(4) Yes 0
15 ffrom datetime Yes NULL
16 tto datetime Yes NULL
17 weight tinyint(4) Yes 0
18 pictures int(11) Yes 0
19 obj_status varchar(1) utf8_unicode_ci No A
20 cr_date datetime No 1970-01-01 00:00:00
21 cr_uid int(11) No 0
22 lu_date datetime No 1970-01-01 00:00:00
23 lu_uid int(11) No 0

Create new fields in the content type?

bander2’s picture

Content types are not technically tables, but it is sometime helpful to think of them that way. So, yes, you essentially create fields for anything you want to store and/or display with a content type. But a lot of that is boilerplate that Drupal takes care of:

# Drupal takes care of the id (internally called nid 
# for "Node ID")
1 sid int(11) No None AUTO_INCREMENT

# A content type will always have this
2 title varchar(255) utf8_unicode_ci Yes NULL

# Content types have this already in their menu settings
3 urltitle varchar(255) utf8_unicode_ci Yes NULL

# Is this like teaser text? You can create a field for it or configure the 
# body field to have a seperate summary
4 hometext longtext utf8_unicode_ci No None

# Your content type will automatically have this.
5 bodytext longtext utf8_unicode_ci No None

# I don't know what these are for
6 counter int(11) Yes 0
7 contributor varchar(25) utf8_unicode_ci No None

# If you need workflow/approval that's probably a separate issue
8 approver int(11) Yes 0

# If you need this, then sure
9 notes longtext utf8_unicode_ci No None

# Drupal calls this "Promoted to front page" and it is a setting on 
# all content types
10 displayonindex tinyint(4) No 0

# Drupal will take care of this
11 language varchar(30) utf8_unicode_ci No None

# Already supplied with your content type
12 allowcomments tinyint(4) No 0

# I don't know what this is
13 format_type tinyint(4) No 0

# More metadata Drupal already supplies
14 published_status tinyint(4) Yes 0

# I don't know what this is
15 ffrom datetime Yes NULL
16 tto datetime Yes NULL
17 weight tinyint(4) Yes 0

# I don't know that much about migrating media...
18 pictures int(11) Yes 0

# I don't know what this is
19 obj_status varchar(1) utf8_unicode_ci No A

# If these are created and modified dates, then Drupal 
# handles that. Not sure if it stores the user who last
# modified though.
20 cr_date datetime No 1970-01-01 00:00:00
21 cr_uid int(11) No 0
22 lu_date datetime No 1970-01-01 00:00:00
23 lu_uid int(11) No 0

- Brendan

nview’s picture

hometext is the Teaser text.
counter is the number of views for the article.
contributor is who submitted the article (administrator, user, or guest).
format_type I believe is a toggle between either HTML or text.
ffrom datetime and tto datetime relate to publishing options and scheduling of posts.
weight is the weight of the individual article related to others.
I'm not entirely sure what obj_status is for.

So how would I go about dropping the data into the new Content Type? I created a News Content Type. Which fields do you think I need to add?

nview’s picture

Part of my problem could be simply the quantity of articles (over 38,000) and the size of the database (about 130MB). Any suggestions as to how to get around this?

Sam Moore’s picture

That's not an unmanageable Drupal db size. The import might be rather tiresome.
Can you export the data in batches?

nview’s picture

I was thinking that. I'll try importing a smaller file and see what happens. I was getting timeouts when I try to import the full table.

nview’s picture

I tried importing the smaller CSV file into Feeds and it seemed to work but nothing shows up anywhere. Any ideas? Are there other modules that I could use?

yelvington’s picture

but nothing shows up anywhere.

You don't need to switch modules. You do need to work out how to use Feeds. It's very reliable. There are video tutorials on YouTube.

If your import created nodes, all nodes can be seen in the admin/content.

nview’s picture

So I imported the smaller CSV file.
In the Log it says "Updated 999 nodes".
Under Content, there is a new article but it's empty. The Title is "new", Type is Article, Author is "Anonymous (not verified), etc.
Just to clarify, I am looking to copy articles from my Zikula database and into Drupal. The RSS feed on my current site isn't working properly so I'm not sure about importing that way.

nview’s picture

I tried importing 1,000 articles (about 6MB) using Feeds and it said that it imported 688 nodes. There's a new article in Content but it's blank. I know it's a silly question, but where do the nodes appear?

Sam Moore’s picture

That depends entirely upon how you've told the Feed importer to handle incoming content. There are a lot of options, probably too many to go over here - have you found the Feeds how-to content here? https://www.drupal.org/node/622698

You might want to try importing 1/2 dozen or so, just till you get it set up properly to your liking.
You can go back and tell Feeds to delete anything it creates, if you're worried about creating a bunch of stray nodes.

nview’s picture

So I created the following Content Type - News
Here are the Fields

  • Title | title | Node module element | |
  • Feed | feeds | Feeds module form elements
  • Body | body | Long text and summary | Text area with a summary
  • Teaser | field_teaser | Long text | Text area (multiple rows)
  • Pictures | field_image | Image | Image
  • Category | field_category | List (integer) | Select list

I also created a News importer under Feed Importers
Here are the Fields
Basic Settings

  • Attached to content type - News
  • Fetcher - File Upload
  • Parser - CSV Parser
  • Processor - Node Processor
  • Bundle - News
  • Set to "Replace existing nodes"
  • Text format is "Full HTML"
  • "Delete non-existent nodes" is selected

Mapping

  • sid | Node ID (nid) | Used as unique.
  • title | Title (title) | Not used as unique.
  • bodytext | Body (body) | Text format: Full HTML
  • pictures | Pictures: URI (field_image:uri)
  • pictures ALT | Pictures: Alt (field_image:alt)
  • pictures Title | Pictures: Title (field_image:title)
  • Teaser | Teaser (field_teaser) | Text format: Full HTML

Unfortunately, it doesn't appear to be set up correctly.
Here's what I have in my current Zikula (News) module:

  • Title (Article title)
  • Permalink URL (Generated automatically if left blank)
  • Category (articles are divided into different categories; local, provincial, national, police, etc.)
  • Article
  • Index page teaser text (I use this to show sub-titles of the articles)
  • Article body text (the body of the article)
  • Footnote (I use this to show the author/submitter of the article)
  • Pictures (I like to be able to upload more than one photo per article)

I would appreciate any suggestions.

nview’s picture

*Bump* Any suggestions?

Sam Moore’s picture

Has your feed importer ever created any nodes at all?

yelvington’s picture

Don't map anything to nid. Let Drupal own that. Use the ID from your origin system to construct a UUID (Feeds Tamper is good for this) and make that your unique value (which is used by Feeds to identify what it's inserted).

Turn on the debug display so you can see what your parser is finding. 99% of the struggle is getting the fields parsed properly.

Work with small test feeds until you get it figured out.

Don't forget to map your "permalink" to pathalias. This will preserve urls from your source system. Again, Feeds Tamper may be helpful.

Princes660’s picture

great artical

nview’s picture

Are there step by step instructions for this?

bander2’s picture

The documentation has a list of related blogs and presentations:

https://www.drupal.org/node/622696

Everyone's content is different so I doubt you will find step by step instructions that meet your needs. The documentation is probably the best resource.

- Brendan

Anjela Johnoson’s picture

Is there any plugins to migrate from WP to Drupal?

Sam Moore’s picture

Yes - for Drupal 7: https://www.drupal.org/project/wordpress_migrate
Also read the info about the required Migrate module - https://www.drupal.org/project/migrate

I'm not entirely clear whether the D8 Migrate (which is in core) can handle WP on its own, but even if it can't, you could migrate from WP to D7 and then just upgrade that site to D8.

Packt Publishing has a whole book on Drupal migrations, "Migrating to Drupal 7", the last chapter of which deals with WP. It was written for D7, as the title indicates, but perhaps it's been updated or supplemented.