1st Hour Drupal 8 RC1

Now that Drupal 8.0.0 RC1 is out I figured it was time to build something with it. I've owned the statuschecks.net and statuschecks.info domains for awhile now. I purchased them for an open source project I was planning (haven't really put much work into that yet, it will show up here someday when I make progress).


I downloaded the release candidate from Drupal.org and expanded it onto the server. Created the empty database, username and password. So far no different than previous versions of Drupal.

Drupal 8 RC1 installer choose languageDrupal 8 RC1 installer select profile

The web based installer looked very familiar, not significantly different from Drupal 7.

Drupal 8 RC1 installer requrements problemDrupal 8 RC1 installer database configuration

The first notable difference was the installer wanted me to give write access to the newly copied settings.php file. I progressed through the web installer providing my MySQL details, and then was instructed to remove write access from settings.php. Not a significant change, but different.

Drupal 8 RC1 installer progress barDrupal 8 RC1 installer configure siteDrupal 8 RC1 installer configure site regional settings

I waited for the database installer to run, filled in the details about my new site, removed write access to settings.php and saved. I was then redirected to my new Drupal 8 site.

First Impressions:

My new D8 site loaded perfectly, with the common blue Bartik theme that we are used to from D7 (granted the refresh was obvious). First thing I noticed was the brand new admin toolbar, first impression is it is VERY useful and in core.

Drupal 8 RC1 1st page load

Drupal 8 RC1 installer edit view

One of the things I was most excited for was the Views was now included in core, and this became obvious with in seconds of loading the new site. Each block, has a handy pencil icon that appears when you hover (yes I know similar behavior in D7). I hovered over the "No front page content has been created yet." message, clicked the pencil and... "Edit View" was the option presented. Yes, D8 Front page is Views by default!


The next thing I tried was loading the alias site (I ran the install on statuschecks.info, so switched to statuschecks.net), and immediately noticed that something was very very wrong! The text loaded but no CSS, Images, Java etc. It was obvious that my Apache settings were correct as I made it to the site, I tried clearing the caches, refreshing, opening the page in another browser, nothing....

Drupal 8 RC1 status page

So I checked the Status Report Page and found a message about trusted hosts settings. Something new added to D8, similar behavior to D7's base_url setting (and issues with the auto detection process).  This new setting allows a site admin to specify all the expected hosts/allowed hosts as regex expressions! A simple update to my settings.php file, clear the caches and multisites pointing at sites/default was working as expected.

As you can see in the snippet above the changes were fairly easy, and provides great protection against accidental or malicious issues with HTTP HOST Headers (no more emails going out with invalid URLs when cron triggered by localhost visits). There is a nice write up on Drupal.org about this new feature.

The next thing I spotted was a message right below the Trusted Hosts error, "Twig C extension Not available Enabling the Twig C extension can greatly increase rendering performance. See the installation instructions for more detail."  Twig is the new templating engine for Drupal 8. Twig is a separate open source project that is actively developed and well documented. The install process was fairly easy, but would be difficult to accomplish on a shared host (this isn't required for Drupal to work properly, just improves performance).

The steps above are all that are required to download and build the newest version (V1.22.3 as of 10/17/15) of the Twig C extension. Before completeing you should check that you are downloading the newest version available. The download page is on GitHub. The official documentation contains steps for installing on windows, with composer or pear, but I prefer this method. After following the steps above to install the Twig C extension you need to add "extension=twig.so" to your php.ini file and restart apache.

Drupal 8 RC1 status page

After completeing these steps, the status page should reflect that the Twig C extension is enabled.

I'll write more as I dig into the site deeper. But, for now, that covers my first hour of discovery with Drupal 8.0.0 RC1.