Feed aggregator

Drupal core announcements: Drupal 7 core security release on Wednesday, October 15 (and release window for Drupal 6)

Drupal News - October 10, 2014 - 5:48am
Start:  2014-10-15 (All day) America/New_York Sprint Organizers:  David_Rothstein

There will be a security release of Drupal 7 core on Wednesday, October 15.

Although we normally only announce security release windows (rather than definite plans for a release), this month we are confident that a release will happen, so please be prepared to update your Drupal 7 sites on Wednesday.

A security release window for Drupal 6 core will be on the same date; this does not mean that a Drupal 6 core security release will necessarily take place on that date, only that you should prepare to look out for one (and be ready to update your Drupal 6 sites in the event that the Drupal security team decides to make a release).

There will be no bug fix release on this date; the next window for a Drupal core bug fix release is Wednesday, November 5.

For more information on Drupal core release windows, see the documentation on release timing and security releases, and the discussion that led to this policy being implemented.

Code Karate: Creating a Drupal 7 Entity Reference View

Drupal News - October 10, 2014 - 4:26am
Episode Number: 172

The Entity Reference module not only allows you to reference entities within your Drupal site, it also allows you to do so using a custom created entity reference view. This allows you to leverage the power of the views module to control how the entity reference selection field is displayed.

Tags: DrupalEntity ReferenceViewsDrupal 7Site BuildingDrupal Planet

Deeson: The value of Drupal mentoring at DrupalCon Amsterdam 2014

Drupal News - October 10, 2014 - 3:09am

Last week was my first time as a Drupal Core mentor at a DrupalCon event

Why does Drupal need mentors?

At DrupalCon Amsterdam, Dries mentioned in his key note that Drupal needs more people pitching in and contributing to Drupal Core. 

The Drupal community is growing, but the ratio of contributors to free loaders is getting worse. This is probably because people are struggling to get involved or don't understand which skills are needed.

To help overcome these barriers, DrupalCon events ask for people involved in Drupal Core to act as mentors.

How do you get involved?

First of all, you need to attend a mentor orientation session where you meet other mentors who share their experiences. At my orientation session, seasoned mentor Cathy Theys (YesCT) gave an excellent talk about what mentoring involves and what to expect.

