Skip to main content
ocean waves

Blog Post

Drupal 7 - A Preview

The Drupal community is eagerly awaiting its newest release (version 7). At this point, the co-maintainers have held the position that Drupal 7 will be released "when it is ready" - in essence, when all the critical issues have been addressed. The list of remaining bugs can be found on drupal.orgunder the contributor links in the right sidebar. This post will summarize some of the major differences one can expect to find in Drupal 7. To start with, the minimum server requirements for Drupal 7 will be PHP 5.2 and MySQL 5.0 (or PostgreSQL 8.3). In addition, the other highlights will include the following:

Usability

Drupal 7In each new release of Drupal there is one central focus. In Drupal 7, the spotlight predicated around usability. Many of the improvements in usability were based on results of the Drupal 7 User Experience Project (D7UX), which was meant to gain insight from other developers unfamiliar with Drupal, but very familiar with other web technologies and content management systems. One of the major takeaways is an administrator toolbar that is fixed-positioned at the top of the page. There is a top default toolbar, as well as a shortcut toolbar just below the default toolbar where each administrator can add links of their choosing. The Administration Menu module for Drupal 6 gives more direct access to all the possible administrative links, but this is a vast improvement over the default Drupal 6 administrative navigation. Moving on, something that is now standard in Drupal 7, and that some Drupal 6 modules currently incorporate, is the presence of "edit anywhere" contextual links. This displays links to edit/configure blocks, nodes, and comments upon hovering over that particular element. Blocks administration seems much cleaner now that they have removed the dashed outlines of the regions and have implemented the option to select a separate administrative theme in core. On the blocks adminstration page there is now a simple link displayed at the top that reads, "Demonstrate block regions (yourtheme)", with yourtheme being whatever theme you are currently using for your site. This link takes you to your site's blank theme, and contains only the dashed outlines of where your regions are located. Another item worth touching on is the "vertical tabs" on node/add pages that contain any the primarily administrative portions of a node (URL path settings, Menu settings, Comment settings, Revision information, Authoring information, Publishing options). This cleans up things considerably. The vertical tab concept is used on other areas of the Drupal 7 site as well. Finally, there is a concept called "Overlays" that is supposedly being implemented. This had not yet been implemented on the development version of Drupal 7that was downloaded from drupal.org just prior to writing this. But the idea is that Overlays would allow for nearly inline editing of nodes, whereupon clicking on the edit link would pop up a black box (likely similar to Lightbox) that would allow you to edit the content without being taken to another page.

CCK and Field

One of the biggest changes is the inclusion of the CCK module into Drupal core via the Field module. Not all CCK field types made it to core, but the fields that are available in Drupal 7 by default are text, number, taxonomy term, image, and file. One of the nice perks about Drupal 7 and fields is that when you go to manage fields for a content type, a field is a field, including title and body. If you want a taxonomy field, you must add it as its own field, rather than it appearing automatically like in previous versions of Drupal. There are no longer those items that never seemed to belong when managing fields (menu settings, for example). These items are now just a part of the vertical tabs mentioned above. The bottom line is that the changes to how fields are managed follow the mantra of improved usability. With file and image fields present in Drupal core, the old Upload module will be removed from core by the time Drupal 7 is released. The three fields of note that did not make it to Drupal core were field group, node reference, and user reference. The Field UI will be very familiar to those who have experienced the CCK UI. Imagecache and Image API modules also move to core, giving the ability to scale and crop images as well as rotate and convert to grayscale (desaturate). A new feature with fields is that you can now add fields to users and taxonomy as well as nodes. This new setup should make it easier for contributed modules to incorporate fields when using the proper hooks.

Views

A Drupal staple, the Views moduledeserves its own mention here. Unfortunately, the big news regarding Views is that it will not be a part of Drupal core in v7, and will remain a contributed module for now.

Theme System

The first thing to be noted here is that there is a new administrative theme called Seven (go figure), and it is a welcome change to the typically used Garland. Along with this new theme is the ability to set a separate administrative theme for your site, allowing for a visual cue as to whether you are dealing with the front end or back end of your site. Another change is the reduction of default themes to only four. In my opinion, this is a refreshing change. The returning themes are Garland, of course, and its fixed-width sibling, Minnelli. Next, the new theme, Seven, does not contain any sidebars, and is therefore a viable option to use as an adminstrative theme. But perhaps the most notable addition to the default themes in Drupal 7 is the stripped-down, bare bones theme called Stark. This theme contains only the minimum CSS required to render a typical "header, sidebars, content, footer" Drupal layout, and could be a less messy starting point for experienced themers. This theme can also be used as a troubleshooting tool to determine if module-related CSS and javascript are interfering with a more complex theme. One enhancement to the power of the theme is the fact that themes now have access to form_alter, page_alter, and other alter hooks. Themes will also now have the ability to preprocess theme functions in Drupal 7.

Miscellaneous

Some other formerly contributed modules that are now a part of Drupal 7 core are Poormanscron, jQuery UI, and a testing framework based on SimpleTest, while the Throttle, Ping, and Blog API modules have been removed from core. RDF (Resource Description Framework) is now included in Drupal 7 in the RDF module. One aspect of Drupal 7 that is new and definitely worth mentioning is the conversion to handling files using stream wrappers. This makes it possible to access virtual or remote file systems as if they were on the local disk using php functions like fopen(), unlink(), file_get_contents(), and others, and should make it easier to upload and serve files from an alternate server (Amazon S3, for example) with a properly written module. Overall Drupal 7 looks like it will be an awesome release. With the improved features and usability, it is very likely that downloading and checking out the development version of Drupal 7 will get you on the bandwagon if you are not already. If you would like to get more involved, there is always the opportunity to help with the current Drupal 7 bugs, as well. What are you most looking forward to in Drupal 7? Are you disappointed or surprised at any of the features that Drupal 7 is incorporating?