Info: This feature requires Enterprise Server version 9.8.1 or higher.
This article describes how to integrate Drupal 8 in Enterprise to make it possible to publish from Enterprise to a Web environment based on Drupal 8.
Note: For other versions of Drupal, see:
Steps to perform
Steps need to be performed in Drupal and in Enterprise Server.
Steps in Drupal
Steps in Enterprise Server
Note about verifying the installed version of PHP: Drupal 8 requires PHP 5.4 or higher to be installed. Therefore, verify that at least this version is installed or if needed, upgrade to this minimum required version.
Step 1. Set up a default installation of Drupal by following the instructions as outlined on www.drupal.org:
The Drupal integration requires the following modules:
- XML-RPC. Download this from the Drupal Web site.
- HTTP Basic Authentication. This module is available by default, it does not need to be downloaded.
- WoodWing Enterprise. Download the file named Enterprise Drupal 8 Integration from the software download page.
Step 2. Unzip the downloaded files and copy them to the following location:
Step 3. Modify the XML-RPC module:
Step 3a. Open /Drupal8/modules/xmlrpc/xmlrpc.routing.yml
Step 3b. Add the following :
_auth: [ 'basic_auth' ]
Note: Make sure that these lines contain leading spaces.
Step 3c. Save and close the file.
Step 4.Enable the 3 modules:
- HTTP Basic Authentication
- WoodWing Enterprise
Users need to be set up and given permissions to perform specific tasks.
Typically you will set up the following types of users:
- One administrator account that is used for importing Publish Form templates and taxonomies from Drupal into Enterprise Server
- One or more regular users who will publish content from Content Station to Drupal
Step 3. Create a user with the role of 'Administrator' and one or more user with the role of 'Authenticated User'.
Caution: Do not use the user that was created during installation for the administrator role. This user has ID '1' and is therefore made exempt from any permission check by Drupal. As a result, the Drupal core will always state that the user has the requested permission. Instead, create a dedicated user for the administrator role.
Step 3a. Assign the following permissions to the Administrator role:
- Bypass content access control. This allows import rights for all content types.
- Administer vocabularies and terms. This allows importing the taxonomies for the auto-complete and suggestion services.
Step 3b. Assign the following permissions to the Authenticated User role:
- Node > (Content Type name): Create new content. This allows to create a new post on Drupal.
- Node > (Content Type name): Delete any content. This allows to remove a published post from Drupal.
- Node > (Content Type name): Edit any content. This allows to edit a published post on Drupal.
The components of a Drupal post (a title, teaser, body text, images and so on) are configured in Drupal as fields in a content type. Enterprise can import these content types and convert them into Publish Form templates. The content type fields are used as custom properties in the Publish Form template.
Step 4. Create a content type in Drupal for each type of Drupal post and add the required fields.
In Drupal, access Structure > Content Types and click + Add content type.
Example: Content types that could be created are those for a news article, blog post, recipe, poll, and so on.
Note: Restrictions exist for the types of fields and their properties that can be imported by Enterprise. For more information, see Supported Drupal fields for use in Publish Form templates in Enterprise 9.
The Drupal functionality in Enterprise is provided through the "Drupal 8 - Publish Forms" Server plug-in. This plug-in needs to be installed and enabled.
Installing the plug-in:
Step 6. Download the file named Drupal8_Enterprise_Plugin_v9.x.x_Buildxxx.zip from the software download page.
Step 6a. Unzip the file and place the resulting 'Drupal8' folder in the following location:
- <your Enterprise Server installation>/config/plugins/
Enabling the plug-in:
Step 6b. Log in to Enterprise Server.
Step 6c. Click Server Plug-ins in the Maintenance menu or on the Home page. The Server Plug-ins page appears.
Step 6d. Enable the plug-in named Drupal 8 - Publish Forms by clicking the Unplugged icon . It changes to a Plugged In icon .
The Enterprise Server plug-in needs to be configured with the URL for the Drupal site and the credentials for the administrator.
Step 7. Open the following file:
- <your Enterprise Server installation>/config/plugins/Drupal8/config.php
Step 7a. Locate the 'sites' section:
$sites = array(
'label_of_the_first_instance' => array( // Site label.
'url' => '', // Url of the Drupal instance.
'username' => '', // The username used for importing / publishing.
'password'=> '', // The password of the selected user.
For each Drupal site, enter the following details:
- Label. A representative name for the Drupal site.
Note: This name will appear on the Publication Channel Maintenance page as an option in the 'Web Site' list.
- url. The URL of the Drupal site.
Note: This needs to end with a forward slash '/'.
- username. The user name of the user who is assigned as the administrator
- password. The password for the user.
Example. In this example, 2 sites are configured:
Publishing to your Drupal 8 Web site from Enterprise is done through a Publication Channel.
Step 8. In Enterprise Server, create a new Publication Channel for a Brand:
Step 8a. In the Name field, enter a name.
Step 8b. In the Description field, enter a description.
Step 8c. From the Publication Channel Type list, choose Web.
Step 8d. From the Publish System list, choose Drupal 8 — Publish Forms.
Step 8e. (Optional, only when tags should be automatically suggested. See About adding tags to Web articles). From the Suggestion Provider list, choose the provider for suggesting tags.
Note: The default Suggestion Provider in Enterprise is the one from OpenCalais.
Step 8f. Click Create. The Drupal Account options appear.
Step 8g. Fill out the properties:
- Web Site: the name of your Drupal site.
- Certificate: (Optional, required for HTTPS (SSL) connections only.) The full file path of the local CA certificate file (in PEM format). See the SSL SDK for how to generate certificates.
Step 8h. Click Update.
Step 8i. Create an Issue by clicking the Add Issue button and subsequently entering at least a name for the Issue.
Step 8j. Click Update.
Step 9. Test if the integration has been performed successfully by following these steps:
Step 9a. In the Maintenance menu, click Advanced. A page showing links to advanced Enterprise options appears.
Step 9b. Click Health Check. The Health Check page appears.
Step 9c. Run the Publish to Drupal - Publish Forms test. The test result is displayed.
Step 9d. (Optional, only if the test failed). Follow the instructions and run the test once more after making any changes to the Drupal configuration. Repeat this process until the test is performed successfully.
The content types that were set up in Drupal need to be imported into Enterprise so that they can be used as Publish Form templates. Similarly, any taxonomies that are defined in Drupal can be imported for use as tags in a Publish Form.
Step 10a. Access the Drupal 8 Maintenance page in Enterprise Server.
- In Enterprise Server, click Integrations in the Maintenance menu or on the Home page. A page with all integrated services appears.
- Click Drupal 8. The "Import Content Types from Drupal" Maintenance page appears.
Step 10b. (Optiona) From the Publication Channels list, choose the channel from which you want to import.
Step 10c. Make sure that the check boxes for importing content types and taxonomies are both selected.
Step 10d. Click Import.
The import is performed and the result of the import action is displayed.