Our introductions to each other were very amusing as we shared our Drupal.org usernames. Most of us felt it necessary to defend our choice of usernames with a full entomology and my personal favourite was eojthebrave (you'll have to ask him!).

What did I do as a mentor?

Last Wednesday I spent two hours triaging the issue queue, which contains issues with possible tasks suitable for novice contributors.

A novice is unlikely to complete a whole issue on their own, but there may be components of the issue, called tasks, that they can do. Tasks could include providing steps to reproduce a problem, feeding back on UX or design, taking screen shots or writing documentation. You do not always need to be a developer to contribute.

On Thursday I manned the mentor desk for a few hours. The DrupalCon events have a mentor desk manned by mentors who can advocate to delegates about contributing to Drupal Core and explain how to get involved. A key priority is to encourage delegates to attend a mentored sprint on the last day of DrupalCon, their first steps into the world of the Drupal Core community.

During the mentored sprints, more than 100 people got together to listen to a community tools presentation which covered the installation of everything you need to contribute, how to use the issue queue and comment and IRC etiquette.

Drupal 8 presentation

As a mentor, I gave a presentation to a small group of new contributors which helped them configure the tools and install Drupal 8 for the first time. For some, this was quite an achievement in itself.

Once set up with the tools, the new contributors broke up into smaller groups and selected issues to work on together with the aid of a mentor.

Critical issues

Some of the contributors I worked with looked at an issue to provide more user-friendly text on the 'Extend' section of the site. This was called 'Modules' on Drupal 7 and is where site administrators searched for modules to enable or disable them.

If the patch the contributors provided is committed, then the text they chose may appear on thousands of websites throughout the world - not bad for a short period of collaborative working!

The contributors also uncovered an issue in Drupal Core which we decided to mark as critical. Some of the new contributors were selected to have their finished patches committed directly into Drupal 8 by Drupal Core maintainer Angie Byron (webchick). Angie showed how the process of patch review and committing a patch to core works.

Après sprint

After a tiring, yet satisfying day, the mentors went to dinner together, where we discussed Drupal, development and PHPStorm.

Give it a try!

Being a mentor was a fantastic experience and I recommend it highly. I met some pretty incredible mentors and new contributors.

The Drupal community is made of a wide and varied skill base and everyone can get involved to make a difference to Drupal Core's quality.

If you've not contributed before, come along to the mentored sprint at the next DrupalCon.

If you can't wait that long, there is the Drupal Ladder which describes the small steps you can take to become a regular and useful contributor to Drupal Core.

Janez Urevc: Drupal 8 from my media perspective - update #2

Drupal News - October 10, 2014 - 2:20am

It's been a while since my last post and with DrupalCon Amsterdam behind us it seems a good timing for another update.

Purencool Website Developer: How to set-up Compass on Ubuntu 14.04 for Omega 4 Development

Drupal News - October 10, 2014 - 1:34am

I had some issues installing Compass on Ubuntu 14.04 this is what I did and the errors I came up against that gave me a large headache. I hope others can benefit from what I learnt. This assumes that you have already created a sub-theme in Omega4. I installed the following packages initially:

Tags Drupal Planet Web Development SASS

Doei Doei, DrupalCon Amsterdam

Drupal News - October 10, 2014 - 12:49am

DrupalCon Amsterdam has wrapped up, and now that we’re over the jet lag, it’s time to look back on one of the most successful DrupalCons to date. DrupalCon Amsterdam was the largest European DrupalCon yet, by far. Just to knock your socks off, here are some numbers:

  • More than 2,300 attendees showed up to 120 sessions and nearly 100 BoFs
  • 115 attendees showed up to the community summit and the business summit
  • 146 training attendees, 400 trivia night attendees, and 400 Friday sprinters made the week a success
  • …and through it all, we ate 1,200 stroopwafels.

The fun extended to more than just the conference — with 211 transit passes and 56 bike rentals, attendees from over 64 countries were able to enjoy all the city of Amsterdam had to offer. What a success!

As with any DrupalCon, DrupalCon Amsterdam wouldn’t have been a success without lots and lots of help from our passionate volunteers. We’d like to take a moment to send out a big THANK YOU to all of our track chairs and summit organizers:

  • Pedro Cambra - Coding and Development
  • Théodore Biadala - Core Conversations
  • Steve Parks - Drupal Business
  • Lewis Nyman and Ruben Teijeiro - Frontend
  • Michael Schmid - Site Building
  • Bastian Widmer - DevOps
  • Cathy Theys, Ruben Teijeiro, Gábor Hojtsy and the Core Mentors - Sprints
  • Adam Hill and Ieva Uzule - Onsite Volunteer Coordinators
  • Baris Wanschers - Social Media
  • Emma Jane Westby - Business Summit
  • Morten Birch and Addison Berry - Community Summit

We also appreciate everything our core mentors did to make DrupalCon Amsterdam a hit — and it’s thanks to lots of hard work from our passionate community members that Drupal 8 is in Beta!

We hope you had as fun and exiting a time in Amsterdam as we did. For those of us who weren’t able to make it, and even for those who were, you can relive the fun on the flickr stream, or catch any number of great sessions on the Drupal Association YouTube channel.  And remember to mark your calendar for DrupalCon Barcelona in September 2015. See you there! Below is Holly Ross' set of slides from the Amsterdam closing session. 

DrupalCon Amsterdam Closing Session from DrupalAssociation

Image credit to Pedro Lozano on Flickr.

Drupal Association News: Doei Doei, DrupalCon Amsterdam

Drupal News - October 10, 2014 - 12:49am

DrupalCon Amsterdam has wrapped up, and now that we’re over the jet lag, it’s time to look back on one of the most successful DrupalCons to date. DrupalCon Amsterdam was the largest European DrupalCon yet, by far. Just to knock your socks off, here are some numbers:

  • More than 2,300 attendees showed up to 120 sessions and nearly 100 BoFs
  • 115 attendees showed up to the community summit and the business summit
  • 146 training attendees, 400 trivia night attendees, and 400 Friday sprinters made the week a success
  • …and through it all, we ate 1,200 stroopwafels.

The fun extended to more than just the conference — with 211 transit passes and 56 bike rentals, attendees from over 64 countries were able to enjoy all the city of Amsterdam had to offer. What a success!

As with any DrupalCon, DrupalCon Amsterdam wouldn’t have been a success without lots and lots of help from our passionate volunteers. We’d like to take a moment to send out a big THANK YOU to all of our track chairs and summit organizers:

  • Pedro Cambra - Coding and Development
  • Théodore Biadala - Core Conversations
  • Steve Parks - Drupal Business
  • Lewis Nyman and Ruben Teijeiro - Frontend
  • Michael Schmid - Site Building
  • Bastian Widmer - DevOps
  • Cathy Theys, Ruben Teijeiro, Gábor Hojtsy and the Core Mentors - Sprints
  • Adam Hill and Ieva Uzule - Onsite Volunteer Coordinators
  • Social Media - Baris Wanschers
  • Emma Jane Westby - Business Summit
  • Morten Birch and Addison Berry - Community Summit

We also appreciate everything our core mentors did to make DrupalCon Amsterdam a hit — and it’s thanks to lots of hard work from our passionate community members that Drupal 8 is in Beta!

We hope you had as fun and exiting a time in Amsterdam as we did. For those of us who weren’t able to make it, and even for those who were, you can relive the fun on the flickr stream, or catch any number of great sessions on the Drupal Association YouTube channel.  And remember to mark your calendar for DrupalCon Barcelona in September 2015. See you there! Below is Holly Ross' set of slides from the Amsterdam closing session. 

DrupalCon Amsterdam Closing Session from DrupalAssociation

Image credit to Pedro Lozano on Flickr.

Blair Wadman: How to backup your Drupal database to Amazon S3

Drupal News - October 9, 2014 - 10:31am

We all know the importance of backing up the database for each Drupal site we build and maintain. But it is not uncommon for this to be put on the back burner and never actually implemented. Fortunately, it is really easy to setup with a combination of Amazon S3 and Backup and Migrate. In this tutorial, you will be shown how to set this up so that it runs on auto pilot.

Tags: Drupal Site buildingPlanet Drupal

Tyler Frankenstein: Drupal Commerce Order Owner Autocomplete with E-mail Address

Drupal News - October 9, 2014 - 9:59am

When creating an order as an admin in Drupal Commerce, we can specify the user that owns the order if we know their user name. This works well in most cases, but to be able to search by the user's e-mail address would be helpful too. I've had a few requests from clients for this feature. So without further ado, let's ado it!

/** * Implements hook_menu(). */ function my_module_menu() { $items = array(); $items['my_module/commerce/order-owner/autocomplete'] = array( 'page callback' => 'my_module_commerce_order_owner_autocomplete', 'access arguments' => array('configure order settings'), 'type' => MENU_CALLBACK ); return $items; } /** * Implements hook_form_FORM_ID_alter(). */ function my_module_form_commerce_order_ui_order_form_alter(&$form, &$form_state, $form_id) { // Attach our custom autocomplete to the order owner name input so we can // search by e-mail address. $form['user']['name']['#autocomplete_path'] = 'my_module/commerce/order-owner/autocomplete'; } /** * Queries results for the commerce order owner autocomplete. */ function my_module_commerce_order_owner_autocomplete($string) { $matches = array(); $query = db_select('users', 'u'); $query ->fields('u', array('uid', 'name', 'mail')) ->condition(db_or() ->condition("u.mail", '%' . db_like($string) . '%', 'LIKE') ->condition("u.name", '%' . db_like($string) . '%', 'LIKE') ) ->condition('u.uid', 0, '<>') ->range(0, 10); $results = $query->execute(); foreach ($results as $row) { $key = "$row->name"; $matches[$key] = "$row->name - $row->mail ($row->uid)"; } drupal_json_output($matches); }

Freelock : Why tech work is so hard to estimate

Drupal News - October 9, 2014 - 7:57am

"Hey, since the upgrade, I can't use the power edit feature anymore!" came the request. Ok. There have been several different upgrades over the past few months. The menu editor module has been updated. The server has been upgraded. The site is in heavy use, so there are lots of content changes.

EstimatingProject ManagementDrupal Planet

Vasily Yaremchuk: Turn off maintenance mode on separate paths in Drupal 7

Drupal News - October 9, 2014 - 6:32am

We have faced with the problem. We use Ajax Login/Register module but put site in Maintenance mode.

But we need to have Sign up ability. Ajax Register module show Sign up form in popup, content is requested from "ajax_register/register". But in maintenance mode we can see Maintenance page response...

But fortunately we have hook_menu_site_status_alter. Thus we can turn off Maintenance mode in our module on separate path:

<?php
function ajax_register_fix_menu_site_status_alter(&$menu_site_status, $path) {
  if ($menu_site_status == MENU_SITE_OFFLINE && user_is_anonymous() && $path == 'ajax_register/register') {
    $menu_site_status = MENU_SITE_ONLINE;
  }
}
?>

This is content of ajax_register_fix.module custom module.

Blog tags:

Deeson: Drupal's Picture element and Image Field Focus for mobile images

Drupal News - October 9, 2014 - 5:51am

We know people get really frustrated when images viewed on desktop look great but are hard to see on a mobile device.

In this blog, I’ll show you how to use the Picture and Image Field Focus modules to crop images for display on desktop, tablet and mobile and make the lives of content creators easier.

It means goodbye to preparing several images for optimum display across all devices and hello to just one image upload and smart image crop control.

The new Drupal Picture element

Picture is a new(ish) HTML5 element which allows different images to be displayed for different devices and also for retina displays. Handy.

This means mobile users no longer have to download images optimised for desktop display when the image is displayed on a much smaller screen. 

How Picture works

Picture considers the way images are served and the needs of content creators, including:

  • Size: Images are often served optimised for desktop and then mobile devices reduce them to size. This means that mobiles are often downloading more data than they need to.
  • Art direction: For some images it would be better if the image was cropped for mobile display. This is called the ‘art direction’ use case, and I recommend reading this article over here
  • Image quality: Using <picture> images can be served at a higher pixel density, which means higher quality images can be served for retina devices.
Picture's HTML and browser support

The picture element at its most basic looks like this:

<picture>  <source media="(max-width: 480px)" srcset="mobile.jpg"> <source media="(max-width: 768px)" srcset="tablet.jpg">  <img src="fallback.jpg" alt=""> </picture>

You can see it's been spec'd out by the responsive images community group http://responsiveimages.org/.  It's supported in Chrome 38, implemented in Firefox 33, and can be tested by tweaking FireFox’s settings.  Microsoft is considering supporting it, and Safari hasn’t confirmed their status yet.

If a browser doesn’t support the Picture element, the HTML degrades gracefully and the fallback <img> is displayed. There is also a well-supported, and tested, polyfill - picture fill - on GitHub.

The Picture module

The good news is that Drupal already has a Picture module which includes the picture fill js library. It has a dependency on the breakpoints module.

To set up Picture, you need to setup your breakpoints first (/admin/config/media/breakpoints).  Each breakpoint needs a name and a media query. I've set up my breakpoints to match the Bootstrap breakpoints. For example, I've got a Mobile breakpoint with a media query '(max-width: 480px)' - see image to the left.

Once that's all sorted, you need to setup images styles for each breakpoint.

To setup Picture, install the module and go to /admin/config/media/picture/list. This page lists all the picture displays you have setup. Click 'Add', select the breakpoints you want this picture display to use, and select an image style for each breakpoint - see left.

Once you have a picture display set up, you'll be able to select picture as a display field formatter for an image field. You can then display different images for mobile, tablet and desktop!

Image Field Focus

Some people worry that the art direction use case places a large administrative burden on content editors, as it means preparing several images instead of just one.

You can avoid this if you use Image Field Focus - content admins select a focus area and a crop area for each image and image field focus does the rest, which is a lot less hassle all round.

In the example I've cropped out the person stood on the right, which is represented in the outer selected area. The inner selected area has become the focus area. 

Essentially, any image created will be from within the crop area and will always contain the focus area. The focus area will be, where possible, in the middle of the picture.

In our example, the paragliders in the air might be to small to see if the full image was scaled down to be displayed on mobile. I’ve added a focus area around one of the paragliders so when a mobile optimised image is created it will be a close up image of this area.

To setup image field focus you'll need to enable it for each field you want to use it on.

Defining images styles

When you define your images styles, you need to add the Focus Scale And Crop style - see left. I've set up three distinct image styles, one for each breakpoint, see image below. If you want to more detail on setting up images styles, read this.

What do you think?

Hopefully you can see that the Picture and Image Field Focus modules work together as a great combination!  

We asked our marketing and content team what they thought and they said, “This is literally the best thing since sliced bread.” 

Clemens Tolboom: The state of ReST in Headless Drupal 8

Drupal News - October 9, 2014 - 12:37am

One of the Drupal 8 initiatives was to make "headless" Drupal core work out of the box. Drupal now has a ReST API.

This allows you to use all the Drupal 8 features to edit your content but present the content not only on a Drupal frontend but also on mobile apps or anything else that can work with JSON data.

Cocomore: Field collections exposed

Drupal News - October 9, 2014 - 12:03am

Field collections is a nice contributed module that extends the default Drupal entity functionality by creating a new entity field that can be composed by other fields. With this module we solve problems like creating complex entities where we want to store multiple different values into one single field.

read more

Deeson: Drupal Panels setup for clean markup

Drupal News - October 9, 2014 - 12:00am

It’s a fact that you get a hideous amount of markup with the Panels module straight out-of-the box, even if you use it to create a single column page without changing any of the options.

This is because each layer of the rendering process brings its own markup to the party. 

Panels and layers

Panels are structured in layers, which is what makes them so flexible for any given requirement. Within a layout sit the regions and inside these are panes.

Each of these panes are configurable by providing CTools plugins. You can render panes and regions with style plugins and the layout with a layout plugin.

Each of these layers have their own wrapping markup and things can get excessive quickly. 

Help is at hand

Luckily for us, there’s quite a lot of help for Panels straight out-of the-box. Firstly, there’s a ‘naked’ style plugin which drops all the wrapping markup and can be applied to your panes and regions. While this is a good start, the layout will still need markup specific to the site’s theme.

You can override each Panels layout as it’s presented by a theme hook. It’s literally as simple as copying a template to your site. 

For most simple panels, it’s just a case of copying the panels-onecol.tpl.php file into the theme and customising it. 

If you’re using a CSS framework or grid system (we use Bootstrap at Deeson) then this file is where you can re-work the markup to be specific to the system you are using.

My Panels page

Keeping all this in mind, I’ve created a simple Panels page which lists recent content to authenticated users. It’s built from a bean, a view (with an access rule) and some custom markup. It uses the one col layout.

Here’s my oh-so-simple panels-onecol.tpl.php file in my theme:

<div class="panel-display panel-1col clearfix" <?php if (!empty($css_id)) { print "id=\"$css_id\""; } ?>> <?php print $content['middle']; ?> </div>

And here’s the markup you’ll get when viewed as an unauthenticated user:

<section id="block-system-main"> <div class="panel-display panel-1col clearfix"> <div class="panel-pane pane-block pane-bean-recent-content-header"> <h2 class="pane-title">Recent content</h2> <div typeof="" about="/block/recent-content-header" class="entity entity-bean bean-editable clearfix">[...]</div> </div> <div class="panel-pane pane-custom pane-1"> <p>Login or create an account to view this content...</p> </div> </div> </section>

Let me know what you think!

Syndicate content