The functionality of publishing content to Drupal is provided through an Enterprise Server plug-in. This plug-in provides a Publish Form template with which a post can be published to Drupal.
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: |
Info: Support for Drupal and the use of Publish Forms is not available in Enterprise Server 10.6 or higher.
Steps to perform
Steps need to be performed in Drupal and in Enterprise Server.
Steps in Drupal
3. Setting up users and assigning permissions
5. (Optional) Enabling Drupal to be embedded in a frame on another site
Steps in Enterprise Server
6. Installing the Enterprise Server plug-in
7. Configuring the Enterprise Server plug-in
8. Creating a Drupal 8 Publication Channel
10. Importing the Drupal content types and taxonomies
1. Setting up Drupal
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. See also Installing and configuring PHP for use with Enterprise Server 10. |
Set up a default installation of Drupal by following the instructions as outlined on www.drupal.org:
2. Installing Drupal modules
The Drupal integration requires the following modules:
- XML-RPC. Download this from the Drupal Web site.
Note: Multiple downloads are made available on the Drupal site. Make sure to download the link under 'Version', not the link under 'Development releases'.
- Auto Login URL. (Not applicable to Enterprise Server 10.0.x or 10.1.x). 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 Module from the software download page.
Optional Drupal modules:
- Dynamic Entity Reference. (Requires Enterprise Server 10.1.2 or higher). By making use of Drupal Entities, you can let users enter or add data based on values that are predefined in Drupal. For example: instead of having to manually type the name of an author or product (with the risk of misspelling it) the user can choose from a list of Drupal user accounts or a list of product names. This list is defined as an Entity in Drupal.
With the Dynamic Entity Reference module, multiple Entities can be linked from within the same field. For example: the Tags field can be set up to make use of multiple entities.
The module can be downloaded from the Drupal Web site.
Step 1. Unzip the downloaded files and copy them to the following location:
<drupal directory>/modules/
Step 2. Modify the XML-RPC module:
Step 3. Open /Drupal8/modules/xmlrpc/xmlrpc.routing.yml
Step 4. Add the following :
options:
_auth: [ 'basic_auth' ]
Note: Make sure that these lines contain leading spaces.
Example:
|
Step 5. Save and close the file.
Step 6. Enable the following modules:
- XML-RPC
- Auto Login URL
- HTTP Basic Authentication
- WoodWing Enterprise
3. Setting up users and assigning permissions
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 1. 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 2. 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 3. 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.
- Taxonomy > Administer vocabularies and terms.
4. Configuring Content Types
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.
Task: 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 10.
5. (Optional) Enabling Drupal to be embedded in a frame on another site
When Content Station 9 Web is used in combination with Drupal 7.5 or higher, previewing the post from Content Station 9 Web only works when Drupal is allowed to be embedded in a frame on another site.
To make this work in Drupal 7.5 or higher, do the following:
Step 1. Open the following file in your Drupal installation:
/<web-server-root-folder/Drupal/sites/default/settings.php
Step 2. At the bottom of the file, add the following:
// Turn off the X-Frame-Options header entirely, to restore the previous
// behavior of allowing the site to be embedded in a frame on another site.
$conf['x_frame_options'] = '';
Step 3. Save the file.
6. Installing the Enterprise Server plug-in
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 1. Download the file named Enterprise Drupal 8 Integration plug-in from the software download page.
Step 2. Unzip the file and place the resulting 'Drupal8' folder in the following location:
- <your Enterprise Server installation>/config/plugins/
Enabling the plug-in:
Step 3. Log in to Enterprise Server.
Step 4. Click Server Plug-ins in the Maintenance menu or on the Home page. The Server Plug-ins page appears.
Step 5. Enable the plug-in named Drupal 8 - Publish Forms by clicking the Unplugged icon . It changes to a Plugged In icon .
7. Configuring the Enterprise Server plug-in
The Enterprise Server plug-in needs to be configured with the URL for the Drupal site and the credentials for the administrator. The steps are slightly different for Enterprise Server 10.0 compared to those of Enterprise Server 10.1.
Step 1. Open the following file:
- <your Enterprise Server installation>/config/plugins/Drupal8/config.php
Tip: Easily manage and configure settings of all configuration files by adding them to a single configuration file.
Step 2. Locate the 'DRUPAL8_SITES' section:
define( 'DRUPAL8_SITES', serialize( array(
'label_of_the_first_instance' => array( // site label, as shown on the "Publication Channel Maintenance" page
'url' => '', // specify the full URL to your Drupal instance, including a trailing slash
'username' => '', // enter a valid Drupal user for the instance here
'password'=> '', // enter the password belonging to the specified username
)
)));
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:
|
Step 1. Open the following file:
- <your Enterprise Server installation>/config/plugins/Drupal8/config.php
Step 2. 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:
|
8. Creating a Drupal 8 Publication Channel
Publishing to your Drupal 8 Web site from Enterprise is done through a Publication Channel.
Step 1. In Enterprise Server, create a new Publication Channel for a Brand:
Step 2. In the Name field, enter a name.
Step 3. In the Description field, enter a description.
Step 4. From the Publication Channel Type list, choose Web.
Step 5. From the Publish System list, choose Drupal 8 — Publish Forms.
Step 6. (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 7. Click Create. The Drupal Account options appear.
Step 8. 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 9. Click Update.
Step 10. Create an Issue by clicking the Add Issue button and subsequently entering at least a name for the Issue.
Step 11. Click Update.
9. Testing Enterprise Server
Step 1. Test if the integration has been performed successfully by following these steps:
Step 2. In the Maintenance menu, click Advanced. A page showing links to advanced Enterprise options appears.
Step 3. Click Health Check. The Health Check page appears.
Step 4. Run the Publish to Drupal - Publish Forms test. The test result is displayed.
Step 5. (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.
10. Importing the Drupal content types and taxonomies
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 1. 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 2. (Optiona) From the Publication Channels list, choose the channel from which you want to import.
Step 3. Make sure that the check boxes for importing content types and taxonomies are both selected.
Step 4. Click Import.
The import is performed and the result of the import action is displayed.
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.