As you continue to add content to your web site, you will need to ensure that your content is properly moderated, that old content is removed, and that changes to web site content are tracked.
Creating content revisions
Good Eatin' Goal: Create revisions of content to ensure that you have a complete record of changes to your web site's content.
Additional modules needed: None.
We have simply updated our pages as necessary to add new functionality and content. However, if you have many editors, content that changes frequently, a need to view the history of a page, or need the ability to easily return to an old version of a page, you will want to store multiple revisions of your pages.
To do this, carry out the following steps:
- Edit the content for which you want to create a new revision.
- Make the changes as needed and, before saving, expand the Revision information section.
- Select the Create new revision option and enter a message describing the changes that you have made to the node.
- When you save the content, you will see a new tab called Revisions. Clicking on this tab will show you a list of all of the revisions that have been created for the page.
- If you would like to return to an older version of the page, you can click the revert link. Or, if you want to remove an older revision, you can click the delete link to get rid of it permanently.
- You can control which users have access to the revision system by using the Permissions Manager. Drupal allows you to control which users can: view revisions, revert revisions, and delete revisions.
- If you want to force users to always create new revisions when editing content, edit the content type and then expand the Workflow settings.
- Change the default options to select the Create new revision option. When editors change content, the Create new revision option will be selected by default, and they will not be able to change the option unless they have the administer nodes permission.
- If you want to approve all revisions before publication, you can deselect the Published checkbox.
Comparing content revisions
Good Eatin' Goal: Compare the text of two different revisions of a page.
Additional modules needed: Diff (http://drupal.org/project/diff).
Although the built-in functionality for creating revisions in Drupal works perfectly well, it can be difficult to review the changes that were made in each revision. The Diff module makes comparing revisions very easy.
- Begin by installing and activating the Diff module.
- To use the Diff module, simply view the revisions for any page. You will notice that the Revisions list has changed to allow you to select the revisions to be compared.
- Select the revisions to compare and then click on the Show diff button. Drupal will then display information about the text that has been changed, added, or deleted.
Good Eatin' Goal: Find questionable or offensive content, and remove it from your site, easily.
Additional modules needed: Modr8 (http://drupal.org/project/modr8).
An unfortunate side effect of having a web site on the Internet is that, at some point, a malicious user will attempt to post inappropriate content on your site. If your site is extremely busy, you may find yourself with a large amount of content to review and approve.
The Modr8 module can help you manage the workload and can send emails to users letting them know when their content has been approved or rejected.
- Begin by installing and activating the Modr8 module.
- The settings for the Modr8 module can be accessed by selecting Site configuration and then Modr8, from the Administer menu.
- The basic settings control how often logs are removed. Alternatively, you can choose to keep the logs forever. You can also change the number of items in the moderation queue to be displayed at a time, as well as the default action for the content that requires moderation.
- You can also configure the email settings for the moderation queue, including the text of the emails, and whether or not emails should be sent to the user who posted the content when their content is approved and/or when their content is rejected. You can also choose to send an email if the moderator does not take action for the item and wants to send a note to the author.
- If you would like new content to be added to the moderation queue automatically, you can edit the content type and select the In moderation queue setting in the workflow section.
- To view the moderation queue, select Content management and then Moderated content, from the Administer menu.
- The moderation queue appears as follows:
- From this page, you can approve, delete, or defer action on any content that needs moderation. After you make your changes, click Save to complete your selections. You can also display a log of all the moderation actions, by clicking on Reports and then Content moderation log. The moderation log appears as follows:
Allowing users to report questionable or offensive content.
Good Eatin' Goal: Get feedback from users to learn what they find offensive so the objectionable content can be removed.
Additional modules needed: Abuse (http://drupal.org/project/abuse).
In the last task, we reviewed methods that allowed you to moderate every piece of content that is added to the site. However, this can be a time-intensive task if the proportion of content that you receive that is questionable is low. If this is the case, you can allow your users to help you to moderate the content by using the Abuse module, to let them report items that they find offensive.
This strategy has a couple of advantages. Firstly, you are freed from the maintenance of pre-approving all content before it is published. Secondly, it ensures that the content meets community standards, rather than placing you or your editors in charge of defining community standards.
The Abuse module also has a Watchlist component that allows you to flag content as suspicious or banned, and automatically move them into a queue for review by an administrator.
- Begin by downloading and installing the Abuse and Watchlist modules, both of which are included in the Abuse installation.
- We will begin by editing the Watchlist settings, which can be accessed by selecting Site configuration and then Watchlist settings, from the Administer menu.
- You can include any words that you want to, in the Watch list and Filtered/banned word list, depending on your target audience and your site's needs; just make sure that you enter one word per line. Items on the Watch list can be viewed while they are in the review queue, and items on the Filtered/banned word list will be hidden until they are reviewed.
- You can also control which items are automatically added to the Watch list or banned list, based on the Watchlist word settings configured above.
- You can also force moderation for specific types if they are more prone to abuse.
- We can now modify the Abuse Moderation settings by selecting Site configuration and then Abuse Moderation settings, from the Administer menu.
- The first setting controls what content types are subject to abuse reports.
- The next section of controls how abuse tickets are to be handled by your moderators.
- Finally, you can configure the settings related to all of the items that have been flagged as abusive by a user.
- You can edit the reasons for flagging an item for abuse by selecting Site configuration, then Abuse Moderation settings, and finally Abuse Moderation reasons, from the Administer menu.
- Before the abuse module is activated, you need to assign permissions to users, so that they can flag content for review.
- Content that has the abuse module activated will have a new Flag as offensive link added to it, as shown in the following screenshot:
- When the user clicks on the Flag as offensive link, he or she will be presented with a form where he or she can specify their contact information, and a reason why he or she believes that the content is offensive.
- Administrators can review content that has been flagged as offensive by clicking on Content management and then Moderate.
- The administrators can click on the Get More Tickets link to have additional items assigned to them.
- Once a ticket has been assigned to them, the administrator can view information about the user who submitted the content as well as the user who flagged the content, and choose what action to take for the content.
If you have multiple moderators for your site, you can select the Abuse Assigned Moderators option. If you use this, you will also need to store the maximum number of items that have been flagged for abuse that are added to the moderator's queue. If moderators live in different time zones, you can set an hour of the day at which all moderation queues are cleared, so that items do not remain in the moderation queue for an overly-long period of time.
The Abuse threshold controls how many complaints must be registered for an item before it is moved into the moderation queue. 3 is a good number to start with, but you may want to increase or decrease the threshold depending on the needs of your site.
All available reasons will be listed on the page using a format similar to the example above. You can add new reasons, remove reasons, or change the text for reasons from this page.
The administrator can either allow the content, or remove the content from the web site. The administrator can also optionally send a warning to the user without further action.
Upgrading to new versions of Drupal
One of the fantastic things about Drupal is that it is constantly evolving to offer new and improved functionalities. However, this requires you to regularly check for updates to Drupal and any contributed modules that are installed.
In this section, we will discuss how to find updates, test them, and install them onto your site.
There are two types of updates that you will encounter. Minor updates will correct security issues or problems found by users, and may have minimal functionality enhancements. A major update will typically have much more functionality, and may be incompatible with the previous versions.
The version number for Drupal contains two numbers separated by periods. For example, version 6.5 indicates major version 6 and minor version 5.
A custom module will begin with the version of Drupal it is compatible with, followed by a major and minor version for the module itself. If a module is compatible with all of the minor releases of a Drupal major release, the minor version will be represented by an x. For example, version 6.x-1.5 indicates that the module is compatible with any version of Drupal 6, and that the major version of the module is 1 and its minor version is 5. A module may also indicate development versions by adding—dev to the end of the version, a beta version by adding—beta1, or a release candidate by adding—rc1 after the version. Multiple beta and release candidates are indicated by incrementing the numbers after beta or rc, respectively.
Checking for new updates to Drupal and modules
Good Eatin' Goal: Ensure that we are using the latest versions of Drupal and the contributed modules that the site uses.
Additional modules needed: None (core).
Drupal 6 and later makes it easy to check for updates to Drupal and the modules that you have installed. By default, Drupal will check for updates to the system each time that cron is run.
You can check the current status of the system by selecting Reports and then Available updates, from the Administer menu. Drupal will also display a warning when you navigate to any administration page, if it has detected that Drupal, or some related content, is outdated.
If you want to, you can click on the Check manually link to ensure that all modules are up-to-date.
If any modules are outdated, they will be shown as follows.
The display includes the version that you have currently installed, the recommended version that should be installed, a link to download a new version, and a link to the release notes for the new version. The Release notes will include a list of changes that have been made to the module. In the next few tasks, we will discuss upgrading your installation.
Upgrading minor releases
Good Eatin' Goal: Upgrade between minor versions.
Additional modules needed: None (core).
When Drupal detects that a new version of Drupal is available, it will inform you as mentioned earlier.
- Before you download and install the new version, you should read all of the release notes for the new version, to determine if there are any potential incompatibilities with the other modules that you have installed.
- If you do not see any potential issues based on the release notes, you can begin testing the new version yourself.
- Before installing the new version, make a complete backup of your site including all of the files and the database.
- You should test the new version on a non-production test site, before installing it on your live site. If you do not have a test site set up yet, you can create a test site on your local computer, in a different location on your web host, or on another web host. If you choose to have the test web site hosted at a web host, you should make sure that it is not publicly accessible to visitors. This will help to ensure that your visitors are not directed to the wrong version of your site through search engines.
- Open the update page of your site, which is available at http://yoursite.com/update.php. In order to reach this page, you must be logged in using the administration account, which is the first user you created.
- If your test site is not available to the public, you do not need to worry about putting the site into maintenance mode.
- Install the module into the test version of your site by copying the files to the server.
- Click the Continue button on the Update page.
- Drupal will then display a list of modules where the database tables need to be updated. By default, Drupal will select the correct version to upgrade to.
- In most cases, you will want to use the version that Drupal selects, but you can override the version selected if needed.
- When you have selected the version you want to upgrade to, click the Update button.
- Drupal will now run all of the updates and display the results with links back to your site.
- Once the installation is complete, you should test your web site to ensure that it is still functioning correctly, and that all of the functionality related to the update is running properly.
- Assuming that all functionality works correctly for you, and you do not detect any incompatibilities, you can use the same steps on your live site to install the updates in production. If you do detect any incompatibilities, please report the problems that you found on the Drupal site so that they can be corrected as quickly as possible. When reporting issues, make sure that you give a full description of the problem that you are having, the version it is related to, and, if appropriate, a list of the other modules installed on your site.
Upgrading to a new major release
Good Eatin' Goal: Upgrade to a new major release of Drupal.
Additional modules needed: None (core).
The process of upgrading Drupal to a new major release can be a non-trivial process, which you will want to undertake carefully.
- Begin by verifying that the contributed modules you use have been upgraded to be compatible with the latest release of Drupal. This can be done by checking the project page for the module on the Drupal.org web site.
- If a module has not been ported to the latest version of Drupal, you can search for a suitable replacement, wait until the module has been upgraded, or remove the functionality provided by the module from your site. It may take several months after the latest version of Drupal is released for production usage for the maintainers to port the module. You can contact the maintainer to see if they have a schedule for development, or to see if you can contribute to help cover development costs.
- Once all of the modules that you have installed are available for update, you can begin the actual installation process. As before, you should test the installation process on a test site before doing it on the production site, to ensure that you don't encounter problems.
- If you are upgrading a live site, put your site into maintenance mode by selecting Site configuration and then Site maintenance, from the Administer menu.
- Make a complete backup of the files and the database tables that comprise your site.
- Disable all custom modules that you have installed. This will allow you to upgrade them later.
- Switch to a default theme installed with the Drupal core installation.
- Upload the new Drupal files to your site.
- Run the upgrade page at http://yoursite.com/update.php, as described in the previous task.
- Download and install the custom modules for your site.
- Download and install your site theme(s).
- Run the upgrade script again.
- Back up the following files, and then remove them from your site.
- Test your site to ensure that all of the functionalities are working properly.
- If your site is working properly, you can either repeat the steps on your live site, or copy the test site to the live site.
- If any functionality is not working properly, you can try the upgrade process again using your backup, or contact the maintainers of the functionality that is not working, so that they can help you to resolve any issues.
Change the status to Off-line and then click the Save configuration button.
In this article, we have reviewed a number of tasks that happen behind the scenes, in order to give your visitors the best possible experience, and to ensure that your web site operates at peak performance even if you are confronted with hardware failures or other unforeseen events. We have also discussed ways of managing your content to ensure that your site is of the highest possible quality.
Although these tasks are not glamorous, they are essential to any professional web site.