Jul 21 2018
Jul 21

As I've explained Short trip on Entity API in Drupal 8  Entity is the most important thing in Drupal 8, Almost, everything is Entity. So for a Drupal developer, it should be good to have a cheat sheet of Entity API instead of googling every time he/she need something, and of course, after a while, they saved in the long-term memory of Developer.

Let's jump into summarized Drupal 8 Entity API.

Working with nodes

Load a node by NID:

$nid = 66;     // example node id
$node_storage = \Drupal::entityTypeManager()->getStorage('node');
$node = $node_storage->load($nid);
echo $node->id();  // 66

Get node's bundle (content) type:

echo $node->bundle();    // return bundle ( content) type on node with nid=66 in my sample, it's a page
echo $node->getType();    // 'article' - this is the same as bundle() for most entities, but doesn't work for all entity types

Get a built-in field value:

echo $node->get('title')->value;           // "Lorem Ipsum..."
echo $node->get('created')->value;         // 1518923456
echo $node->get('body')->value;            // "The full node body, <strong>with HTML</strong>"
echo $node->get('body')->summary;          // "This is the summary"
// a custom text field
echo $node->get('field_foo')->value;       // "whatever is in your custom field"
// a file field
echo $node->get('field_image')->target_id; // 101 (a managed file FID)

Get a built-in field value (the shorthand, with getters):

echo $node->title->value;            // "Lorem Ipsum..."
echo $node->created->value;          //1518923456
echo $node->body->value;             // "This is the full node body, <strong>with HTML</strong>"
echo $node->body->summary;           // "This is the summary"
echo $node->field_foo->value;        // "whatever is in your custom field"
echo $node->field_image->target_id;  // 101

Get nodes from a query:

$query = \Drupal::entityQuery('node')
  ->condition('type', 'article'),
  ->condition('field_foo', 'bar');
$nids = $query->execute();
$nodes = $node_storage->loadMultiple($nids);
 
foreach ($nodes as $n) {
  echo $n->title->value;            // "titles"
 
  // do whatever you would do with a node object (set fields, save, etc.)
  $n->set('title', "Hello Wrold test Title");
  $n->save();
}

How to Set fields values with Drupal Entity API :

$node->set('title', "Zhilevan is Happy Today");
$node->set('body', array(
'summary' => "Today I'm happy because of nice weather",
'value' => "Today I'm happy because of nice weather.thanks god",
'format' => 'basic_html',
));
$node->save();

 

How to delete Drupal Nodes with API:

// one
$nid = 66;      // example value
$node = $node_storage->load($nid);
$node->delete();
 
// multiple
$nids = [1,14,55,68];  // example value
$nodes = $node_storage->loadMultiple($nids);
$node_storage->delete($nodes);
 
// multiple, loading one at a time to avoid "out of memory" errors - may be slow
$nids = [1,14,55,68];  // example value
foreach($nids as $nid)
{
  $node = $node_storage->load($nid);
  $node->delete();
}

Working with Other Entities in Drupal 8( Paragraphs , Files, Users )

OK. that's enough for Nodes, let's jump into the entity_ref fields, like Paragraph. Of course, Field Collection was one of the important modules in Drupal 7 and has a significant role in Drupal websites but because of some big issues about memory-hungry and structural, it's almost dead in Drupal 8 and Paragraph module is a new Hero in Drupal 8.lets have a journey in working with Paragraph ( and other entity ref fields ) with Entity API 

Working with Paragraphs

$my_paragraph = null;
 
foreach ($node->get('field_paragraph_reference') as $para) {
  if ($para->entity->getType() == 'your_paragraph_type') {   // e.g., "main_content" or "social_media"
    $my_paragraph = $para->entity;
  }
}
 
if (!empty($my_paragraph)) {
  // $my_paragraph is a regular entity and can be interacted with like any other entity
  echo $my_paragraph->field_somefield->value;
 
  // (however, they don't have a "title" like a node)
  echo $my_paragraph->title->value;  // <-- this won't work
} else {
  echo "The node doesn't have this paragraph type.";
}

How to get paragraph entity type:

echo $my_paragraph->getType(); // "main_content"

Working with File entities

Managed files are also separate entities, which are associated with the node using a type of Entity Reference.

How to get a file by ID in Drupal:

$fid = 31;      // example value
$file_storage = \Drupal::entityTypeManager()->getStorage('file');
$file = $file_storage->load($fid);

Get a file referenced in a node:

$file = $node->field_image->entity;

Reading some properties from a File entity:

echo $file->getFileUri();   // "public://filetest.jpg"
// if you want the URL without Drupal's custom scheme, you can translate it to a plain URL:
echo file_url_transform_relative(file_create_url($file->getFileUri()));   // "/sites/default/files/public/filetest.jpg"
echo $file->filename->value;   // "filetest.jpg"
echo $file->filemime->value;   // "image/jpeg"
echo $file->filesize->value;   // 63619  (size in bytes)
echo $file->created->value;    // 1592206249  (Unix timestamp)
echo $file->changed->value;    // 1592234256  (Unix timestamp)
echo $file->id();              // 31

Working with User Entity

echo $file->uid->target_id;               // 1
echo $file->uid->entity->name->value;     // "zhilevan"
echo $file->uid->entity->timezone->value; // "Asia/Tehran"

Working with Entity References ( like Taxonomy Terms, etc)

foreach ($node->field_my_entity_reference as $reference) {
 
  // if you chose "Entity ID" as the display mode for the entity reference field,
  // the target_id is the ONLY value you will have access to
  echo $reference->target_id;    // 1 (a node's nid)
 
  // if you chose "Rendered Entity" as the display mode, you'll be able to 
  // access the rest of the node's data.
  echo $reference->entity->title->value;    // "Zhilevan Ibra"
 
}

Changing  the value(s) of an entity reference field is much easier than Drupal 7 :

$nids = [1,2,3,4];   // example value
$node->set('field_my_entity_reference', $nids);
$node->save();

Or appending 

$nids = [5,6];   // example value
foreach ($nids as $nid) {
  $node->field_my_entity_reference[] = [
    'target_id' => $nid
  ];
}
$node->save();

much easier than Drupal 7, isn't? 

Enjoy your coding and share your comments with me ;-)

References:

 Working with the Entity API on Drupal.org

The Ultimate Guide to Drupal 8 - Drupal Groups

Jul 21 2018
Jul 21

As I've explained Short trip on Entity API in Drupal 8  Entity is the most important thing in Drupal 8, Almost, everything is Entity. So for a Drupal developer, it should be good to have a cheat sheet of Entity API instead of googling every time he/she need something, and of course, after a while, they saved in the long-term memory of Developer.

Let's jump into summarized Drupal 8 Entity API.

Working with nodes

Load a node by NID:

$nid = 66;     // example node id
$node_storage = \Drupal::entityTypeManager()->getStorage('node');
$node = $node_storage->load($nid);
echo $node->id();  // 66

Get node's bundle (content) type:

echo $node->bundle();    // return bundle ( content) type on node with nid=66 in my sample, it's a page
echo $node->getType();    // 'article' - this is the same as bundle() for most entities, but doesn't work for all entity types

Get a built-in field value:

echo $node->get('title')->value;           // "Lorem Ipsum..."
echo $node->get('created')->value;         // 1518923456
echo $node->get('body')->value;            // "The full node body, <strong>with HTML</strong>"
echo $node->get('body')->summary;          // "This is the summary"
// a custom text field
echo $node->get('field_foo')->value;       // "whatever is in your custom field"
// a file field
echo $node->get('field_image')->target_id; // 101 (a managed file FID)

Get a built-in field value (the shorthand, with getters):

echo $node->title->value;            // "Lorem Ipsum..."
echo $node->created->value;          //1518923456
echo $node->body->value;             // "This is the full node body, <strong>with HTML</strong>"
echo $node->body->summary;           // "This is the summary"
echo $node->field_foo->value;        // "whatever is in your custom field"
echo $node->field_image->target_id;  // 101

Get nodes from a query:

$query = \Drupal::entityQuery('node')
  ->condition('type', 'article'),
  ->condition('field_foo', 'bar');
$nids = $query->execute();
$nodes = $node_storage->loadMultiple($nids);
 
foreach ($nodes as $n) {
  echo $n->title->value;            // "titles"
 
  // do whatever you would do with a node object (set fields, save, etc.)
  $n->set('title', "Hello Wrold test Title");
  $n->save();
}

How to Set fields values with Drupal Entity API :

$node->set('title', "Zhilevan is Happy Today");
$node->set('body', array(
'summary' => "Today I'm happy because of nice weather",
'value' => "Today I'm happy because of nice weather.thanks god",
'format' => 'basic_html',
));
$node->save();

 

How to delete Drupal Nodes with API:

// one
$nid = 66;      // example value
$node = $node_storage->load($nid);
$node->delete();
 
// multiple
$nids = [1,14,55,68];  // example value
$nodes = $node_storage->loadMultiple($nids);
$node_storage->delete($nodes);
 
// multiple, loading one at a time to avoid "out of memory" errors - may be slow
$nids = [1,14,55,68];  // example value
foreach($nids as $nid)
{
  $node = $node_storage->load($nid);
  $node->delete();
}

Working with Other Entities in Drupal 8( Paragraphs , Files, Users )

OK. that's enough for Nodes, let's jump into the entity_ref fields, like Paragraph. Of course, Field Collection was one of the important modules in Drupal 7 and has a significant role in Drupal websites but because of some big issues about memory-hungry and structural, it's almost dead in Drupal 8 and Paragraph module is a new Hero in Drupal 8.lets have a journey in working with Paragraph ( and other entity ref fields ) with Entity API 

Working with Paragraphs

$my_paragraph = null;
 
foreach ($node->get('field_paragraph_reference') as $para) {
  if ($para->entity->getType() == 'your_paragraph_type') {   // e.g., "main_content" or "social_media"
    $my_paragraph = $para->entity;
  }
}
 
if (!empty($my_paragraph)) {
  // $my_paragraph is a regular entity and can be interacted with like any other entity
  echo $my_paragraph->field_somefield->value;
 
  // (however, they don't have a "title" like a node)
  echo $my_paragraph->title->value;  // <-- this won't work
} else {
  echo "The node doesn't have this paragraph type.";
}

How to get paragraph entity type:

echo $my_paragraph->getType(); // "main_content"

Working with File entities

Managed files are also separate entities, which are associated with the node using a type of Entity Reference.

How to get a file by ID in Drupal:

$fid = 31;      // example value
$file_storage = \Drupal::entityTypeManager()->getStorage('file');
$file = $file_storage->load($fid);

Get a file referenced in a node:

$file = $node->field_image->entity;

Reading some properties from a File entity:

echo $file->getFileUri();   // "public://filetest.jpg"
// if you want the URL without Drupal's custom scheme, you can translate it to a plain URL:
echo file_url_transform_relative(file_create_url($file->getFileUri()));   // "/sites/default/files/public/filetest.jpg"
echo $file->filename->value;   // "filetest.jpg"
echo $file->filemime->value;   // "image/jpeg"
echo $file->filesize->value;   // 63619  (size in bytes)
echo $file->created->value;    // 1592206249  (Unix timestamp)
echo $file->changed->value;    // 1592234256  (Unix timestamp)
echo $file->id();              // 31

Working with User Entity

echo $file->uid->target_id;               // 1
echo $file->uid->entity->name->value;     // "zhilevan"
echo $file->uid->entity->timezone->value; // "Asia/Tehran"

Working with Entity References ( like Taxonomy Terms, etc)

foreach ($node->field_my_entity_reference as $reference) {
 
  // if you chose "Entity ID" as the display mode for the entity reference field,
  // the target_id is the ONLY value you will have access to
  echo $reference->target_id;    // 1 (a node's nid)
 
  // if you chose "Rendered Entity" as the display mode, you'll be able to 
  // access the rest of the node's data.
  echo $reference->entity->title->value;    // "Zhilevan Ibra"
 
}

Changing  the value(s) of an entity reference field is much easier than Drupal 7 :

$nids = [1,2,3,4];   // example value
$node->set('field_my_entity_reference', $nids);
$node->save();

Or appending 

$nids = [5,6];   // example value
foreach ($nids as $nid) {
  $node->field_my_entity_reference[] = [
    'target_id' => $nid
  ];
}
$node->save();

much easier than Drupal 7, isn't? 

Enjoy your coding and share your comments with me ;-)

References:

 Working with the Entity API on Drupal.org

The Ultimate Guide to Drupal 8 - Drupal Groups

Jul 20 2018
Jul 20

Illustration of workflow concept

Did you know that setting up a content workflow is included in Drupal 8 core? It can be easily set up by simply turning on the Workflow and Content Moderation modules. The Workflow module gives you the ability to define a workflow and the Content Moderation module sets up a simple workflow for drafts and the ability to create more content moderation workflows.

Introduction to Content Moderation

If you aren’t familiar with content moderation in Drupal, let’s fix that with a quick overview of what that means. Without this module, Drupal content can only be in one of two states, published or unpublished. The content is either available to the public or it isn’t. Different users with different permissions can manage the publishing status certain types of content. All of this combines to make a pretty useful and normal experience. This should also seem like a normal experience for anyone that has ever used content management system.

Where the Content Moderation module comes in is when this workflow needs to be more than just on or off. This can allow for content to be placed into different statuses or states. With built-in states available, like Draft, content can be staged by one editor and then approved by a user with different permissions. In the publishing world, this matches workflows that exist for paper content, so this is an attractive feature for those in that vertical.

Set up in 5 minutes

Content Moderation in core provides a very simple but useful workflow. Simply turning on the Workflows and Content Moderation modules adds the Editorial workflow. The Editorial workflow adds the Draft state and sets up the content workflow to go from Draft to Published and provides an admin view for drafts that need to be moderated. Using permissions you can restrict authors to only be able to create and edit drafts. Then grant the "Transition drafts to published" permission to your editors and boom!—you have content moderation set up in a matter of minutes.

View of content moderation in Drupal core

 

If you are running a Drupal 8 site and have multiple content contributors that need feedback, there is little reason to not use moderation. The out-of-the-box Content Moderation should be able to handle most situations. If that doesn’t quite fit the needs of your content workflow then there is still good news, you can create a custom workflow.

Custom workflows

If you need a more complex workflow, you probably still don’t need to write any custom code. If it’s just content type, block, or paragraph based entities that you are building a workflow for, you can just create a new workflow based on the "Content" moderation type. Different states can be defined, for example let's say you have the states draft, ready for review, ready for second review, reviewed, and published. Next you need to define the transitions, for example one transition for the above states would be “move ready for review to ready for second review”. These transitions are going to be what you give different user roles permission to do. After that is set up, you and your team are ready to roll with your new workflow.

Setting up a complex workflow in Drupal 8 Core

 

Another example of a custom moderation workflow could be for a site that publishes to multiple platforms. A workflow could be set up to allow the editors of different platforms to approve content onto the system they manage. Let’s say you have a front-facing site, a native app, and an internal portal. You can create a workflow that goes through moderation for the front-facing site and then adds content to a queue to be published or declined for each of the other outlets. This is just one of the many possible use cases for a custom workflow.

Illustration of workflow in Drupal 8 Core for publishing to multiple platforms

If you need to extend Workflow further, maybe for a custom entity, you can write a WorkflowType plugin that covers your needs. This can be used for any entity that needs to change states, so think beyond the idea of content moderation. It could be used for steps in a manufacturing process, or steps for ordering in a restaurant app, the possibilities are limitless.

Do you need it?

Workflows are super powerful and moderation comes mostly ready to go with Drupal core but does that mean you should always use them? On some sites with only a handful of admins and not a lot of roles, it may be more cumbersome than useful. Just because workflows are an option, it shouldn’t be implemented unless your users understand the human element of a workflow. Moderators should know their role in content moderation. If most of your authors have admin privileges and can just push content straight through the flow, then your workflow is mostly standing in the way of being efficient. Every good workflow should start with a meeting of your entire editorial team, and have things worked out on a whiteboard or Slack channel first. Workflows are amazing as long as everyone understands their role in the publishing chain. 

New Call-to-action

Jul 20 2018
Jul 20

So, you've installed your version of Drupal and you're now ready to actually start building your website. What essential tools should you keep close at hand, as a site builder? Which are those both flexible and powerful must-have modules to start building your Drupal site from scratch?

The ones guaranteeing you a website that:
 

  1. it integrates easily with all the most popular third-party services and apps
  2. is interactive and visually-appealing, irrespective of the user's device
  3. is a safe place for your users to hang on, interact with, shop on, network on...
  4. is conveniently easy for content managers and admins to handle
     

Luckily, there are plenty of modules, themes and plugins to overload your toolbox with:

Long gone are the code-centric webmaster's “glory days”! Nowadays, as a Drupal site builder, you have a whole array of tools at your disposal to just start building and getting a Drupal site up and running in no time.

Sometimes without the need to write a single line of code!

But, let's not beat around the bush any longer and have a close look at these 10 essential modules that you'll need for your “Drupal 8 site building” project:
 

Definitely a must-have module:

Just consider that Drupal accepts ANY user password, be it a... one-latter password!

So, in order to set up your own stricter and safer password policy, you need to install this module here.

Then, you can easily define:
 

  • the minimal (and maximal) no. of characters that any user password on your Drupal site should include
  • the no. of special characters that it has to include
  • specific restrictions Like: "one can't use his/her email address as his/her password"
     

Why should this module, too, be in your essential toolkit of modules to start building your Drupal site with?

Because it implements the functionality to get notified — you, the admin or content manager —  as soon as a user posts a comment on the website.

Note: you can get “alerts” about both the logged in and the anonymous visitors' comments.
 

3. Breakpoints, One of the Must-Have Modules to Start Building Your Drupal Site 

It goes without saying that one of the Drupal site building best practices is providing it with a responsive web design.

And this is precisely what this module here facilitates:

Setting the proper media queries, once you've defined your own breakpoints.
 

A module whose functionality bubbles up to the content manager's experience.

Whenever he/she will have to make a selection involving both categories and subcategories, this hierarchical type of selection will prove to be more than useful:

Practically, once you/they select the “main” option, a new drop-down menu/widget including the subcategories to select from pops up, as well. Like in the image here below:

Essential Modules to Start Building Your Drupal Site With: Simple Hierarchical Select

And complying with this EU notification is mandatory. 

So, this is why EU Cookie Compliance is another one of the essential modules to start building your Drupal site with:

It displays the given notification — providing visitors with the option to agree or/and to read more information about your cookie policy —  in the footer of your website.
 

6. Shield              

Any Drupal site building guide would advise you to install a module that shields your website from anonymous users and search engines when running your test environments.

And this is what Shield is built for:

To screen your site from the rest of the world —  except for you and the logged in users — when you deploy it in a test environment.

A more than convenient method, as compared to manually setting up a .htpasswd and then integrating it with .htaccess.
 

If you're not just another Drupal site builder, but a user experience-centric one, you must consider also those modules to build your Drupal site with that boost the level of user interactivity.

Like Beauty Tips here.

It displays balloon-help style tooltips whenever a user hovers over a certain text or page element on your website.

Pretty much like Bootstrap tooltip does.
 

Another one of the Drupal site building best practices is to turn it into a safe place for your users to be. 

In short: to protect their privacy.

And if you're building a website that's available on both HTTP and HTTPS, the Secure Login module comes in handy as it makes sure that:
 

  1. the user login form
  2. all the other fill-in forms that you'll configure for extra security
     

… get submitted via HTTPS.

It locks them down, enforcing secure authenticated session cookies, so that user passwords and other critical user data don't get exposed all over the internet.
 

It's another one of those essential modules to start building your Drupal site with if you're determined to provide the best user experience there.

What does it do?

It enables particular visitors on your site — those granted permission to edit and to add new menu items — to choose whether they open menu items in new windows or in the current ones.
 

A module that makes up for the “Remember me” feature that's missing from the user login screen in Drupal:

It comes to implement this missing option, one independent from the PHP session settings.

So, we're not talking about the conventional, too long “PHP session time” here, but about a more secure and user-friendly “Remember me” feature added to the login form.

Furthermore, the module enables you to define some extra security policies, too:
 

  • the no. of persistent sessions that a Drupal user can enjoy at the same time
  • specific pages where users still have to log in again
  • after how long the logged-in users will need to re-enter their credentials once again
     

And 2 “Extra” Modules to Consider When Building Your Drupal Site

By “extra” I mean that they're not really essential modules to start building your Drupal site with. Yet, they're the first 2 ones to consider right after you've put together your “survival” toolkit as a site builder:
 

1. Site Settings & Labels    

Take this common scenario:

You need to display a social network URL on multiples pages on your Drupal site. 

What do you do?
 

  1. you hard coding this single setting in the source
  2. you start building a custom Drupal module for handling this variable
  3. you install the Site Settings & Labels module and thus display a checkbox to render page elements through a template conditional
     

The “c” variant's undoubtedly the winner here. 

A win-win for you, in fact:
 

  1. you save the time you'd otherwise have spent coding
  2. you improve the user experience on your Drupal site
     

2. Slick/Slick Views/Slick Media          

It's actually a suite of modules to start building your Drupal site with. One “injecting” the needed functionality so that you can easily set up:
 

  • carousels
  • slideshows
     

… on your freshly built website.

Note!

I won't lie to you: setting up the library dependencies is not exactly a child's play. Yet, once you've succeeded it, configuring the modules in this suite, right in your Drupal admin, is piece of cake.

The END! These are the 10 must-have modules to start building your Drupal site from scratch with. Would you have added some more? 

Or maybe you wouldn't have included some of the modules listed here, as you don't consider them “essential”? A penny for your thoughts!

Jul 20 2018
Jul 20

Change can be hard and terrifying, especially at its inception. Yet, a change is what allows you to grow, evolve and progress.

I know it can get painful to take a decision as big as a migration of your Drupal 7 or 6 content management system – the one that you knew and have loved, but once done, you will know you have made the most brilliant decision, ever! Don’t just take my word for it, get hold of Drupal 8’ers (yeah, it can be a term!) and ask them. As you read on, you will know how Drupal 8 migration can play a key role in the success of your business.

It has been a while, about three years now, since Drupal 8 has made its entry into the field. The best of the Drupal community toiled for 4 years to produce this masterpiece of a CMS and finally announced its arrival in November 2015. Since then, more than 150,000 websites have migrated to Drupal 8, only to find a higher performing, robust and a more flexible solution. If you’re not ready to take the plunge yet, maybe these reasons will help you dive in.

Still on Drupal 6?

If you’re still stuck on to Drupal 6, you must know that everyone else has moved on. Today, the web has changed and so has Drupal. The Drupal community no longer supports Drupal 6 since February 2016. Which means, there will be no new modules or features to look forward to, no more bug-fixes, security updates and patches. Thus putting your website’s security at high-risk and of course depriving it of some TLC from the community. If you still want the best for your website, migrate to Drupal 8 now! Yes, you can completely skip Drupal 7. Drupal’s migrate module is now included in Drupal 8 core and makes the switch easy and fast.

High-performance Personalization

Personalized content has time and again proven to be one of the most effective content marketing strategies to improve your revenue. However, there is a fine line between personalization and being creepy. When you start using personalization the wrong way, you will look like an intruder. But when you implement it the right way, you will look like a company who cares for your consumer’s preferences and choices

Although Drupal 7 also supports personalization by providing many modules to select from, Drupal 8 makes the deal even sweeter. With personalization, there’s bound to be tons of unique content which cannot be cached. Lesser caching of a page means slower loading time, thereby driving the customer away. Drupal 8’s new BigPipe module to the rescue! It lets you segregate your page into different sections (called Pagelets) which can be rendered as they get available (Cached first). This lets you drastically improve your page’s perceived performance and speed.

Google Trends

Drupal 8 also integrates seamlessly with third-party personalization tools and our personal favourite is Acquia Lift that connects customer data with content efficiently. While Drupal 7 also provides this integration, it does not receive any new features now. The latest version of Acquia Lift in Drupal 8 features a suave in-context, drag and drop UI.

You’ve got your basics covered!

One of the most stunning features of Drupal 8 is that you have (almost) everything you need, out-of-the-box. This is why content managers are loving Drupal 8 - It’s almost like Drupal 8 has been personalized just for them.

  • Responsive websites are not a luxury anymore, they are a necessity. All of Drupal 8’s themes are responsive off-the-rack – which not only works great with all devices also makes configuration and set up of your Drupal website a lot easier.
  • A built-in, well configured WYSIWYG editor CKEditor lets you preview and edit your content in a breeze. You also have an in-place editor that lets you edit blocks, content, menus, etc. right in the same page.
  • SEO gets you noticed and out-there. With some of Drupal’s built-in powerful SEO modules , you can take your website places! Modules like SEO Checklist, PathAuto, Redirect, MetaTag, etc. are killing it!
  • The newest and most powerful version of HTML, which is HTML5 is now built-into Drupal 8. It lets you embed complex input elements like audio, video, date, email, etc with ease and better functionality across all devices.
  • Take your business global with Drupal 8’s out-of-the-box multilingual support. You can not only create pages enabled with language-based views, even the admin interface allows you to select our preferred language. The built-in content translate modules enables you to translate any content entity into different languages.

Drupal 8’s API-First Approach for better brand interaction

By the year 2020, there are going to be more than 50 billion internet connected devices. Content is now consumed via a plethora of mediums – computers, mobiles, IoTs, wearables, conversational interfaces, smart TVs… and the list keeps growing. Which means, your brand needs to interact with a lot more devices and in many more formats than just a website. Content delivery has gotten a lot more challenging.

Just so we are on the same page, an API (Application Programing Interface) is a rules or routines (functions or programs) that specifies how applications can interact with each other. For example, if you want to display the current weather on your website, you can invoke an API with websites that offer this service.

To be able to handle the content delivery challenge efficiently, content needs to be treated like well-structured data. Drupal’s API-first approach, lets you create an API before you build your website or mobile app. This futuristic approach allows you to turn content into services which can then interact with diverse devices irrespective of the formats. While Drupal 7, also supports the API-first approach with the help of additional modules, Drupal 8 comes built-in with the content-as-a-service model.

This is what our in-house expert Drupal Practice Head, Malabya Tewari has to say about Drupal 8’s API first approach – “Drupal 8 has taken this approach to another level and here’s why- REST module is now in core, where you can create own custom web-services using Views (which is also added in core in D8). It is easier to create custom REST APIs using the core REST module. Adding basic authentication is in core as well. You can get APIs, including JSON API and GraphQL, for all entities - out of the box! “

As quoted by Drupal founder, Dries Buytaert – “Drupal 8 changes everything we know about content management as we move from websites to digital experiences.” Drupal 8 comes packed with even more powerful features and functionalities like never before. If you thought Drupal 6 or 7 was amazing, wait till you experience Drupal 8. Migrate to Drupal 8.

Jul 20 2018
Jul 20

Usain Bolt, in his last appearance at the World Track and Field Championships in 2017, stood third by a narrow defeat in the 100m race leaving behind a yawning gulf. Bolt finished the race just a hundredth of a second later than his fellow competitors.

Every (nano)second counts!

Four sprinters crossing the finishing line with crowd cheering them on in the background


Such is the importance of speed that even a three-time Olympic gold medallist, Usain Bolt, had to bear the brunt of those nanoseconds. Someone might ask “How do I get started learning about web performance?”

Visualise that it is the Mega Book Sale Day and the bookworms are thronging the best performing online stores that are selling the books of renowned authors. Coping with such a colossal turn-up, a site with much faster page load speed would be preferred over the ones that are a bit sluggish. Drupal offers a superb platform for an effective website performance optimisation thereby making it faster and user-friendly.

The Significance of Website Performance Optimisation

Web performance optimisation involves monitoring the performance of web application analysing and assessing it, and identifying the best practices to improve it.

Web applications are a combination of server-side and client-side code. To improve the web performance, both the sides need to be optimised.

The client-side optimisation relates to the initial page load time, JavaScript that runs in the browser, downloading all of the resources etc. that are seen in the web browser.

The server-side optimisation relates to database queries and other application dependencies to check how long it takes to run on the server for executing requests.

Performance optimisation is significant because of the following factors:

User retention

BBC found that they are losing out of 10% of users for every extra second their website took to load. Also, DoubleClick by Google found that if the web page took more than 3 seconds to load, 53% of mobile site visitors tend to abandon the page.

Infographic showing statistics on the importance of performance optimisation for improving user retention

 

We all strive to make our users engage in a meaningful interaction with what we have built for the web.

So, if it is an online store, you would like to see a prospective audience turning into buyers. Or if it is a social networking web application, you would want your online visitors to get ensconced in an arresting interaction with one another. High performing sites play a vital role in engaging and retaining users.

An increase in user retention by 5% can result in increased profits by up to 95%.

It costs 5 to 25 times more to attract new customers. So, even a 5% enhancement in customer retention can lead to increased profits of 25%-95%.

By redesigning their web pages, Pinterest combated a 40% reduction in perceived wait times and witnessed a 15% increase in their search engine traffic and sign-ups.

COOK, a provider of high-quality frozen meals, was able to address the average page load time and cut it down by 850 milliseconds which resulted in 7% in conversions, 10% increase in pages per session and 7% decrease in bounce rate.

Improved Conversions

User retention ultimately leads to better conversion rates. Slow sites can have huge repercussions on the business revenues. Better performance of sites can be highly profitable to shore up revenues.

Graphical representation depicting conversion rate and bounce rate with respect to page load timeSource: Hubspot

According to 2016 Q2 Mobile Insights Report by Mobify, 1.11% increase in session-based conversion was seen for every 100ms decrease in homepage load speed. Moreover, a 1.55% increase in session-based conversion was noticed for every 100ms decrease in checkout page load time. The outcome was an increase in the average annual revenue by approximately $530,000.

Also, AutoAnything revved up their sales by 12-13% after decreasing their page load time by half.

User experience

When sites ship tons of code, underwhelming performance persists as the browsers chew through megabytes of it on snail-paced networks. 

Infographic showing statistics on importance of web user experienceSource: Impactbnd

Even the devices with limited processing power and memory can find it hard to cope up with the modest amount of unoptimised code. With poor performance taking centre stage, application responsiveness and availability diminishes.

Better optimised code lead to high functioning and better-performing sites which in return alleviate the digital user experience.

Strategising the web performance

Formulation of strategies to improve web performance can be done in two ways:

Bottom-up strategy

Also known as performance-by-design, the bottom-up strategy is the preferred approach to integrate performance as a core development principle. In this strategy, the performance optimisation principles are framed, applied and maintained. This is done right from the application design phase. 

The key stages that are involved in this approach are stated below:

  • Performance principles are laid out.
  • The key pages/transactions are identified, optimised accordingly, and then performance principles are executed.
  • Performance SLAs (Service Level Agreement) are monitored and maintained.

Here's a chart by Infosys which explains it best: 

Illustration showing the key stages involved in bottom-up strategy for improving the web performanceKey stages involved in bottom-up strategy

Top-down strategy

If an existing application needs to be optimised for performance, top-down strategy comes into play. This is a preferred option only when the legacy applications are being optimised for high performance. Also, this is not cost effective and the optimisation options are limited.

Steps involved in this strategy are as follows:

  1. Factors that are contributing to the page performance are assessed using tools like PageSpeed Insights, WebPageTest etc.
  2. Activities that would lead to maximum performance improvements are optimised.
  3. Other optimisations with subsequent releases are iteratively implemented.

In addition to these strategies, one must consider an important methodology called ‘Performance Budgeting’. It means setting a performance threshold that you aim to stay within. You can safeguard your site speed and detect any regression in the performance by setting up a performance budget to ensure continual eye on performance.

This is how we do it!

Expected load time and Google page speed score, as shown below, is the core of our perpetual and iterative development process.

Illustration showing the key processes involved in the performance budgeting methodology 

The above chart shows that, while applying performance budgeting methodology, we take note of:

  1. Average load time of 2 seconds or less
  2. Defined maximum limit on page size and number of HTTP requests
  3. Verification of all server site tuning for an efficient and responsive site
  4. Google page speed performance grade of above 90
  5. Implementing performance optimisation

How to Speed up My Drupal Website Performance?

How to speed up my Drupal website performance? Drupal is loaded with an enormous amount of features which, when implemented smartly, can lead to superfast page loads. There are several techniques to make your website faster by leveraging the amazing features of Drupal.

Keeping your site and modules updated

Outmoded modules can deter your efforts in speeding up your website. Thus, it is important to update every module enabled on your Drupal site.

Uninstalling unused modules

Like those outdated modules, it is significant to keep a tab on least used or no longer used modules. The number of Drupal modules installed on the site is directly proportional to the time taken for code execution which affects page load time. Uninstalling unwanted modules can alleviate execution time.

Moreover disabling the modules also adds to the execution time of the code. So, a complete removal by uninstalling the unused modules can speed up the Drupal site.

Optimising Cache

Optimisation of native cache system ensures that all the web page components are stored in an easily accessible location after a user visits your site for the very time. So, whenever the user visits your site again, the page elements are loaded from the cache which leads to increased page load speed.

Drupal has the provision of advanced caching with a great set of modules:

  • Internal Page Cache module helps in caching the web pages for anonymous users to increase the speed for subsequent users.
     
  • Dynamic Page Cache module caches web pages for the anonymous and authenticated users and is recommended for the websites of all screen sizes.
     
  • BigPipe module allows your users to quickly see the unchanged, cacheable page elements while the personalised content is exhibited next. This technology was inspired by Facebook. Drupal 8’s much improved render pipeline and render API is of huge help.
     
  • Redis module helps in integrating Drupal with Redis key-value store thereby providing a robust cache system for static pages.
     
  • Varnish module lets you integrate Drupal sites with an advanced and fast reverse-proxy system - Varnish cache -  to serve static files and unknown page-views quicker and at high volumes.

Optimising database

Website coding is not the sole thing that can be optimised. Optimising database by regularly cleaning up the data and removing the unwanted piece of information.

Memcache API and Integration module, help in the integration of Drupal and Memcached. It stores your data in active memory for a limited period of time thereby making it faster to access. 

So, instead of making queries to the database constantly, the information is readily available. Such a system also works on the shared web hosting plans.

Incorporating a Content Delivery Network (CDN)

Components like CSS, JavaScript and media are hosted by CDN and served to the online visitors from the nearest location. This can help in mitigating the page load time by rapidly delivering web page components.

Drupal module, CDN, helps in the integration of Content Delivery Network for Drupal websites. It changes the file URLs so that files like CSS, JavaScripts, images, videos, and fonts are downloaded from the CDN instead of your web server.

Optimising bandwidth

Aggregating all CSS and JavaScript files to make them load together is what bandwidth optimisation refers to. Such a parallel processing ensures that all the page elements can be seen by the users almost immediately.

Optimising images

Drupal 8 core is loaded with image optimisation feature to set the compression ratio of the images and fine-tune the page performance.

Moreover, the size of the images for screen sizes of different devices can be optimised in Drupal 8 to enhance the page load speed.

Handling 404 errors

Whenever something on the website breaks to cause a 404 error, it can lead to sluggishness. For instance, a failed image can damage the performance of the site. Drupal 8 provides a module called Fast 404 which utilises the resources better and whitelists files and verifies pathways of problem.

Managing the use of CSS and JavaScript

CSS and JavaScript provide wonderful methods for customisation and flexibility. But, too much of good things can be troublesome for your websites. Avoiding excessive use of CSS files and JavaScript use and keeping the code to a minimum can improve performance.

Advanced CSS/JS Aggregation, Drupal module, can help in keeping a tab of your front-end performance by aggregating CSS and JavaScript files to improve speed.

Using lazy loading

Lazy or on-demand loading is a perfect way to optimise your site’s performance. In this method, you split your code at logical breakpoints and then load it once the user has done something that requires a new block of code.

Basically, in traditional websites, all the images and content are preloaded into the web browser when someone accesses the site. Lazy loading loads these elements as soon as a user scrolls to view a content.

Blazy, Drupal module, provides the functionalities of lazy loading and multi-serving the images to save bandwidth and server requests.

Better web hosting

It is of consummate importance that, while implementing every possible tips and trick and utilising the Drupal’s amazing features, you chose the best web hosting provider that will decide your site’s ultimate speed, stability and security.

Case Study

The Drupal website of the Farm Journal’s MILK was optimised for high performance and better search engine rankings with a help of carefully drafted audit report by Opensense Labs.

In this section, we will focus on how we used our Drupal expertise to resolve the performance issues.

Project highlights

Previously segregated CSS and JS files cached separately which escalated the page load time. We aggregated all these files and put them in one place which assuaged the page load time.

Moreover, we used Advanced CSS/JS Aggregation Drupal module to minify CSS, JS and HTML and reduce load time.

In addition to these, we enabled Redis, used as a database, cache and message broker, so that it can be used as the backend instead of MySQL. This allowed cached items to be retrieved swiftly and improved performance.

Project outcome

On testing the performance metrics on tools like PageSpeed Insights and Pingdom, we witnessed significant improvement.

PageSpeed Insights

  • Result on handheld devices
Google pagespeed insights result for mobile devices before implementing performance enhancement in the sitePre-implementation (Live Instance)

 

Alt text: Google pagespeed insights result for mobile devices after implementing performance enhancement in the sitePost-implementation (Live Instance)

 

  • Result on Desktop
Google pagespeed insights result for desktop before implementing performance enhancement in the sitePre-implementation (Live Instance)

 

Google pagespeed insights result for desktop after implementing performance enhancement in the sitePost-implementation (Live Instance)

 

Pingdom

Pingdom scores on different performance metrics of site before implementing performance enhancementPre-implementation Pingdom Score (Live Environment)

 

Pingdom scores on different performance metrics of site after implementing performance enhancementPost-implementation Pingdom Score (Live Environment)

 

Conclusion

Speed can be the determining factor in the amount of time an online user spends on your website. It’s important that you remove the sluggishness from your website and inculcate betterments in its performance. Drupal 8 can help by incorporating wonderful features to make your site a high performing space.

Feel free to reach us at [email protected] for developing a high performing Drupal website.

Jul 20 2018
Jul 20
Invite your team to Drop Guard!
We happily announce our Multi User - Invitations feature! Our users needed an option to add more team members with tailored access rights for a specific project. 
So we created the “Invitations” section in our menu bar on the left. By entering this page, you will be able to invite other team members or view the invitation for yourself.
You can assign specific projects to a team member, be it developer, support manager or project manager; as well as you can give your customer read access to the customer’s project without exposing your other projects. This access policy feature provides new possibilities for an open and understandable workflow with Drop Guard. 

Invite others to your projects!

 

So what steps need to be done to invite someone? 

Login into your Drop Guard account
Select “Invitations” in the menu on the left
  • Type in the email address of the person you want to invite
  • Select the specific project you want to share
  • Decide whether to give that person read or write permission
  • Send the invitation
  • Add a personal message if you want 
You can check the status of the invitation or even delete the sent invite. 
After a person accepted your invitation, you can always cancel the given permission or change it. 
To access the project, the invited person needs to create an account first. The creation option will be sent automatically within the invitation via email.
As well as you can invite others, you can be invited too, of course. Above the “invite others” section, you can accept or decline invitations which are meant for you
And that’s it! Share your project easily and make your workflows and processes as comprehensible as you want to. 
We’re looking forward to your feedback and suggestions
 
Jul 20 2018
Jul 20
Modules overview in Drop Guard
What modules do I use? How often are they used in my project? In which projects? Which version exists? Is it the same version as on drupal.org? Might a specific module be a threat for my project(s)?
These and many more questions will be answered within one click on our “Modules overview page” on the left in the menu bar. Check out this short post to learn more about our new feature!
Among other reasons, this feature was requested by our users as they also want to track whether a module is quite relevant for a project or less critical within an update process.

Modules overview page in Drop Guard

 

You can check the following values:

Usage of a specific module
That value shows how much the module is used in all included projects in percentage.
 
Name of the used module
By clicking on this value, you receive more details about this specific module and it’s usage.
 
Projects
This numeric value enfolds the amount (and after clicking on it the details) of all projects that use that specific module.
 
The module version on drupal.org
By clicking on this module version, you will be led to the module’s Drupal.org info page.
 
You receive also information about the maintenance status and the development status (both related to the drupal.org information). That might also be an indicator for a potential source of issues, if a module isn’t maintained regularly but you’re using it on a regular base in your projects.
 
Project internal Status:
The green checkbox shows successfully updated modules, the colored warning triangle represent the criticality of a pending update: Security related (yellow) & Highly Critical (red): Let Drop Guard take a quick look at them!
 
You can expand every list of details by clicking on the numeric value. All columns can be filtered as well to give you a quick and clean overview.
Don’t hesitate to tell us your opinion about this new feature!
 
Jul 20 2018
Jul 20
Manuel, Max, Joe & Johanna - founder of App Guard GmbH

What happened? 

We founded an independent company, including the Drop Guard service! Learn more about the App Guard GmbH journey so far in this announcement post.

But first, where did we came from? 

Drop Guard was built by the German Drupal company Bright Solutions in 2014, after the idea was born to optimize the internal update process as much as possible - no more wasted time on updates, no fear of Drupalgeddon, no annoying update tasks. 
The platform service was optimized and adapted continuously besides other projects of the company, until Manuel Pistner, CEO of Bright Solutions, decided to form a team for this project, that already counted important customers. 
After that it was just a matter of time until we decided to separate all resources from the Drupal company and found the App Guard GmbH!
 
Johannes Noll, who we call Joe, is the CEO of the new company, Max Madl as CTO is responsible for the technical management. Manuel Pistner supports us as independent business consultant and I’m looking forward to boost the marketing and user experience management of App Guard GmbH. Alexey Beloglazov is our expert for all development related requests and implementations, for Drop Guard as well as for AppGuard.
With this core team of 5 we’re here to master this update automation vision!

And what is AppGuard? What will happen with Drop Guard?

“AppGuard” as a product will be the next automated update solution for package and dependency managers such as npm, Composer, Bundler and Yarn. You can already sign up as beta tester for the AppGuard mvp this year.
Drop Guard will be our Drupal specific solution for Drupal update automation management to ensure that the individual and special requirements for that open source CMS are respected.
If you have questions about these products or about the roadmap, you can always reach out for us
We’re looking forward to enjoy this update journey with you, stay tuned for the next announcements :-)

Manuel, Max, Joe & Johanna - founder of App Guard GmbH

Jul 20 2018
Ana
Jul 20

You have already seen what Drupal blogs were trending in the previous month, and now it is time to look at all our blog post we wrote. Here are the blog topics we covered in June.

The first blog post was Drupal and the Internet of Things. Unless you’ve been living under the rock these past few years, you might have heard of the term ‘The Internet of Things’. If you’ve always wondered what the Internet of Things is and you know what Drupal is, you should read this blog post.

The second was an Introduction to Drupal Commerce. Drupal and Commerce. These are two words that aren’t usually associated with each other. But do you know that Drupal can become a great eCommerce solution thanks to a dedicated software so-called Drupal Commerce? If you didn’t, then well, you are in for a treat. In this blog post, we took a look at what Drupal Commerce is and how it can be used to create an eCommerce store using Drupal.

computer

The last blog post in June was How to Integrate Maps to Drupal 8. Thanks to advancements in the tech industry, things that were once difficult have become incredibly easy now. One of these is finding addresses. As an online business, making sure your physical address is easily visible to your users can be crucial. What other way is there to show your visitors your address other than digital maps such as Google Maps, the largest and the most widely used online map software in the world. In this post, we took a look at various ways of adding maps to your Drupal site and how they can be utilized for better convenience for your site visitors.

Those were our blog posts from June. Looking forward to continuing having you as a reader!
 

Jul 19 2018
Jul 19

It's been 12 months since my last progress report on Drupal core's API-first initiative. Over the past year, we've made a lot of important progress, so I wanted to provide another update.

Two and a half years ago, we shipped Drupal 8.0 with a built-in REST API. It marked the start of Drupal's evolution to an API-first platform. Since then, each of the five new releases of Drupal 8 introduced significant web service API improvements.

While I was an early advocate for adding web services to Drupal 8 five years ago, I'm even more certain about it today. Important market trends endorse this strategy, including integration with other technology solutions, the proliferation of new devices and digital channels, the growing adoption of JavaScript frameworks, and more.

In fact, I believe that this functionality is so crucial to the success of Drupal, that for several years now, Acquia has sponsored one or more full-time software developers to contribute to Drupal's web service APIs, in addition to funding different community contributors. Today, two Acquia developers work on Drupal web service APIs full time.

Drupal core's REST API

While Drupal 8.0 shipped with a basic REST API, the community has worked hard to improve its capabilities, robustness and test coverage. Drupal 8.5 shipped 5 months ago and included new REST API features and significant improvements. Drupal 8.6 will ship in September with a new batch of improvements.

One Drupal 8.6 improvement is the move of the API-first code to the individual modules, instead of the REST module providing it on their behalf. This might not seem like a significant change, but it is. In the long term, all Drupal modules should ship with web service APIs rather than depending on a central API module to provide their APIs — that forces them to consider the impact on REST API clients when making changes.

Another improvement we've made to the REST API in Drupal 8.6 is support for file uploads. If you want to understand how much thought and care went into REST support for file uploads, check out Wim Leers' blog post: API-first Drupal: file uploads!. It's hard work to make file uploads secure, support large files, optimize for performance, and provide a good developer experience.

JSON API

Adopting the JSON API module into core is important because JSON API is increasingly common in the JavaScript community.

We had originally planned to add JSON API to Drupal 8.3, which didn't happen. When that plan was originally conceived, we were only beginning to discover the extent to which Drupal's Routing, Entity, Field and Typed Data subsystems were insufficiently prepared for an API-first world. It's taken until the end of 2017 to prepare and solidify those foundational subsystems.

The same shortcomings that prevented the REST API to mature also manifested themselves in JSON API, GraphQL and other API-first modules. Properly solving them at the root rather than adding workarounds takes time. However, this approach will make for a stronger API-first ecosystem and increasingly faster progress!

Despite the delay, the JSON API team has been making incredible strides. In just the last six months, they have released 15 versions of their module. They have delivered improvements at a breathtaking pace, including comprehensive test coverage, better compliance with the JSON API specification, and numerous stability improvements.

The Drupal community has been eager for these improvements, and the usage of the JSON API module has grown 50% in the first half of 2018. The fact that module usage has increased while the total number of open issues has gone down is proof that the JSON API module has become stable and mature.

As excited as I am about this growth in adoption, the rapid pace of development, and the maturity of the JSON API module, we have decided not to add JSON API as an experimental module to Drupal 8.6. Instead, we plan to commit it to Drupal core early in the Drupal 8.7 development cycle and ship it as stable in Drupal 8.7.

GraphQL

For more than two years I've advocated that we consider adding GraphQL to Drupal core.

While core committers and core contributors haven't made GraphQL a priority yet, a lot of great progress has been made on the contributed GraphQL module, which has been getting closer to its first stable release. Despite not having a stable release, its adoption has grown an impressive 200% in the first six months of 2018 (though its usage is still measured in the hundreds of sites rather than thousands).

I'm also excited that the GraphQL specification has finally seen a new edition that is no longer encumbered by licensing concerns. This is great news for the Open Source community, and can only benefit GraphQL's adoption.

Admittedly, I don't know yet if the GraphQL module maintainers are on board with my recommendation to add GraphQL to core. We purposely postponed these conversations until we stabilized the REST API and added JSON API support. I'd still love to see the GraphQL module added to a future release of Drupal 8. Regardless of what we decide, GraphQL is an important component to an API-first Drupal, and I'm excited about its progress.

OAuth 2.0

A web services API update would not be complete without touching on the topic of authentication. Last year, I explained how the OAuth 2.0 module would be another logical addition to Drupal core.

Since then, the OAuth 2.0 module was revised to exclude its own OAuth 2.0 implementation, and to adopt The PHP League's OAuth 2.0 Server instead. That implementation is widely used, with over 5 million installs. Instead of having a separate Drupal-specific implementation that we have to maintain, we can leverage a de facto standard implementation maintained by others.

API-first ecosystem

While I've personally been most focused on the REST API and JSON API work, with GraphQL a close second, it's also encouraging to see that many other API-first modules are being developed:

  • OpenAPI, for standards-based API documentation, now at beta 1
  • JSON API Extras, for shaping JSON API to your site's specific needs (aliasing fields, removing fields, etc)
  • JSON-RPC, for help with executing common Drupal site administration actions, for example clearing the cache
  • … and many more

Conclusion

Hopefully, you are as excited for the upcoming release of Drupal 8.6 as I am, and all of the web service improvements that it will bring. I am very thankful for all of the contributions that have been made in our continued efforts to make Drupal API-first, and for the incredible momentum these projects and initiatives have achieved.

Special thanks to Wim Leers (Acquia) and Gabe Sullice (Acquia) for contributions to this blog post and to Mark Winberry (Acquia) and Jeff Beeman (Acquia) for their feedback during the writing process.

Jul 19 2018
Jul 19

Though it seems like yesterday, Contenta CMS got the first stable release more than a year ago. In the meantime, Contenta CMS started using Media in core, improved Open API support, provided several fixes for the Schemata module, written and introduced JSON RPC, and made plans to transition to the Umami content model from Drupal core. A lot has happened behind the scenes. I’m inspired to hear of each new instance where Contenta CMS is being used both out-of-the-box and as part of a custom decoupled Drupal architecture. Both use cases were primary goals for the project. In many cases, Drupal, and hence Contenta CMS, is only part of the back-end. Most decoupled projects require a nodejs back-end proxy to sit between the various front-end consumers and Drupal. That is why we started working on a nodejs starter kit for your decoupled Drupal projects. We call this Contenta JS.

Until now, each agency had their own nodejs back-end template that they used and evolved in every project. There has not been much collaboration in this space. Contenta JS is meant to bring consistency and collaboration—a set of common practices so agencies can focus on creating the best software possible with nodejs, just like we do with Drupal. Through this collaboration, we will be able to get features that we need in every project, for free. Today Contenta JS already comes with many of these features:

  • Automatic integration with the API exposed by your Contenta CMS install. Just provide the URL of the site and everything is taken care of for you.
    • JSON API integration.
    • JSON RPC integration.
    • Subrequests integration.
    • Open API integration.
  • Multi-threaded nodejs server that takes advantage of all the cores of the server’s CPU.
  • A Subrequests server for request aggregation. Learn more about subrequests.
  • A Redis integration via the optional @contentacms/redis.
  • Type safe development environment using Flow.
  • Configurable CORS.
Diagram of Contenta JSDiagram of Contenta JS

Watch the introduction video for Contenta JS (6 minutes).

Videos require iframe browser support.

Combining the community’s efforts, we can come up with new modules that do things like React server-side rendering with one command, or a Drupal API customizer, or aggregate multiple services in a pluggable way, etc.

Join the #contenta Slack channel if this is something you are passionate about and want to collaborate on it. You can also create an issue (or a PR!) in the GitHub project. Together, we can make a holistic decoupled Drupal backend from start to end.

Originally published at humanbits.es on July 16, 2018.

Jul 19 2018
Jul 19

It's been 12 months since my last progress report on Drupal core's API-first initiative. Over the past year, we've made a lot of important progress, so I wanted to provide another update.

Two and a half years ago, we shipped Drupal 8.0 with a built-in REST API. It marked the start of Drupal's evolution to an API-first platform. Since then, each of the five new releases of Drupal 8 introduced significant web service API improvements.

While I was an early advocate for adding web services to Drupal 8 five years ago, I'm even more certain about it today. Important market trends endorse this strategy, including integration with other technology solutions, the proliferation of new devices and digital channels, the growing adoption of JavaScript frameworks, and more.

In fact, I believe that this functionality is so crucial to the success of Drupal, that for several years now, Acquia has sponsored one or more full-time software developers to contribute to Drupal's web service APIs, in addition to funding different community contributors. Today, two Acquia developers work on Drupal web service APIs full time.

Drupal core's REST API

While Drupal 8.0 shipped with a basic REST API, the community has worked hard to improve its capabilities, robustness and test coverage. Drupal 8.5 shipped 5 months ago and included new REST API features and significant improvements. Drupal 8.6 will ship in September with a new batch of improvements.

One Drupal 8.6 improvement is the move of the API-first code to the individual modules, instead of the REST module providing it on their behalf. This might not seem like a significant change, but it is. In the long term, all Drupal modules should ship with web service APIs rather than depending on a central API module to provide their APIs — that forces them to consider the impact on REST API clients when making changes.

Another improvement we've made to the REST API in Drupal 8.6 is support for file uploads. If you want to understand how much thought and care went into REST support for file uploads, check out Wim Leers' blog post: API-first Drupal: file uploads!. It's hard work to make file uploads secure, support large files, optimize for performance, and provide a good developer experience.

JSON API

Adopting the JSON API module into core is important because JSON API is increasingly common in the JavaScript community.

We had originally planned to add JSON API to Drupal 8.3, which didn't happen. When that plan was originally conceived, we were only beginning to discover the extent to which Drupal's Routing, Entity, Field and Typed Data subsystems were insufficiently prepared for an API-first world. It's taken until the end of 2017 to prepare and solidify those foundational subsystems.

The same shortcomings that prevented the REST API to mature also manifested themselves in JSON API, GraphQL and other API-first modules. Properly solving them at the root rather than adding workarounds takes time. However, this approach will make for a stronger API-first ecosystem and increasingly faster progress!

Despite the delay, the JSON API team has been making incredible strides. In just the last six months, they have released 15 versions of their module. They have delivered improvements at a breathtaking pace, including comprehensive test coverage, better compliance with the JSON API specification, and numerous stability improvements.

The Drupal community has been eager for these improvements, and the usage of the JSON API module has grown 50% in the first half of 2018. The fact that module usage has increased while the total number of open issues has gone down is proof that the JSON API module has become stable and mature.

As excited as I am about this growth in adoption, the rapid pace of development, and the maturity of the JSON API module, we have decided not to add JSON API as an experimental module to Drupal 8.6. Instead, we plan to commit it to Drupal core early in the Drupal 8.7 development cycle and ship it as stable in Drupal 8.7.

GraphQL

For more than two years I've advocated that we consider adding GraphQL to Drupal core.

While core committers and core contributors haven't made GraphQL a priority yet, a lot of great progress has been made on the contributed GraphQL module, which has been getting closer to its first stable release. Despite not having a stable release, its adoption has grown an impressive 200% in the first six months of 2018 (though its usage is still measured in the hundreds of sites rather than thousands).

I'm also excited that the GraphQL specification has finally seen a new edition that is no longer encumbered by licensing concerns. This is great news for the Open Source community, and can only benefit GraphQL's adoption.

Admittedly, I don't know yet if the GraphQL module maintainers are on board with my recommendation to add GraphQL to core. We purposely postponed these conversations until we stabilized the REST API and added JSON API support. I'd still love to see the GraphQL module added to a future release of Drupal 8. Regardless of what we decide, GraphQL is an important component to an API-first Drupal, and I'm excited about its progress.

OAuth 2.0

A web services API update would not be complete without touching on the topic of authentication. Last year, I explained how the OAuth 2.0 module would be another logical addition to Drupal core.

Since then, the OAuth 2.0 module was revised to exclude its own OAuth 2.0 implementation, and to adopt The PHP League's OAuth 2.0 Server instead. That implementation is widely used, with over 5 million installs. Instead of having a separate Drupal-specific implementation that we have to maintain, we can leverage a de facto standard implementation maintained by others.

API-first ecosystem

While I've personally been most focused on the REST API and JSON API work, with GraphQL a close second, it's also encouraging to see that many other API-first modules are being developed:

  • OpenAPI, for standards-based API documentation, now at beta 1
  • JSON API Extras, for shaping JSON API to your site's specific needs (aliasing fields, removing fields, etc)
  • JSON-RPC, for help with executing common Drupal site administration actions, for example clearing the cache
  • … and many more

Conclusion

Hopefully, you are as excited for the upcoming release of Drupal 8.6 as I am, and all of the web service improvements that it will bring. I am very thankful for all of the contributions that have been made in our continued efforts to make Drupal API-first, and for the incredible momentum these projects and initiatives have achieved.

Special thanks to Wim Leers (Acquia) and Gabe Sullice (Acquia) for contributions to this blog post and to Mark Winberry (Acquia) and Jeff Beeman (Acquia) for their feedback during the writing process.

Jul 19 2018
Jul 19

Day three

Today, my friends, we’re going to Change the World...

Rachel Lawson presented day three’s keynote. It was a really good session as it showed how everyone who attended, has contributed in some way to Drupal, as well as how “Drupal changes the world”. It started by “Meeting Sami”, a 10-year-old boy from Mosul, Iraq, who was captured (along with his brother) by ISIS. He was held captive for three and a half years, after which he was sent to a refugee camp. While in the camp, it was the Warchild charity that provided support, activities, education, and most importantly, ended up reuniting Sami and his brother with his family.

Now, you’re probably wondering what any of this has to do with Drupal? I know, I also did, but it became apparent that Warchild recently switched to using Drupal, making use of several modules. Rachel asked the audience to stand up, if they had made a contribution to modules used by Warchild, including paragraph and media. Almost half the room did, but I didn’t. She then went on to ask about other contributions that people in the audience had made. This time, it related to anything from documentation, to hosting meetups, and even attending camps.

By the end of the session, everyone in the room was standing, including me. It felt good to know that I had contributed in some way. During the question and answer session, the issue of becoming a member of the Drupal Association was raised, as well as the importance of doing so. Membership empowers the Drupal community to be able to do more things that are requested by users, which in turn makes a transformational difference.


Rachel Lawson presenting her session

“If you don’t push yourself and just go with things, then you’ll never get the amazing things.” - Rachel Lawson

Watch session

Drupal 9: Decoupled by design?

Both Preston So and Lauri Eskola gave a session on decoupling Drupal, as well as the direction in which it is going. Anyone who has been working with Drupal should know that the idea of decoupling Drupal has been around for some time. Among the reasons for doing this, is that developers are free to choose any technology they want for the frontend. It’s clear that Drupal 9 will continue to use Twig, but with support client-side rendering with an API first approach. Another point was that editors prefer the non-decoupled approach, which raises the questions, “Who is requesting this? Is it the clients or developers?”

Watch session

The future of Drupal in numbers

One of the most interesting and debatable sessions I attended was presented by Nemanja Drobnjak. Similar to the first keynote session, this session was about comparing Drupal from 18 months ago, with its current state. This presentation could have been perceived as very pessimistic, especially when seeing the numbers compared to other major CMS’s like WordPress. He also referred to the compare PHP frameworks blog.

All the data in the presentation had clearly been researched, so it was rather shocking to hear Nemanja predict that Drupal could go out of use within 15 years if the current trends continue. A few suggestions to prevent this were made. From improving documentation to Drupal directly targeting the education sector. This session drew a lot of questions. Firstly, “Why compare Drupal to Wordpress?”. I agree completely. It's about who is using it and benefiting from it. It reminded me of the blog post I read in which Vue.js passed React.js in the number of people who have 'starred' it on Github. Basically, it doesn’t mean that React is dying and Vue is now the norm. Both have different purposes and uses, just like, for example, Drupal and Wordpress.

Another question raised was, with Decoupled sites becoming more popular, “Can a crawler detect the backend?”. Maybe the data wasn't 100% correct.

Day four

An update on Drupal 8.6

The day four keynote session was presented by Gábor Hojtsy, who gave a short speech about the upcoming Drupal update. He then moved onto how we could help with several initiatives, both at Drupal Dev Days and in general, including helping with Admin UI and documentation.

Watch session

Contribute, contribute, contribute! Yes!!!

Having put my Windows issues on the back burner, it was time to get the admin UI demo to work. I went over to the Admin UI innovation table where I met Lauri Eskola, Daniel Wehner, and Volker Killesreiter, all of whom helped me try to get the site working. Turns out it was because of an outdated module, so I updated the module, created a pull request and boom, my first ever contribution to Drupal was made. I then spent the rest of the day looking at the code and getting to grips with how it worked.

I was then assigned my first issue, which took some time to complete as I was still getting used to the code base. But nonetheless, I was able to fix the issue and contribute some more to the initiative. I really like how everything is broken into small issues, meaning that a single person isn't completing a large issue by themselves. It is clear that Drupal can only be maintained if people contribute back to the project and/or community.

It is never too late to contribute! Even though Drupal has been around for almost 20 years, it still relies heavily on people to contribute and come up with innovative ideas. If you are looking to contribute, but don’t know how I can suggest you take a look at the Drupal development and strategic initiatives.

Having heard the word “contribute” several times, it would have been great to hear someone repeatedly say the word, as Steve Balmer did - "developers".

Day five

Quo Vadis, Free Software?

The final keynote session, by Rui Seabra, was about free software. He shared thoughts on how we should have the freedom to run software as we wish, make changes to the software to make it fit for your purpose, and distribute both the original and modified version. It was clear that as users of so-called “free software”, we have a misconception about what we think is free. Rui also went on to talk about how we can help protect the internet, especially from the EU’s copyright directive. I did find the joke about the “[fill in] sucks” reference to Windows, very amusing.

Rui Seabra presenting his session

Free software is everywhere, and people are forgetting that the freedom of sharing is a quintessential part of the evolution and moving forward together. “If we didn't share we wouldn't have knowledge, technology, and hardware we use today.” - Rui Seabra

Watch session

Progressive decoupling - the why and the how

The final session I attended was my colleague Blazej Owczarczyk’s talk, where he explained everything about progressive decoupling. One of his key points was that you should only decouple where it makes sense. Blazej showed some cool and interesting new features available in EcmaScript 6/7. We also learnt about the new await/async function in EcmaScript 8, which I found to very cool and cannot wait to start using. It was then time to move on and discuss how we could use these new features in our current Drupal sites.

By installing dependencies, defining a dynamic library and running a web server, you are able to create a decoupled environment for any technology of your choice. Two things I really liked about the session was 1) Blazej asking the audience to tweet a thanks to our very own Philipp Melab for the GraphQL module, and 2) the bonus question, which resulted in more questions from the audience. Way to go Blazej, we’re very proud of you here at Amazee Labs.

Blazej Owczarczyk presenting his session
 

Watch session

The rest of the day I spent contributing more to the Admin UI initiative.

Many thanks

I would like to take this opportunity to thank:

Ruben Teijeiro for being so helpful throughout the week and introducing me to several people.

Christophe Jossart for not only helping me with my installation issue but for being great company and showing me around Lisbon.

Lauri Eskola, Daniel Wehner, and Volker Killesreiter for the introduction to Admin UI, which helped me find the issue as to why I couldn’t set up the site on my machine and finally allowing me to help contribute to the great initiative.

Finally, to all the sponsors, speakers, organiser, and volunteers, a huge thank you for a spectacular week, great evening social events, and for making my first ever Dev Days an amazing one. I hope to see you all at the next one.

Links

Jul 18 2018
Jul 18

Selecting a CMS for a university can be a challenging decision. There are so many needs and nuances to consider - costs of implementation and maintenance, a wide-range of technical ability among site administrators, developers and content editors, a variety of end users looking for different information and the list goes on and on. While your answer likely isn’t as easy as, “let’s just do what everyone else is doing,” by better understanding why other universities made the choice they did can shed light into your decision-making process. 

Drupal is far and above the most used CMS in higher education - 26% of all .edu domain sites are in Drupal, including 71 of the top 100 universities. 

So why are universities like MIT, Georgia Tech, Louisiana State University, Butler, Stanford, Harvard and the rest of the Ivy League universities choosing Drupal? 

Simply put, Drupal makes good business sense, especially with the added benefits of Drupal 8. At Mediacurrent, we believe your website is your greatest digital asset and can be leveraged to accomplish organizational-wide goals. Drupal makes that possible. Here’s how:  

Communicate With All Students - Prospective, Current, and Alumni 

If you want to reach your full recruiting and fundraising potential, you need to communicate with your entire audience. There are a variety of Drupal features that ease the stress of common communication challenges. 

Language:  Not only are their multiple languages spoken within the U.S., but our country hosts over a million international students. Drupal makes creating a multilingual digital experience simpler. Native language handling is built directly into Drupal 8’s core APIs, giving you over 100 languages to choose from. With that functionality it is easier than ever to engage with prospective students across the globe in a meaningful way.

Accessibility: The CDC estimates that 20% of U.S. adults identify as having a disability. These disabilities often hinder people’s ability to interact with the average website. Drupal is an inclusive community and has committed to ensuring that all features of Drupal conform with w3C and WCAG 2.0. Pair that with a strong higher-education focused accessibility strategy and your potential audience could grow by 20%. 

Technology: According to the 2017 College Explorer Market Research Study, the average college student owns 5.6 devices and spends 137+ hours on them! This may seem like common sense now, but if you want to engage with students, you need to account for a variety of screen sizes. Thankfully, Drupal 8 is designed with a mobile-first mentality and includes out-of-the-box responsive functionality. 

Personalization: Universities face added complexity when it comes to digital strategy due to the broad audiences they appeal to. With so many unique people coming to the same pages, content strategy, conversion path mapping and optimization, and defining strong call to actions can be a struggle. By incorporating personalization into your content strategy, whether that is personalized based on user authentication or by integrating tools like Acquia Lift or Salesforce Marketing Cloud, you can speak to the masses but make them feel like you’re speaking specifically to them. 

Reduce Overhead Costs + Increase Operational Efficiencies with Drupal

Drupal can have a dramatic impact on reducing overhead costs and increasing operational efficiency. Universities have a big need for multiple websites: departments, colleges, libraries, and student organizations all want their own website. The direct cost of supporting this many sites along with resourcing the training and support is expensive and encourages unnecessary technology sprawl. As an open source technology (no licensing fees!) along with the multisite feature, creating sites for these different groups is exponentially easier, more cost effective, and ensures brand consistency. 

You can also increase efficiency, ensure content consistency and improve the user experience by creating a “source of truth”.

Write content once and publish it anywhere it’s relevant.

Having to update content such as curriculum or an academic calendar on multiple pages is inefficient and unnecessary. Write once, publish everywhere, save time. 

Improve Brand Equity + Amplify Digital Strategy

As a university, your brand is a powerful asset. You spend significant energy and resources on building loyalty to bolster several organizational goals from recruiting efforts, engaging current students on campus and fundraising among alumni.

With your website being the hub of your marketing strategy, it is critical for your CMS of choice to play nice with your marketing efforts.

Drupal happens to be very SEO friendly out of the box, but there are also advanced configuration options available to support a more sophisticated SEO strategy. You can amplify your digital strategy by integrating your marketing tools and communication platforms directly with Drupal. And the 26% percent of other .edu sites using Drupal make integrating your university-specific tools to your website easier. 

Reduce Risk

I’d be remiss without mentioning security and GDPR compliance. As a university, you hold sensitive information about the students who have attended your school and they are trusting you to keep that secure.

The Drupal community is passionate about security and has an industry leading global security team to ensure your site is protected.

Additionally, as the landscape of privacy rights changes around the world (most recently, GDPR), it’s in your best interest to stay on top of it and reduce the risk of being penalized for data collection practices. 

Have questions about how Drupal can benefit your university? Let us know. We’d be happy to chat. 

Jul 18 2018
Jul 18

by David Snopek on July 18, 2018 - 2:42pm

As you may know, Drupal 6 has reached End-of-Life (EOL) which means the Drupal Security Team is no longer doing Security Advisories or working on security patches for Drupal 6 core or contrib modules - but the Drupal 6 LTS vendors are and we're one of them!

Today, there is a Moderately Critical security release for the XML sitemap module (version 6.x-2.x only) to fix an Information Disclosure vulnerability.

The XML sitemap module enables you to generate XML sitemaps and it helps search engines to more intelligently crawl a website and keep their results up to date.

The module doesn't sufficiently handle access rights under the scenario of updating contents from cron execution.

See the security advisory for Drupal 7 for more information.

Here you can download the Drupal 6 patch.

If you have a Drupal 6 site using the XML sitemap module, we recommend you update immediately! We have already deployed the patch for all of our Drupal 6 Long-Term Support clients. :-)

If you'd like all your Drupal 6 modules to receive security updates and have the fixes deployed the same day they're released, please check out our D6LTS plans.

Note: if you use the myDropWizard module (totally free!), you'll be alerted to these and any future security updates, and will be able to use drush to install them (even though they won't necessarily have a release on Drupal.org).

Jul 18 2018
Jay
Jul 18

drupal 8 logo featured alongside drupal logos showing the growth of Drupal

Now that Drupal 8 has gained some momentum, it is time to start planning out your upgrade strategy. You want to upgrade to get the latest benefits and take advantage of the future stability that comes with the direction that Drupal will be taking from here on out. Before upgrading you will want to consider some things about what your current site has. In this article we will be covering some of those questions with some context to assist in the decision making process. Let’s determine if you website is adequately serving the current needs of your business and which content will need to be brought over to the new Drupal 8 site. There may be a difficulty in the switch, but being prepared will put you in position to handle whatever comes up.

So, you have a nice Drupal 7 site that's been running happily for years, and maybe you're thinking it's time to upgrade – or, if you haven't given it much thought yet, there's certainly plenty of reasons to do so now. But, Drupal 8 is a pretty big step forward from Drupal 7. What exactly is an upgrade going to entail? What do you need to consider before you do so? We've upgraded numerous sites now, and today I'd like to go over a few things that I think are important to know before starting on such a project.

Before You Start

Just because you've decided to upgrade, doesn't mean that you can do it right away and be done with it by dinner. Unfortunately, there isn't any one-click solution to take your site from Drupal 7 to Drupal 8 (although future upgrades should be closer to reaching that level of simplicity). Here are a few things to consider before you touch the first line of code or content:

Do you still want the same site? Doing a large upgrade such as this is an excellent time to re-evaluate your site's functionality and appearance. Now that you've had it for some time, is there anything you want to change? Any new features you want to add that maybe weren't feasible before because of how the old site was built? Although upgrading can be done in such a way that everything stays almost exactly the same for your site's visitors, it's good to at least consider what potential improvements you could make, perhaps by leveraging some of Drupal 8's great new features. Maybe your site just needs a facelift, or has some long-standing bugs you want to fix, or you want to take advantage of new CSS or JavaScript technologies which weren't available when you first built the site. Upgrading is the perfect time to take a fresh look at things.

How are you migrating? One critical part of most upgrades is to migrate content and user information from the old site to the new one. Databases for Drupal 8 are structured differently than they were in Drupal 7, which means that to upgrade the site you can't just swap out the code while keeping the same database… you have to actually move the content into a new database as well and adjust it to fit Drupal 8's slightly different structure. This is a pretty big departure from how Drupal upgrades worked in the past.

There are two main ways to do this migration. Drupal 8 includes a Migrate API, which is perfect for some simple sites. However, not all contributed modules have the plugins necessary to migrate their data in this way, and any data you might be storing in some customized way certainly doesn't. Although it is possible to write your own plugins, in our experience it's easier to take a different approach by writing an entirely custom migration. This does however require having some more familiarity with Drupal coding than the Migrate API route does. Generally, what a custom migration involves is writing a script and appropriate queries to first retrieve your information from the old database, and then to write it to the new Drupal 8 database in the appropriate format.

Do you know enough Drupal 8? If your site is mostly built using core and contributed modules and themes, you'll probably be good to go. Drupal 8's admin UI does have some changes from Drupal 7's, but none of them are very difficult to get used to and most introduce new ways to navigate and improve your site. However, if your site uses much in the way of custom modules or if it has a custom theme, then before upgrading you should make sure your developers and themers are familiar with Drupal 8, perhaps by working on some other simple Drupal 8 project first or by getting some training on the changes, either in-person or through an online course. The changes in how you code custom modules and themes in Drupal 8 are significant, so they may take some getting used to, but ultimately they are the foundation of what makes Drupal 8 leaps and bounds better than its predecessor. Knowing how to use them effectively is key to having a Drupal 8 site that continues to be maintainable for years to come.

Still Not Sure You're Ready to Upgrade?  Learn more about the benefits and our upgrade process. 

What to Expect

Alright, so you've gotten everything figured out. All that's left to do now is to, well, actually upgrade the site. Here are a couple of things you should plan for when starting most any upgrade.

Expect to have a few difficulties: Even if the upgrade seems like it will be a simple one, you should go into it expecting to have a few unexpected challenges come up, because they almost certainly will. Maybe it's one particular type of field that doesn't have the same settings in 8 as it does in 7. Maybe it's a combination of contrib modules which used to work together one way and don't anymore (one example: The Context module can no longer be used in conjunction with Metatags to set metadata in contextual circumstances). Maybe it's that your site uses a lot of different webforms, and although the submission data can get migrated without too much trouble, recreating the forms themselves can't be done automatically. 

Regardless of what it ends up being, plan to have some unexpected difficulties during the upgrade. In my experience, these challenges tend to be fairly easy to fix or work around through some combination of contributed modules and custom code, so although they can add some complexity to the upgrade it's rare to find a dealbreaker so late in the process.

Expect to have two sites for a little while: Your new Drupal 8 site is completely separate from your old Drupal 7 site, and that means that it needs to be installed somewhere other than where your old site is, and it probably has to have its own domain so you can access it during the upgrade process. You'll be able to keep your old domain though - once the upgrade is done and your Drupal 8 site is ready to go, all you should have to do is change your main domain's settings to point to the new website rather than the old one.

When you first start the upgrade, your Drupal 8 site is likely to be almost empty. If you have lots of custom modules to recreate or anything and the migration itself isn't done yet, then maybe it has some placeholder content to start with. Then, once the migration is done, all the relevant content from the old site gets migrated into the new one. At this point, your content and user information is being stored in both sites. It also means that, from now until the new version of the site launches, any changes you make to the content of the old site won't be automatically reflected in the new site and will be lost when you deploy the upgrade. For many sites, this problem can be mitigated by having a period of time in which changes get made to both sites, instead of just to one of them.

Still, it isn't ideal to have to enter new content twice for an extended period of time, so to solve this, one thing we like to do is to actually have two migrations. The first migration happens early on in the development of the Drupal 8 site, and we use the content from that migration while finishing most of the upgrade. Then, shortly before the upgrade goes live, we do a "final migration" to get any changes which have been made on the Drupal 7 site since the original migration. If all goes well, this results in only a day or two (or zero!) during which changes have to be made in both sites.

Once the upgrade is finished and your domain name settings adjusted so that the new site is live, it's worthwhile to do one last check of the old site to see if there are any recent changes or user registrations that may have been missed. Depending on how your migration script works, these could be migrated again with that, or they could be replicated manually. Once that's done though, huzzah! Your newly upgraded Drupal 8 site is finally ready for the world to see.

 Offer for a free consultation with an Ashday expert

Jul 18 2018
Jul 18

Drupal.org has been in existence since 2001. That's a long time for a website to serve an ever changing community! We're doing this work thanks to the support of our members, supporters, and partners. As time goes on needs change, technology evolves, and features are deployed to improve the experiences of site visitors.

As a web professional, you know how delivering small feature requests can have a big impact. To ensure people take notice of the improvements the Engineering Team makes on all of the *Drupal.org sites, we share frequent updates with the community. You can read a monthly what's new on Drupal.org blog, watch for change notifications, and follow on Twitter to know what's on the horizon.

Recently, these improvements were deployed:

  • More maintainers can now grant issue credit

  • Security Advisory nodes are now included in the /news feed

  • Project page screenshots will display in a lightbox

  • DrupalCI.yml Documented

We'll continue to make Drupal.org better every day, with your help. Find out more about what we do and become a member today. Thank you!

Twitter logo Follow Drupal.org on Twitter: news and updates, infrastructure announcements, commits (and deployments).

Jul 18 2018
Jul 18

Each Drupal release makes it more refined and up-to-date. The latest one offers better architecture, fresh functionality, improved security and other benefits of Drupal 8. It is considered to be innovative and progressive due to new functions such as multilingual applications, advanced mobile-friendly options or HTML5 for better site management.

Drupal 8 modules are an integral part of website development. We constantly monitor newly released modules and describe their particulars, how they work and why they are useful. Previously we spoke about modules that will help you to architect your site, boost its functionality, personalize content and even run e-commerce. Now we’ve made a list of best Drupal 8 modules you should have on your Drupal site.

The most useful Drupal 8 Modules you should have

PathAuto

This module will automatically generate SEO optimized and user friendly URL aliases. It is applicable for both new and old URLs and suitable for many languages with transliteration available. However, the PathAuto Drupal 8 module won’t work without Token and Chaos Tool installation.

Admin Toolbar

The Admin toolbar Drupal 8 module provides the user with a drop-down admin menu that gives quick access to all administration pages. This makes navigation simple and less time-consuming.

Metatag

It is not only about creating meta description or keywords tags. The Metatag Drupal 8 module makes it possible for you to monitor what your content looks like when sharing on Facebook or Twitter. It provides support for Open Graph Protocol (for Facebook) and Twitter Cards (for Twitter) while sharing content via social media. This allows you to merge any webpage with social media and control its appearance.

Paragraphs

Paragraphs module is the most popular Drupal 8 module you should have for managing content. It is targeted at simplifying end-users’ performance while editing. It breaks content into components to structure it in a clean way and gives options for design or grouping.

Redirect

If you have your URL changed, this tool is for you. Redirect module will take the user to the necessary page if it has moved or the site was restructured or renamed.

Linkit

Linkit Drupal 8 module provides an automatic way to insert internal or external links in the text. No more copy-pasting or typing URLs, you can just search them via the interface.

Honeypot

The best and maybe the most popular Drupal 8 module you should have to prevent spam. It finds out bots and protects your forms from being autocompleted. Honeypot Drupal 8 module sets the minimum time required before form should be considered to have been entered by a human instead of a bot. If the form is submitted faster, it will be discarded.

Add to Any

One of the most popular social media integration modules in Drupal. Give your readers an opportunity to share your content via social media. The simple Add to Any Drupal 8 module enables you to attach share buttons to Facebook, Twitter, Google+, Pinterest, WhatsApp and more. You may choose the size and shape of buttons.

Superfish

Probably the most popular tool for creating sophisticated interactive menus on your website. Among its advantages are screen adaptability and compatibility. Superfish menus are both keyboard and touchscreen accessible and available for screen readers.

Scheduler

Thanks to Scheduler Drupal 8 module it is possible to postpone content publication. You are able to schedule publishing or unpublishing nodes. Just set a specific date that you want the action done.

Rabbit Hole

Don’t want your node to be viewed directly but have it displayed somewhere else? Rabbit Hole Drupal 8 module will do that for you. You’ll get the ability to control what is to be shown when content is being viewed on its own page. It makes it possible to display an access denied page or a page not found page. You may also redirect a page or as a regular behavior display the entity. Restricting access to the publication, it hides nodes from search engines too.

LoginRadius Customer Identity and Access Management

Simplify the registration form for your Drupal website. LoginRadius Customer Identity and Access Management module allows your users to register via e-mail or social login. There is no need to overload visitors with filling in numerous form fields, no need to create one more username and password. Apart from user registration and social login, the module performs data collection and Sign-On authentification system letting user navigate websites with a single account.

Google analytics

Google analytics module is a must-have on your Drupal website. It is a great technique to track your site attendance. This module is perfect to monitor user statistics and understand user behaviour to make some marketing improvements.

These are only a small part of the Drupal 8 modules you should have on your Drupal website to extend its capability! Our team of developers will be happy to help you with installation and settings. If none of the modules fit your needs, we will develop a module that perfectly meet your requirements.

Jul 18 2018
Jul 18

At Droptica, remote work is something ordinary. From the very first day, we had two offices in Wrocław and Gdańsk. Recently, we also opened our third office in Rzeszów. Every day, developers, testers, graphic designers and other specialists work together in each of these locations. In addition, 90% of our clients come from abroad, like in the case of most software houses. Throughout several years, we have developed methods of effective and efficient cooperation in a dispersed team. We are constantly improving our work model, testing new tools and ways of working. In this article, you will learn how our system works today.

Project management support system

Since the beginning of Droptica’s existence, we have been using Redmine. Redmine had several add-ons, including Backlogs module supporting work in the Scrum model. These days, we are using Jira, since it works even better with Scrum. Both systems help us to control what is going on with the projects. Each of the projects is divided into sprints, and each sprint is divided further into specific tasks. All information about the realisation of every task is saved and stored in Jira. Our clients also have access to our Jira for full transparency. In our opinion, such a system is a necessity. Without it, it would be difficult, if not impossible, to control what is going on with the project, especially in the case of projects running for many months. E-mail communication is completely unsuitable for this purpose.

Two communication speeds

Project management support systems are very useful, but not sufficient for efficient implementation of the project. Members of the team must be able to communicate comfortably and quickly. If the team works in one office, it is enough to just talk to somebody and ask. In the case of a dispersed team, this issue becomes quite complex. Writing an e-mail or adding a ticket in Jira to ask a quick question takes time. Most often, you have to do the following:

  • open Jira;
  • find a project;
  • find the right task;
  • add a comment;
  • check in a while if there is an answer;

This process often takes far more time than simply asking the question and getting an answer, especially when it’s a “yes/no” type of question.  

At Droptica, we solve this problem by communicating using Slack. Thanks to this application, our distributed team works as if all the members were located in one office. We communicate quickly and efficiently. We eliminate unnecessary e-mails, phone calls and video conferences. The number of comments to tasks in Jira also goes way down – this is helpful because they often make it difficult to analyse the status of work on a given task. 

Slack at Droptica

We set up several channels for each project. Channels are used to eliminate as many notifications and as much communication via e-mails as possible and to split up messages thematically.

Most often, we set up the following chat channels:

  • projectname chat – a channel for internal communication regarding the project. This channel is used by the entire development team, as well as project support team (DevOps, testers, etc.);
  • projectname client - a channel available to the client and the development team. This channel is a place for communicating with the client, asking quick questions about tasks, setting up meeting dates, calls, etc;
  • channels with notifications from the systems used in connection with a given project, such as Jira, Jenkins, GitHub, Bitbucket, etc. Usually, each system gets its own channel. Every person can join channels that are important for them and eliminate notifications that are not important or redundant, for example, a graphic designer does not need to read GitHub notifications.

Before Slack, we used group chats on Skype, then we moved on to HipChat for a while. We found Slack to be the best solution that fits our needs perfectly and we do not plan to move to any other solution any time soon. It is also important that our clients often already use Slack, which makes it easy for them to join our channels as another organisation.

Other tools supporting remote working

Daily Scrum

There is no Scrum without Daily Scrum. In a dispersed team, it is necessary to conduct a video conference once a day. Sometimes such calls are also attended by the representative of the client, who is often hundreds or thousands of miles away from our offices. We conduct these meetings using several tools, depending on the preferences of the team or our client. Usually, we go for Google Hangouts Meet, but sometimes we resort to Zoom.us and Skype For Business.

Scrum Retrospective

For this purpose, we use a simple Google Docs sheet. We have a sheet with the following columns:

  • drop - what we should stop doing if it's possible;
  • keep - what is good and what we should keep doing;
  • improve - what needs to be improved;
  • add - what we need to add in order to better carry out the work on the project.

The worksheet contains a history of all retrospectives in the form that is easy to view and edit. The document is available to all team members, regardless of their location. This is working very well for us.

Code review

We review the code on GitHub or Bitbucket, depending on the project. These systems allow to easily browse the code and add comments to selected script lines. There is no need for one person to come to the other person's desk to view the quality of the code.

We also have several internal tools and scripts for automating tests that support Drupal development.

Good remote working practices

In my opinion, it is not possible to rely only on communication via e-mail or Jira. Video conferences and telephone calls are necessary to better understand each other. This greatly improves communication within the development team and between the client and the team. One could say that working according to the Scrum methodology forces us to do so. Every day, we carry out Daily Scrum in the form of a video chat. We also often have video calls with customers, for example during the Sprint Review or during the Backlog Refinement. Every once in a while, we also meet with the client at our office or we pay them a visit.

It is also important for the communication process to work in a way that does not disturb others too often. Slack is a very useful tool, but it can also lead to too many unnecessary messages, which can be distracting and interrupt work. The team should be aware of this and use Slack only when necessary and send messages only to those who need them. We try to never involve people whose presence is not necessary in a given case.

Is remote working better than working in one office?

Having the entire team working in one office certainly makes communication much easier. However, it also has its drawbacks – for example, it makes it much easier to disturb somebody while working with unnecessary discussions. Sometimes this can reduce productivity.

At Droptica we combine remote work with office work, which enables us to take advantage of both models. If necessary, we build teams working at just one office.
More than one location gives us a competitive advantage because we have access to more specialists from three cities and their general areas. This allows us to build great development teams for our clients.

The fact that Droptica has multiple offices also forces all of our team members to learn how to work remotely. That’s why all of our experts know how to work with a remote client right away.

Summary

At Droptica, we developed a remote working system that works very well for us. I think that such a model is by no means worse than working in one office, additionally, it also offers many benefits. If you are looking for a team of Drupal, PHP, Symfony or ReactJS experts, we will be happy to assist you and show you that communication with a remote team can also be great.

Jul 18 2018
Jul 18

Droptica helps clients from all over the world to complete and implement their projects. Each of these clients has already developed their way of working. Everyone is different. In this article, I have collected the most common ways and systems of cooperation between Droptica and our clients.

Why do we work a little differently with every client?

We are Agile. We always want to maximise the results of our work, so our development team always adjusts and adapts their way of working to the client’s needs.
The elements that are adapted and changed the most often include:

  • project implementation methods (SCRUM, Kanban, etc.);
  • number of people in the team;
  • roles in the team (backend developers, frontend developers, QA, UX/UI, etc.);
  • the method of communication; Tools: JIRA, Slack, telephone or video calls, meetings;
  • frequency of communications;
  • communication channels (who, with whom);
  • implementation standards (some clients consider application performance to be the most important, others focus on implementing and providing new functionalities on a regular basis, while another group focuses on aesthetics and want their application to look good).

On the basis of these factors, I have identified several models of cooperation with clients, which are used the most often at Droptica.

Model 1: Product Owner at the client, with the rest of the team at Droptica

This is probably the most popular model employed at Droptica. We use it mainly when the end client comes to us. In most cases, the client already has a web system based on Drupal, Symfony or React and needs developers to develop the system further. Product Owner has a vision of application development and looks for a team that can efficiently perform the envisioned tasks.

In this model, we have a great impact on the development of the system. Our team not only performs assigned programming tasks but also proposes directions of development of the system and suggests improvements. In addition to developing basic functionalities, we also design user interfaces (UX/UI) and often carry out A/B tests that show us the best solutions for the client.

We use this model to develop WydawnictwoWAM.pl website. This is what the client has to say about us and about working in this model: 

"We established cooperation with Droptica around two years ago to develop our online store available at http://www.wydawnictwowam.pl. Both the quality of all the works carried out, as well as our cooperation were stellar. The technical solutions suggested and implemented by Droptica were a great help and often improved the value of our system, often exceeding our initial expectations. Cooperation with Droptica is characterised by very friendly, direct and precise communication on their part. Thanks to that, we were – and constantly are – able to define and detail all the tasks related to the development of our sales platform. We also appreciate their very clear settlement system, which allows us to better plan and allocate funds for development. In other words, we definitely recommend working with Droptica".

Model 2: Product Owner, QA, PM on the client’s side, software developers provided by Droptica

In this model, we provide our customers with solid development support. Most of the project planning and management process is carried out by the client, while our experts carry out specific development tasks.
It is a kind of cooperation that we usually go for with large companies and corporations, expanding their Drupal, PHP and ReactJS teams.
As a rule, in such a model we work on servers and project management systems provided by the client. We adapt to their processes.

Mixed models

Other models are usually combinations of the two models presented above. For example, Droptica provides not only developers but also testers, while the entire project is managed by the client. We also sometimes work on projects where we collaborate with other software developers from the client's company, working not as an independent development team, but a part of a larger team.

We are Agile

We are flexible regarding the form of cooperation with our clients; however, we like the first model the most. In that model, we take on a great deal of responsibility for the project and we are able to influence the direction of development together with the client. This gives us great satisfaction, and we offer numerous ideas for improving the system, which allows our clients to better achieve their business goals.

Would you like to learn more about our work models? Contact us at [email protected] and we'll be happy to talk to you.
 

 

Jul 18 2018
Jul 18

In a previous blog post, I wrote that Dries asked for help in continuing the development of the Values & Principles and that a Values & Principles Committee will be formed to facilitate this. Well, we are at the point where we can explain how the committee will be formed, its purpose and how it will achieve its goals.

Purpose

The Values & Principles Committee will exist to focus on specific Values & Principles to see where continual improvements can be made and to propose those to the Project Lead for approval. For example, in meetings at DrupalCon Nashville, Dries expressed a desire to focus on Principle 8: “Every person is welcome; every behavior is not” because it is both critically important, in need of work, and requires more input.

Formation

To learn more about how the Values and Principle Committee will work, please read the charter, which is attached.

We have been giving thought to how we can facilitate a better, more open, process for appointing members to this Committee and we have come up with the following:

We will be posting role descriptions for the volunteer committee roles on jobs.drupal.org. The Values & Principles Committee Member voluntary role description will describe the:

  • Expectations of the role

  • The specific jobs the role will require

  • An indication of the time commitment of the role

  • The attributes that would be expected of a successful candidate

  • How to apply

The Committee Member role will be advertised from today until 3 August 2018 at https://jobs.drupal.org/drupal-community/job/15126 and then I will take the applications to Dries Buytaert and Megan Sanicki to select candidates based on the membership requirements outlined in the charter and role description.

This work matters to them personally and through their roles:  Dries as Drupal Project Lead and Megan as Drupal Association Executive Director. In addition to their different experiences and perspectives, they bring a wealth of experience in enterprise leadership, organizational culture and community building.  They hope to assemble a group that is inspired by this work, diverse, and representative of the values and principles we hope to inspire in the community. After the initial membership is selected, the membership will help recruit new members going forward.

Once the committee is selected, it can then begin work, in consultation with subject matter experts, on updating the values and principles.

My call to action for you is to consider whether volunteering as a Member of this Values & Principles Committee is a way that you can contribute to the Drupal Community and, if so, to submit your application.

I’m really keen to ensure that the Values & Principles Committee has membership from many places, with a diverse background and representing many a wide understanding of what makes Drupal - Drupal. It is even baked into the Values & Principles Committee Charter, attached.

Jul 18 2018
Jul 18

Let's say that it's a WhatsApp-like, a decoupled, Drupal 8-backed, real-time chat platform that you're building. One using Node.js. In this case, implementing field autocomplete functionality becomes a must, doesn't it? But how do you add autocomplete to text fields in Drupal 8?

Needless to add that such otherwise "basic" functionality — implemented on fields such as node reference and user/tags — would instantly:
 

  1. improve the user experience 
  2. increase the level of user interactivity and engagement
     

Users would group around different "channels" and be able to easily add new members. The auto-complete text fields will make the whole “new member coopting” process conveniently easy:

Users would only need to start typing and an array of name suggestions (of the already existing team members) would spring up.

But let's see, specifically, what are the steps to take to implement autocomplete functionality in Drupal 8:
 

1. The Drupal Autocomplete Form Element: Adding Properties to the Text Field

The first basic step to take is to define your form element. The one that will enable your app's users, on the front-end, to select from the suggested team members' names. For this:
 

  1. navigate to “Form” (you'll find it under “Entity”)
  2. scroll the menu down to ”NewChannelForm.php”
     

Note: using “#autocomplete_route_name element” when defining your form element will let Drupal know that it should ignore your form element on the front-end.

And now, let's go ahead and assign specific properties to your form's text field! For this:
 

  1. define “#autocomplete_route_name”, so that the autocomplete JavaScript library uses the route name of callback URL
  2. define “#autocomplete_route_parameters”, so that an array of arguments gets passed to autocomplete handler
     
$form['name'] = array(
    '#type' => 'textfield',
    '#autocomplete_route_name' => 'my_module.autocomplete',
    '#autocomplete_route_parameters' => array('field_name' => 'name', 'count' => 5),
);


And this is how you add #autocomplete callback to your fill-in form's text field in Drupal 8!

Note: in certain cases — where you have additional data and or different response in JSON —  the core-provided routes might just not be enough. Then, you'll need to write an autocomplete callback using the “my_module. autocomplete“ route and the proper arguments (“name” for the field name and “5” as count, let's say).

And here's specifically how you write a custom route:
 

2. Add Autocomplete to Text Fields in Drupal 8: Define a Custom Route

How? By simply adding the reference to the route — where data will get retrieved from — to your “my_module.routing.yml file”:
 

my_module.autocomplete: path: '/my-module-autocomplete/{field_name}/{count}' defaults: _controller: '\Drupal\my_module\Controller\AutocompleteController::handleAutocomplete' _format: json requirements: _access: 'TRUE' 


Note: remember to use the same names in the curly braces (those that you inserted when you defined your “autocomplete_route_parameters”) when you pass parameters to the controller!
 

3. Add Controller with Custom Query Parameters

In the custom route that you will have defined, you'll have a custom controller AutocompleteController, with the handleAutocomplete method.
 
Well, it's precisely this method that makes sure that the proper data gets collected and properly formatted once served.

But let's delve deeper into details and see how precisely we can generate the specific JSON response for our text field element.

For this, we'll need to:
 

  • set up a AutoCompleteController class file under “my_module>src>Controller > AutocompleteController.php"
     
  • then, extend the ControllerBase class and set up our handle method (the one “responsible” for displaying the proper results)
     
  • it's the Request object and those arguments that you will have already defined in your routing.yml.file (“name” for the field name and “5” for the count, remember?) that will pass for your handler's parameters
     
  • the Request object will be the one returning the typed string from URL, whereas the “field_name” and the “count” route parameters will be the ones providing the results array.
     

Note: once you get to this step here, as you add autocomplete to text fields in Drupal 8, remember that you should be having data in “value” and“label” key-value, as well:

Next, you'll set up a new JsonResponse object and pass $results, thus generating a return JsonResponse.
 

Summing Up

That's pretty much all the “hocus pocus” that you need to do to add autocomplete to text fields in Drupal 8. Now the proper data results should be generated.

Just reload your app's form page and run a quick test:

Try to create a brand new channel in your app and to add some of the already existing team members.

Does the text field have autocomplete functionality added to?

Jul 18 2018
Ana
Jul 18

We've made a list of Drupal camps and summits that you can attend in the third quarter of the year. Drupal events are bringing together Drupal developers, site builders, themers, end users and those interested in learning more about Drupal. We are attending Drupal events because of sessions and collaborative discussions.

DrupalCamp LA 2018

The United States, Irvine, CA
School of Engineering of the University of California
21-22. July 2018

DrupalCamp LA is an unconference-style Drupal training. They are planning to have 5 sessions proposed by community volunteers and BoFs. Sessions are chosen by members attending the DrupalCamp LA.

http://2018.drupalcampla.com/

 

Drupal Camp Costa Rica

Drupal Camp Costa Rica 2018

Costa Rica, Liberia
Universidad de Costa Rica
3-4. August 2018

Keynote speakers are Priscila Chaves, Social innovator and entrepreneur, and Alonso Casto, Director of CI of the UCR. Other than that, there will be plenty of sessions for you to attend. 

http://www.drupalcamp.cr/

 

Drupal Camp Colorado

DrupalCamp Colorado 2018

United States, Denver, CO
Auraria Campus
3-5. August 2018

Keynote speaker on DrupalCamp Colorado this year is Preston So, Director of Research and Innovation at Acquia. Other than that, there will be a lot of sessions for you to listen to, and on the last day, you can join sprints as well. 

https://2018.drupalcampcolorado.org/

 

Drupal North

Drupal North Regional Summit - Toronto 2018

Canada, Toronto, ON
Toronto Reference Library
10-12. August 2018

Drupal North is a 3-day conference with interesting Drupal training on the first and a lot of sessions and sprints on the last day. 

http://drupalnorth.org/

 

Decoupled Drupal Days

Decoupled Drupal Days 2018

United States, New York, NY
John Jay College of Criminal Justice
17-19. August 2018

It’s a conference for architects, developers, and businesspeople involved in implementing decoupled Drupal architectures. There will be three tracks for sessions: Drupal, JavaScript and Future.

https://2018.decoupleddays.com/

 

Drupal GovCon

Drupal GovCon 2018

The United States, Washington, DC
National Institutes of Health, Natcher Conference Center
22-24. August 2018

Drupal GovCon brings together people who use, develop, design, and support the Drupal platform with a focus in government. There will be so many session tracks, that there is no doubt you wouldn’t find something for you and learn a lot of things. 

https://www.drupalgovcon.org/

 

Midwest Drupal summit

Midwest Drupal Summit 2018

United States, Ann Arbor, MI
University of Michigan campus
24-26. August 2018

Midwest Drupal Summit is three days of code sprints, working on issues such as porting modules and writing, updating documentation and informal presentations.

https://groups.drupal.org/node/519274

 

Drupal Europe

Drupal Europe 2018

Germany, Darmstadt
Darmstadtium
10-14. September 2018

This is the biggest Drupal event in Europe. Eleven industry tracks are focused on real-life case studies and success stories alongside emerging new best practices.

https://www.drupaleurope.org/

 

Drupal Corn Camp

DrupalCorn Camp 2018

United States, Des Moines, IA
Center for Higher Education
27-30. September 2018

This DrupalCorn Camp is 6th in a row. The first day is full of training opportunities, second and third day are full of interesting sessions and the last day is reserved for sprinting.  

http://2018.drupalcorn.org/

Jul 18 2018
Ana
Jul 18

We've made a list of Drupal camps and summits that you can attend in the third quarter of the year. Drupal events are bringing together Drupal developers, site builders, themers, end users and those interested in learning more about Drupal. We are attending Drupal events because of sessions and collaborative discussions.

DrupalCamp LA 2018

The United States, Irvine, CA
School of Engineering of the University of California
21-22. July 2018

DrupalCamp LA is an unconference-style Drupal training. They are planning to have 5 sessions proposed by community volunteers and BoFs. Sessions are chosen by members attending the DrupalCamp LA.

http://2018.drupalcampla.com/

 

Drupal Camp Costa Rica

Drupal Camp Costa Rica 2018

Costa Rica, Liberia
Universidad de Costa Rica
3-4. August 2018

Keynote speakers are Priscila Chaves, Social innovator and entrepreneur, and Alonso Casto, Director of CI of the UCR. Other than that, there will be plenty of sessions for you to attend. 

http://www.drupalcamp.cr/

 

Drupal Camp Colorado

DrupalCamp Colorado 2018

United States, Denver, CO
Auraria Campus
3-5. August 2018

Keynote speaker on DrupalCamp Colorado this year is Preston So, Director of Research and Innovation at Acquia. Other than that, there will be a lot of sessions for you to listen to, and on the last day, you can join sprints as well. 

https://2018.drupalcampcolorado.org/

 

Drupal North

Drupal North Regional Summit - Toronto 2018

Canada, Toronto, ON
Toronto Reference Library
10-12. August 2018

Drupal North is a 3-day conference with interesting Drupal training on the first and a lot of sessions and sprints on the last day. 

http://drupalnorth.org/

 

Decoupled Drupal Days

Decoupled Drupal Days 2018

United States, New York, NY
John Jay College of Criminal Justice
17-19. August 2018

It’s a conference for architects, developers, and businesspeople involved in implementing decoupled Drupal architectures. There will be three tracks for sessions: Drupal, JavaScript and Future.

https://2018.decoupleddays.com/

 

Drupal GovCon

Drupal GovCon 2018

The United States, Washington, DC
National Institutes of Health, Natcher Conference Center
22-24. August 2018

Drupal GovCon brings together people who use, develop, design, and support the Drupal platform with a focus in government. There will be so many session tracks, that there is no doubt you wouldn’t find something for you and learn a lot of things. 

https://www.drupalgovcon.org/

 

Midwest Drupal summit

Midwest Drupal Summit 2018

United States, Ann Arbor, MI
University of Michigan campus
24-26. August 2018

Midwest Drupal Summit is three days of code sprints, working on issues such as porting modules and writing, updating documentation and informal presentations.

https://groups.drupal.org/node/519274

 

Drupal Europe

Drupal Europe 2018

Germany, Darmstadt
Darmstadtium
10-14. September 2018

This is the biggest Drupal event in Europe. Eleven industry tracks are focused on real-life case studies and success stories alongside emerging new best practices.

https://www.drupaleurope.org/

 

Drupal Corn Camp

DrupalCorn Camp 2018

United States, Des Moines, IA
Center for Higher Education
27-30. September 2018

This DrupalCorn Camp is 6th in a row. The first day is full of training opportunities, second and third day are full of interesting sessions and the last day is reserved for sprinting.  

http://2018.drupalcorn.org/

Jul 17 2018
Jul 17

To the future or to the past, to a time when thought is free, to the next time when I need to get the value of file field to use as a variable in Drupal 8 with Twig.

Working my way down through one of Drupal's render arrays of doom to try to get the URI of a file in a media field (in a paragraph type), I came up with this. If you can improve it, feel free to drop a note in the comments:

{% set slide_url = file_url(content.field_p_ei_speaker_slides[0]['#media'].field_m_file_file.entity.uri.value) %}

In steps:

  1. Get the {{ content }} variable
  2. Drill down into the media field (Speaker Slides - pdf, ppt, etc)
  3. Get the first element (0 - it's not a multi-value field in this case)
  4. Load up the #media object
  5. Interrogate the field on the media entity that has the file attached (the File field)
  6. Load this entity (entity here is not presented as an item in the {{ dpm() }} but it's very handy to know
  7. Get the uri.value from here
  8. Wrap it all in a file_url() function

For clarity, here's what I had in PatternLab:

  {# Begin Slides Download #}
  {% if event_slide_download %}
    <div class="event-item__slides">
      <a href="https://mark.ie/blog/web-development/getting-value-uri-drupal-media-file...{{ event_slide_download_link }}">
        {% include '@basic-elements/icons/_svg.twig'
          with {
            svgpath : '@basic-elements/icons/svg/download.svg'
          }
        %}
      </a>
    </div>
  {% endif %}
  {# End Slides Download #}

And here's what I have in the corresponding Drupal paragraph.html.twig tempate:

{% if paragraph.field_p_ei_speaker_slides.value %}
  {% set event_slide_download = true %}
  {% set slide_url = file_url(content.field_p_ei_speaker_slides[0]['#media'].field_m_file_file.entity.uri.value) %}
  {% set event_slide_download_link = slide_url %}
{% endif %}

{% include "@building-blocks/event-section/event-item.twig" %}

So now, my future self, you will know where to find this next time.

Jul 17 2018
Jul 17

If you're not familiar with GatsbyJS, then you owe it to yourself to check it out. It's an up and coming static site generator with React and GraphQL baked in, and it prides itself on being really easy to integrate with common CMS'es like Drupal.

In other words, Gatsby lets you use Drupal as the backend for a completely static site. This means you get a modern frontend stack (React, GraphQL, Webpack, hot reloading, etc.) and a fully static site (with all of the performance and security benefits that come along with static sites) while still keeping the power of Drupal on the backend. 

Along with all of those benefits, Gatsby also has a fantastic plugin ecosystem. This will end up saving you time on things as small as adding Google Fonts to things as big as making your app a full-fledged Progressive Web App with offline support and auto-resized app icons. Check out the plugins to see what I'm talking about.

So let's give it a shot! In this post, we'll see just how simple it is to use Drupal 8 as the backend for a Gatsby-powered static site. 

Step 1: Set up Drupal

This step is super easy. You basically just have to install and configure the JSON API module for Drupal 8, and you're done. 

First off (assuming you already have a Drupal 8 site running), we'll just download and install the JSON API module.

composer require drupal/jsonapi
drupal module:install jsonapi

Now we just have to make sure we grant anonymous users read permission on the API. To do this, go to the permissions page and check the "Anonymous users" checkbox next to the "Access JSON API resource list" permission. If you skip this step, you'll be scratching your head about the endless stream of 406 error codes.

After this you should be all set. Try visiting http://YOURSITE.com/jsonapi and you should see a list of links. For example, if you have an "Article" content type, you should see a link to http://YOURSITE.com/jsonapi/node/article, and clicking that link will show you a JSON list of all of your Article nodes.

Working? Good. Let's keep moving.

Step 2: Install GatsbyJS

Now we need to work on Gatsby. If you don't have it installed already, run this to grab it:

npm install --global gatsby-cli

That'll give you the "gatsby" cli tool, which you can then use to create a new project, like so:

gatsby new YOURSITENAME

That command basically just clones the default Gatsby starter repo, and then installs its dependencies inside it. Note that you can include another parameter on that command which tells Gatsby that you want to use one of the starter repos, but to keep things simple we'll stick with the default.

Once complete, you have the basis for a working Gatsby site. But that's not good enough for us! We need to tell Gatsby about Drupal first.

Step 3: Tell Gatsby about Drupal

For this part, we'll be using the gatsby-source-drupal plugin for Gatsby. First, we need to install it:

cd YOURSITENAME
npm install --save gatsby-source-drupal

Once that's done, we just need to add a tiny bit of configuration for it, so that Gatsby knows the URL of our Drupal site. To do this, edit the gatsby-config.js file and add this little snippet to the "plugins" section:

plugins: [
  {
    resolve: `gatsby-source-drupal`,
    options: {
      baseUrl: `http://YOURSITE.COM`,
    },
  },
]

You're all set. That's all the setup that's needed, and now we're ready to run Gatsby and have it consume Drupal data.

Step 4: Run Gatsby

Let's kick the tires! Run this to get Gatsby running:

gatsby develop

If all goes well, you should see some output like this:

You can now view gatsby-starter-default in the browser.

  http://localhost:8000/

View GraphiQL, an in-browser IDE, to explore your site's data and schema

  http://localhost:8000/___graphql

Note that the development build is not optimized.
To create a production build, use gatsby build

(If you see an error message instead, there's a good chance your Drupal site isn't set up correctly and is erroring. Try manually running "curl yoursite.com/jsonapi" in that case to see if Drupal is throwing an error when Gatsby tries to query it.)

You can load http://localhost:8000/ but you won't see anything particularly interesting yet. It'll just be a default Gatsby starter page. It's more interesting to visit the GraphQL browser and start querying Drupal data, so let's do that.

Step 5: Fetching data from Drupal with GraphQL

Load up http://localhost:8000/___graphql in a browser and you should see a GraphQL UI called GraphiQL (pronounced "graphical") with cool stuff like autocomplete of field names and a schema explorer. 

Clear out everything on the left side, and type an opening curly bracket. It should auto-insert the closing one for you. Then you can hit ctrl+space to see the autocomplete, which should give you a list of all of the possible Drupal entity types and bundles that you can query. It should look something like this:

Entity autocomplete

For example, if you want to query Event nodes, you'll enter "allNodeEvent" there, and drill down into that object.

Here's an example which grabs the "title" of the Event nodes on your Drupal site:

{
  allNodeEvent {
    edges {
      node {
        title
      }
    }
  }
}

Note that "edges" and "node" are concepts from Relay, the GraphQL library that Gatsby uses under the hood. If you think of your data like a graph of dots with connections between them, then the dots in the graph are called “nodes” and the lines connecting them are called “edges.” You don't need to worry about this at the moment. For now, just get used to typing it.

Once you have that snippet written, you can click the play icon button at the top to run it, and you should see a result like this on the right side:

{
  "data": {
    "allNodeEvent": {
      "edges": [
        {
          "node": {
            "title": "Test node 1"
          }
        },
        {
          "node": {
            "title": "Test node 2"
          }
        },
        {
          "node": {
            "title": "Test node 3"
          }
        }
      ]
    }
  }
}

Note that this same pattern can give you pretty much any data you want from Drupal, including entity reference field data or media image URIs, etc. As a random example, here's a snippet from the Contenta CMS + GatsbyJS demo site:

{
  allNodeRecipe {
    edges {
      node {
        title
        preparationTime
        difficulty
        totalTime
        ingredients
        instructions
        relationships {
          category {
            name
          }
          image {
            relationships {
              imageFile {
                localFile {
                  childImageSharp {
                    fluid(maxWidth: 470, maxHeight: 353) {
                      ...GatsbyImageSharpFluid
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Pretty cool right? Everything you need from Drupal, in one GraphQL query.

So now we have Gatsby and Drupal all set up and we know how to grab data from Drupal, but we haven't actually changed anything on the Gatsby site yet. Let's fix that.

Step 6: Displaying Drupal data on the Gatsby site

The cool thing about Gatsby is that GraphQL is so baked in that it assumes that you'll be writing GraphQL queries directly into the components/templates.

In your codebase, check out src/pages/index.js and you should see some placeholder content. Delete everything in there, and replace it with this:

import React from 'react'

class IndexPage extends React.Component {

  render() {
    const pages = this.props.data.allNodePage.edges
    const pageTitles = pages.map(page => <li>{page.node.title}</li>)
    return <ul>{pageTitles}</ul>
  }
}

export default IndexPage

export const query = graphql`
  query pageQuery {
    allNodePage {
      edges {
        node {
          title
        }
      }
    }
  }
`

(Note, this assumes you have a node type named "Page"). 

All we're doing here is grabbing the node titles via the GraphQL query at the bottom, and then displaying them in a bulleted list. 

Here's how that looks on the frontend:

Gatsby showing node titles

And that's it! We are displaying Drupal data on our Gatsby site!

Step 7: Moving on

From here, you'll probably want to look at more complex stuff like creating individual pages in Gatsby for each Drupal node, or displaying more complicated data, or resizing Drupal images, etc. Go to it! The static site is your oyster! 

When you're happy with it, just run "gatsby build" and it'll export an actual static site that you can deploy anywhere you want, like Github Pages or Amazon S3 or Netlify.

Have fun!

Jul 17 2018
Jul 17

It’s always a battle when planning a website design. Your end goals, target audience, content, user experience, everything must align. It’s like a cloud of thoughts right inside your team’s head. It’s critical to optimize your website experience for the devices your audience is or will be using. 

Emarketer forecasts, approximately 83% of internet users will use a mobile phone to go online by 2021. 

1.2 billion mobile web users worldwide written on a white background with the globe on left

Since now that we’ve established the fact that mobile is where the future lies, a mobile-first redesign is a way to go. We’ll dive into what a mobile-first approach entails, including tips for creating a seamless experience for visitors from mobile devices. 

In 2018, it is critical to analyze what’s the right way to go about it. 

1. Shoot for the least 

Without compromising the functionalities, it is definitely a challenge to pull everything into such a limited real estate. The difference in the screen space of various devices should tell you the varied approach to design. 

Minimalism begins by removing every element one by one.

After listing down all the elements, prioritizing is key. Sort out the cruciality of every element and how would they hierarchically sit in the interface. This should be in a way that the most important elements are displayed prominently. 

If after this exercise there’s still space for more, carefully add some elements in order of importance without overdoing it. Doing this would make sure every inch is utilised to the fullest. 

Content Repository 

The approach to this should be by drafting a document or a spreadsheet containing all the content elements you want the interface to entail. 

List down the page titles, navigation titles and be open to comments from peers. An example is given below:

an example of a content repository with content presented in an excel sheet An example of a content repository

2. Analyse the Important Interaction Points

Comparing smartphones from 2008 to the ones in 2018,  a lot has changed since then. The user experience is no more frustrating. Earlier you had to touch the exact alphabet in the keyboard now the smart devices can read your movement through sensors. Keyboards differ according to the smartphone size, button space and overall sensitivity. And so your mobile design should be approached in the same manner. 

Unfortunately, many websites are still lagging behind when it comes to the user experience which leads to weak engagement, poor sessions and doubled bounce rates. 
Make sure the important elements are not missed. 

This includes: 

  • Make button more clickable
  • Make CTAs more appealing and responsive
  • Choose the right color combination for the user to read on the sunny noon
  • Give hyperlinks plenty of space
  • Keep the tabs in the drop down manner
Image containing two mobiles displaying the differences between a good and bad mobile first design with appealing CTAs.Good vs Bad UX design
The number of mobile phone users in the world is expected to pass the five billion mark by 2019, according to Statista. 

3. Optimize Your Images

When it comes to loading size, images make up nearly 64% of an average web page. Outlining the “why”, it is now important to know how you can optimize your images to deliver an optimum and engaging experience to your user, without hogging on those extra kilobytes of data. 

Hacks to Optimize Images

  • Use correct image dimensions for faster loading
  • Use the correct image format. JPEG image would be a lot lighter than the PNG.
  • Compress your image with lossless compression
  • Use Lazy loader to keep the user engaged

4. Content is all that matters

Devising content around mobile is time-consuming as it requires due thinking and goes through numerous iterations along the course of finalizing the content itself. 

Taking the limited space aside for a while, there are more added difficulties when it comes to mobile web development. 

There comes screen rotation, device to device compatibility, text and image overlaps and what not. These factors have everything to make your content look very less appealing. What do you do for cutting these hurdles off? 

Think from an app perspective

Mobile users are accustomed to motion and a modicum of control in their experience. Think about off-canvas navigation, expandable widgets, AJAX calls, or other elements on the screen with which users can interact without refreshing the page. This would help you always maintain the right threshold for user experience. 

Screen and remove all the distracting elements, make the content as precise as possible while catering to actual product or service display. 

Landscape photos and complex graphics don't show well when your screen is reduced by half. Take into account the mobile user with pictures that are comprehensible on handheld screens.

5. Be a User, Before Presenting to the User

Our industry standard for approaching design is devising wireframes first. During wireframing or prototyping, use adaptive breakpoints reference. It streamlines the process of moving to different screen sizes, starting with the least real estate. 

Hover is off the table

Interactive interfaces from 2018 mostly utilize hover effects. UX designers go bonkers over them. But that’s a desktop only thing as we do not have the finger-hover technology in town. You will have to forget hover' existence when going mobile. 

Having trouble configuring your site? Check out services by OpenSense Labs.

6. Opt for Accelerated Mobile Pages

Your users are likely to bounce off your website if it doesn’t load within 3 seconds. With mobile, the standard has been set high (or rather less). Since the internet has been taken for granted, people have become second sensitive these days. 

AMP does bring you speedy pages and is a great way to boost your SEO and stop losing out of potential customers. It’s important to note that Google has gone lengths to identify and promote AMP pages.

If your web pages follow AMP standards, it becomes eligible to be cached by Google and appear in the search results and carousels with the AMP logo, indicating that they offer a fast experience. 

A standard built on top of existing technologies to speed up the loading of web pages on mobile devices.
Search result for google pixel. The first story has the AMP logo

How to go about it?

Configure AMP in your website

7. Make engagement on Mobile Simple 

Whether it’s deciding between a “hamburger” style menu or a more visible-style on the front end or how to display forms on specific pages, don’t make engagement paths more abstract than they need to be. Engagement should be extremely crisp and effective in nature.


Set the Display Order

Now, after listing down all the elements, prioritizing is key. Sort out the cruciality of every element and how would they hierarchically sit in the interface. This should be in a way that the most important elements are displayed prominently. 

8. Test It Before You Sell It

Even after having the final product in your hands, recommendations and tweaks will keep flowing in. Change is evergreen. With changes being made, you need to be testing them as soon as they are deployed. 

Nothing beats discovering for yourself how usable a website is (or isn’t). Step away from your computer desktops and load up your product on a real phone or tablet. 

Test it in a real devices 

Using testing tools, you can conduct A/B tests. Some tests may be like, an orange CTA vs a Yellow CTA, Button size changes, block layout tweaks and etc. Tests can range from regular functionality checks to user experience tests.

Tap through pages. Is the site easy to navigate? Does it load in a timely fashion? Are the text and graphics easy to read?

It's as clear as the skies that the future of the internet is dependent on mobile experiences. Responsive web design is a must if you run your business online or attend to your customers for any purpose. 

The tips above will help you build what you are looking at while making the least possible amount of mistakes. 

If you need any further recommendations, we are here. Hook with us at [email protected] or tweet us at @OpenSenseLabs and our mobile development team will save you the trouble.

Jul 17 2018
Jul 17

[embedded content]

In the video above, you’ll learn how to build powerful media management functionality using Drupal 8.5. I start the webinar with a review of what’s new in Drupal 8 and then jump right into a live demo.

If you prefer text, then read our tutorial on “Managing Media Assets using Core Media in Drupal 8“.

Modules

In the video we use the following modules:

Below is a time coded list of all the sections in the video. Just click on the time code and it’ll jump to that part of the video.

Video Sections

  • Agenda: (00:41)
  • What’s new in Drupal 8: (01:35)
  • Required Modules: (09:53)
  • Demo time: (11:02)
  • Install Media module: (11:49)
  • How to Upload and view assets: (12:34)
  • Overview of Media types: (14:42)
  • Create remote video media type: (15:34)
  • Field mapping in media types: (17:45)
  • Create remote video asset: (18:52)
  • Customize remote video formatters: (19:48)

Media Field

  • Attach media field to Article content type: (20:24)
  • Using Inline Entity Form on media field: (22:53)
  • Install Inline Entity Form: (23:27)
  • Configure IEF on media field widget: (24:46)

Entity Embed

  • Install Entity Embed: (27:44)
  • Create embed button: (28:37)
  • Configure text format for embed button: (29:40)
  • Testing embed button: (32:27)

Entity Browser

  • Install Entity Browser: (35:50)
  • Create entity browser: (38:21)
  • Integrating entity browser and entity embed: (39:45)
  • Create view for entity browser: (41:02)
  • Add IEF to entity browser: (47:35)

Entity Browser and DropzoneJS

  • Add dropzonejs to entity browser: (51:59)
  • Customize fields on media types using form modes: (54:26)

Drupal 8.6

Ivan Zugec

About Ivan Zugec

Ivan is the founder of Web Wash and spends most of his time consulting and writing about Drupal. He's been working with Drupal for 10 years and has successfully completed several large Drupal projects in Australia.

Jul 17 2018
Jul 17

The problem

Sometimes you need to create a page template for a specific content type so that you can customise it. Drupal allows you to create content types for node templates out of the box by following the naming convention node--content-type.html.twig. But things aren’t so simple for page templates. Drupal does not automatically detect page templates for content types purely based on the naming convention. Fortunately it just takes a few lines of code and you can create a page template for any content type you choose.

Before we start, let’s take a brief look at the difference between a node and a page template.

 Page: the template that controls the whole page. This will include a $content variable, which after rendering will be the node.
 Node: the template that controls just the content part of the page.

A solution

To tell Drupal to use the page template for a content type, you can implement hook\_theme\_suggestions\_page\_alter(). This hook is used whenever a page.tpl.php template is used and allows you to suggest alternative templates.

In this case, you are going to use hook_theme_suggestions_page_alter() to tell Drupal to use a specific page template for a specific content type, instead of the default page.tpl.php.

Here is an example of how to tell Drupal to use a template for a content type. Add this code to the example.theme file in your theme, and change hook to the name of your theme. If you have already implemented theme_preprocess_page in your theme’s template.php, you can add the 'if' statement to that.

Here is the solution:

/**
 * Implements hook_theme_suggestions_page_alter().
 */
function example_theme_suggestions_page_alter(array &$suggestions, array $variables) {
  if ($node = \Drupal::routeMatch()->getParameter('node')) {
    $suggestions[] = 'page__' . $node->bundle();
  }
}

The solution explained

In this example, you are telling Drupal that you’d like to use a template with the name of the content type when a page is being viewed. Example templates include:

  • page--article.html.twig for a article content type
  • page--gallery.html.twig for a gallery content type

This is added to 'theme_hook_suggestions', which adds it to the pool of potential templates that Drupal can use. In most cases it will use this one, unless you have another template that meets a more specific criteria. For example, you might have a page template for a single node, which would be more specific and used instead. To add a new theme suggestion, implement hook_theme_suggestions_page_alter() in your theme’s .theme file.

Another example, if you have a theme named example, open the file called example.theme (or create one if it doesn’t exist). And then adding the the following function.

function example_theme_suggestions_page_alter(array &$suggestions, array $variables)  

And inside that function, check that you are viewing a node with:

if ($node = \Drupal::routeMatch()->getParameter('node')) {

And finally, add the naming convention to the theme suggestions with:

$suggestions[] = 'page__' . $node->bundle();

$node->bundle(); will return the name of the content type. So the suggested page template for the article content type will be:

page__article

The complete steps

  1. Open example.theme (replace example with your actual theme name)
  2. Add the code snippet below
  3. Replace example in the function name example_theme_suggestions_page_alter with your actual theme name
  4. Refresh the cache

The complete code in example.theme once again is:

/**
 * Implements hook_theme_suggestions_page_alter().
 */
function example_theme_suggestions_page_alter(array &$suggestions, array $variables) {
  if ($node = \Drupal::routeMatch()->getParameter('node')) {
    $suggestions[] = 'page__' . $node->bundle();
  }
}

Jul 17 2018
Jul 17

Why is this noteworthy you ask?

This is being done as part of the PHPUnit Initiative. One of the main goals of the PHPUnit Initiative is to deprecate the Simpletest module in Drupal 8, so it can be removed before Drupal 9 is released. This would allow us to get rid of one remaining Drupalism, give us less code we need to maintain and allow Drupal to move fully to the industry standard in PHP testing, PHPUnit.

In order to allow us to remove Simpletest from core, we first need to remove all dependencies on it from core. The most obvious being any test using Simpletest.

But, of course, we don’t want to lose test coverage while we do this, so all existing Simpetests need to be converted to PHPUnit tests.

For the last year or two, a lot of work has gone into improving the PHPUnit API for Drupal core. All in an effort to make conversions as painless as possible. Alongside that, a ton of work was done doing the actual conversions. We started with 1047 Simpletests and now only less then 10% of that is still left.

I want to use this milestone to thank everybody that has helped out over the years, and hopefully we can do a final push to convert the remaining tests.

Jul 17 2018
Jul 17

It was a pleasure to present "Demystifying Decoupled Drupal with Contenta CMS" with Bayo Fodeke at Drupal Camp Asheville 2018 on July 14th, 2018. I want to thank the organizers, volunteers, attendees, presenters, and sponsors for making another awesome year in the beautiful North Carolina mountains. This is one great camp that gets better and better each year. Below you will find the video for my talk and slide deck::

"Demystifying Decoupled Drupal with Contenta CMS".

[embedded content]
Jul 16 2018
xjm
Jul 16

Drupal 8.6.0-alpha1 will be released the week of July 16

In preparation for the minor release, Drupal 8.6.x will enter the alpha phase the week of July 16, 2018. Core developers should plan to complete changes that are only allowed in minor releases prior to the alpha release. (More information on alpha and beta releases.)

  • Developers and site owners can begin testing the alpha next week.

  • The 8.7.x branch of core has been created, and future feature and API additions will be targeted against that branch instead of 8.6.x. All outstanding issues filed against 8.6.x will be automatically migrated to 8.7.

  • All issues filed against 8.5.x will then be migrated to 8.6.x, and subsequent bug reports should be targeted against the 8.6.x branch.

  • During the alpha phase, core issues will be committed according to the following policy:

    1. Most issues that are allowed for patch releases will be committed to 8.6.x and 8.7.x.

    2. Drupal 8.5.x will receive only critical bugfixes in preparation for its final patch release window on August 1. (Drupal 8.4.x and older versions are not supported anymore and changes are not made to those branches.)

    3. Most issues that are only allowed in minor releases will be committed to 8.7.x only. A few strategic issues may be backported to 8.7.x, but only at committer discretion after the issue is fixed in 8.7.x (so leave them set to 8.7.x unless you are a committer), and only up until the beta deadline.

Drupal 8.6.0-beta1 will be released the week of July 29

Roughly two weeks after the alpha release, the first beta release will be created. All the restrictions of the alpha release apply to beta releases as well. The release of the first beta is a firm deadline for all feature and API additions. Even if an issue is pending in the Reviewed & Tested by the Community (RTBC) queue when the commit freeze for the beta begins, it will be committed to the next minor release only.

The release candidate phase will begin the week of August 13, and we will post further details at that time. See the summarized key dates in the release cycle, allowed changes during the Drupal 8 release cycle, and Drupal 8 backwards compatibility and internal API policy for more information.

Jul 16 2018
Jul 16

16 Jul

Nick Veenhof

Recently, I was invited to go on the Modern CTO podcast as a guest. We talked about developer culture, how to measure efficiency and velocity and, more importantly, how you can make the teams as independent as possible without losing that team and company feeling.

Modern CTO is the place where CTOs hang out. Listen in on our weekly podcast while we hang out with interesting Fortune 500 CTO’s in Aerospace, Artificial Intelligence, Robotics + Many more industries. As of 2018: 72k listeners we are incredibly grateful to each and everyone one of you.

It was a real honour to talk to Joel Beasley and have this back-and-forth conversation about how we transformed Dropsolid into a great place to work, but measurable and technically innovative!

[embedded content]

Some of the topics that we talked about in the podcast were also seen at the presentation I gave at Drupal Developer Days in Lisbon.  Feel free to scroll through the slides to get more context out of the podcast!

Jul 16 2018
Jul 16

Modern applications are expected to be equipped with powerful search engines. Drupal provides a core search module that is capable of doing a basic keyword search by querying the database. When it comes to storing and retrieving data, databases are very efficient and reliable. They can be also used for basic filtering and aggregating of data. However, they are not very efficient when it comes to searching for specific terms and phrases.

seriers of files with the bookmark


Performing inefficient queries on large sets of data can result in a poor performance. Moreover, what if we want to sort the search results according to their relevance, implement advanced searching techniques like autocompletion, full-text, fuzzy search or integrate search with RESTful APIs to build a decoupled application?

This is where dedicated search servers come into the picture. They provide a robust solution to all these problems. There are a few popular open-source search engines to choose from, such as Apache Solr, Elasticsearch, and Sphinx. When to use which one depends on your needs and situation, and is a discussion for another day. In this article, we are going to explore how we can use Elasticsearch for indexing in Drupal.

What is Elasticsearch?

“Elasticsearch is a highly scalable open-source full-text search and analytics engine. It allows you to store, search, and analyze big volumes of data quickly and in near real time.” – elastic.co 

It is a search server built using Apache Lucene, a Java library, that can be used to implement advanced searching techniques and perform analytics on large sets of data without compromising on performance.

“You Know, for Search”

It is a document-oriented search engine, that is, it stores and queries data in JSON format. It also provides a RESTful interface to interact with the Lucene engine. 

Many popular communities including Github, StackOverflow, and Wikipedia benefit from Elasticsearch due to its speed, distributed architecture, and scalability.

Downloading and Running Elasticsearch server

Before integrating Elasticsearch with Drupal, we need to install it on our machine. Since it needs Java, make sure you have Java 8 or later installed on the system. Also, the Drupal module currently supports the version 5 of Elasticsearch, so download the same.

  • Download the archive from its website and extract it
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.10.tar.gz
$ tar -zxvf elasticsearch-5.6.10.tar.gz
  • Execute the “elasticsearch” bash script located inside the bin directory. If you are on Windows, execute the “elasticsearch.bat” batch file
$ elasticsearch-5.6.10/bin/elasticsearch

The search server should start running on port 9200 port of localhost by default. To make sure it has been set up correctly, make a request at http://localhost:9200/ 

$ curl http://localhost:9200

If you receive the following response, you are good to go

{
  "name" : "hzBUZA1",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "5RMhDoOHSfyI4a9s78qJtQ",
  "version" : {
    "number" : "5.6.10",
    "build_hash" : "b727a60",
    "build_date" : "2018-06-06T15:48:34.860Z",
    "build_snapshot" : false,
    "lucene_version" : "6.6.1"
  },
  "tagline" : "You Know, for Search"
}

Since Elasticsearch does not do any access control out of the box, you must take care of it while deploying it.

Integrating Elasticsearch with Drupal

Now that we have the search server up and running, we can proceed with integrating it with Drupal. In D8, it can be done in two ways (unless you build your own custom solution, of course).

  1. Using Search API and Elasticsearch Connector
  2. Using Elastic Search module

Method 1: Using Search API and Elasticsearch Connector

We will need the following modules.

However, we also need two PHP libraries for it to work – des-connector and php-lucene. Let us download them using composer as it will take care of the dependencies.

$ composer require 'drupal/elasticsearch_connector:^5.0'
$ composer require 'drupal/search_api:^1.8'

Now, enable the modules either using drupal console, drush or by admin UI.

$ drupal module:install elasticsearch_connector search_api

or

$ drush en elasticsearch_connector search_api -y

You can verify that the library has been correctly installed from Status reports available under admin/reports/status.

status of the library under Status ReportsViewing the status of the library under Status Reports

Configuring Elasticsearch Connector

Now, we need to create a cluster (collection of node servers) where all the data will get stored or indexed.

  1. Navigate to Manage → Configuration → Search and metadata → Elasticsearch Connector and click on “Add cluster” button
  2. Fill in the details of the cluster. Give an admin title, enter the server URL, optionally make it the default cluster and make sure to keep the status as Active.Adding an Elasticsearch ClusterAdding an Elasticsearch Cluster
  3. Click on “Save” button to add the cluster

Adding a Search API server

In Drupal, Search API is responsible for providing the interface to a search server. In our case, it is the Elasticsearch. We need to make the Search API server to point to the recently created cluster.

  1. Navigate to Manage → Configuration → Search and metadata → Search API and click on “Add server” button
  2. Give the server a suitable name and description. Select “Elasticsearch” as the backend and optionally adjust the fuzzinessAdding a Search API serverAdding a Search API server
  3. Click on “Save” to add the serverViewing the status of the newly added serverViewing the status of the newly added server

Creating a Search API Index and adding fields to it

Next, we need to create a Search API index. The terminologies used here can be a bit confusing. The Search API index is basically an Elasticsearch Type (and not Elasticsearch index). 

  1. On the same configuration page, click on “Add Index” button
  2. Give an administrative name to the index. Select the entities in the data sources which you need to indexAdding the data sources of the search indexAdding the data sources of the search index
  3. Select the bundles and language to be indexed while configuring the data source, and also select the indexing order.Configuring the added data sourcesConfiguring the added data sources
  4. Next, select the search API server, check enabled. You may want to disable the immediate indexing. Then, click on “Save and add fields”Configuring the search index optionsConfiguring the search index options
  5. Now, we need to add the fields to be indexed. These fields will become the fields of the documents in our Elasticsearch index. Click on the “Add field” button.
  6. Click on “Add” button next to the field you wish to add. Let’s add the title and click on “Done”Adding the required fields to the indexAdding the required fields to the index
  7. Now, configure the type of the field. This can vary with your application. If you are implementing a search functionality, you may want to select “Full-text”Customizing the fields of the indexCustomizing the fields of the index
  8. Finally, click on “Save Changes”

Processing of Data

This is an important concept of how a search engine works. We need to perform certain operations on data before indexing it into the search server. For example, consider an implementation of a simple full-text search bar in a view or a decoupled application. 

  1. To implement this, click on the “Processors” tab. Enable the following and arrange them in this order.
    1. Tokenization: Split the text into tokens or words
    2. Lower Casing: Change the case of all the tokens into lower
    3. Removing stopwords: Remove the noise words like ‘is’, ‘the’, ‘was’, etc
    4. Stemming: Chop off or modify the end of words like  ‘–-ing’, ‘–uous’, etc

      Along with these steps, you may enable checks on Content access, publishing status of the entity and enable Result Highlighting

  2. Scroll down to the bottom, arrange the order and enable all the processes from their individual vertical tabs.Arranging the order of ProcessorsArranging the order of Processors
  3. Click on “Save” to save the configuration.

Note that the processes that need to be applied can vary on your application. For example, you shouldn’t remove the stopwords if you want to implement Autocompletion.

Indexing the content items

By default, Drupal cron will do the job of indexing whenever it executes. But for the time being, let’s index the items manually from the “View” tab.

Indexing the content itemsIndexing the content items

Optionally alter the batch size and click on “Index now” button to start indexing.

Wait for the indexing to finishWait for the indexing to finish

Now, you can view or browse the created index using the REST interface or a client like Elasticsearch Head or Kibana. 

$ curl http://localhost:9200/elasticsearch_drupal_content_index/_search?pretty=true&q=*:*
Creating a view with full-text searchCreating a view with full-text search

You may create a view with the search index or use the REST interface of Elasticsearch to build a decoupled application.

Example of a full-text search using Drupal viewExample of a full-text search using Drupal view

Method 2: Using Elastic Search module

As you may notice, there is a lot of terminology mismatch between Search API and Elasticsearch’s core concepts. Hence, we can alternatively use this method.

For this, we will need the Elastic Search module and 3 PHP libraries – elasticsearch, elasticsearch-dsl, and twlib. Let’s download the module using composer.

$ composer require 'drupal/elastic_search:^1.2'

Now, enable it either using drupal console, drush or by admin UI.

$ drupal module:install elastic_search

or

$ drush en elastic_search -y

Connecting to Elasticsearch Server

First, we need to connect the module with the search server, similar to the previous method.

  1. Navigate to Configuration → Search and metadata → Elastic Server
  2. Select HTTP protocol, add the elastic search host and port number, and optionally add the Kibana host. You may also add a prefix for indices. Rest of the configurations can be left at defaults.Adding the Elasticsearch serverAdding the Elasticsearch server
  3. Click on “Save configurations” to add the server

Generating mappings and configuring them

A mapping is essentially a schema that will define the fields of the documents in an index. All the bundles of entities in Drupal can be mapped into indices.

  1. Click on “Generate mappings”
  2. Select the entity type, let’s say node. Then select its bundles. Optionally allow mapping of its childrenAdding the entity and selecting its bundles to be mappedAdding the entity and selecting its bundles to be mapped
  3. Click on “Submit” button. It will automatically add all the fields, you may want to keep only the desired fields and configure them correctly. Their mapping DSL can also be exported.Configuring the fields of a bundleConfiguring the fields of a bundle

Generating index and pushing the documents

Now, we can push the indices and the required documents to the search server.

  1. For that, move on to the indices tab, click on “Generate New Elastic Search Indices” and then click on “Push Server Indices and Mappings”. This will create all the indices on the server.
  2. Now index all the nodes using “Push All Documents”. You may also push the nodes for a specific index. Wait for the indexing to finish.Managing the indices using the admin UIManaging the indices using the admin UI

Conclusion

Drupal entities can be indexed into the Elasticsearch documents, which can be used to create an advanced search system using Drupal views or can be used to build a decoupled application using the REST interface of Elasticsearch. 
While Search API provides an abstract approach, the Elastic Search module follows the conventions and principles of the search engine itself to index the documents. Either way, you can relish the flexibility, power, and speed of Elasticsearch to build your desired solution.

Jul 15 2018
Ana
Jul 15

Agiledrop is highlighting active Drupal community members through a series of interviews. Learn who are the people behind Drupal projects.

This week we talked with Renato Goncalves de Araújo. Read about what are the two things he loves about Drupal, what he thinks the future will bring for Drupal, and what are projects he is involved into. 


1. Please tell us a little about yourself. How do you participate in the Drupal community and what do you do professionally?

About me:
I have been a software developer for eleven years now. I studied Computer Science at the University of Campinas (Unicamp).

About Drupal Community:
The Drupal community is a group of passionate and like-minded people who aim to help one another and that’s what I love about it. I enjoy getting involved with the Drupal community and seeing how people help each other. When I get the chance, I try my best to contribute to official projects since I know how these projects greatly help in our day-to-day. 

I currently work for CI&T's Drupal Competence Office (DCO) which is involved with several Drupal projects, includes training; certifications; participation in events like a DrupalCon, DrupalCamp, Drupal Global Training Day, and others. I’m also a member of the group ADB - Associação Drupal Brasil (Drupal Association Brazil).

 

2. When did you first came across Drupal? What convinced you to stay, software or the community, and why?

I first came across Drupal when I was in University in 2008 and again when I started working at CI&T. I decided to stay with Drupal for two reasons. Firstly, because it is open source. I really like the free software philosophy. Secondly, because I noticed that the Drupal community is unmatchable when it comes to talent and projects. 

 

3. What impact Drupal made on you? Is there a particular moment you remember?

I believe that Drupal has transformed my career for the better. I started to get involved with the free software community and today I consider myself a much better professional.

I have created projects for the community like  Modal Page, Janrain, Forms to Email and Parameter Message. I have been gaining people's trust, and today I maintain more than 40 official projects, including projects like Views that is used by almost 800,000 sites.

One particular and the special moment was when I came in  3rd on Dries Buytaert’s (founder of Drupal and Acquia) list of 2017 contributors: https://dri.es/who-sponsors-drupal-development-2017

contributors

Another memorable moment was when they released our Janrain project in the Newsletter of the Drupal Association.

The last was the launch of the CI&T website made with Drupal 8:
www.drupal.org/case-study/cit-thoughtfully-fast-in-drupal-8

 

4. How do you explain what Drupal is to other, non-Drupal people?

I always say that Drupal is a powerful framework for creating systems and websites.
All you have to do is find a module that best aligns with what you’re trying to do, and if you can’t you can create it yourself. Much more, you can create a module that also potentially help others. Drupal is both intuitive and a system that has plenty of benefits that I can’t imagine creating a website with any framework other than Drupal.

 

5. How did you see Drupal evolving over the years? What do you think the future will bring?

I see Drupal evolving to something even better over the years--more performant framework with modern technologies such as Object-Oriented Programming (OOP) and Symfony, to compete with other frameworks in the market.

I think the future will bring new possibilities within Drupal like an Alexa, Chatbot, Composer (Drupal Plan) and many others using Drupal Decouple. This is already happening and I'm sure that it will continue. 

 

6. What are some of the contribution to open source code or community that you are most proud of?

I would say that the three contributions I’m most proud of are:

  1. First, I'm very proud of the Modal page project, which I created from a simple idea and which today is used by almost 50 sites in production.
  2. Second, I'm proud of the project that I created together with my team called Janrain.
  3. Lastly, I'm significantly proud of the Views project, which is one of the largest in the community. 

 

7. Is there an initiative or a project in Drupal space that you would like to promote or highlight?

Yes, Modal Page and Janrain.
Modal Page is a project that came up with the idea of facilitating the creation of models for Drupal in a simple and effective way. Several sites are using it in production and all help is welcome.
Janrain is the official project for Drupal 8 with a stable release.

 

8. Is there anything else that excites you beyond Drupal? Either a new technology or a personal endeavorment. 

What excites me is the "Drupal Decouple" or “Headless” Drupal way of working. Where the backend plays the role of the web service and is responsible for processing the information and returning it in JSON format for example, and in this way it is possible to use the front end with other technologies.
 

Jul 14 2018
Jul 14


Drupal Developer Days Lisbon
was valuable, nicely organized, and full of energy. Two Axelerant team members attended to contribute a workshop and a session on two key topics, and they wanted to share key highlights with you, to thank the volunteers, and to encourage more developers from around the world to make it in 2019.

Lakshmi Narasimhan

So, how was it overall?

Incredible. Of course the event was highly developer focused—which is why developers from all over should make time to really commune. European agencies and the talent behind them are real powerhouses. The environment was great.

Random thoughts or new learnings?

Well, I’m always looking for conversations around DevOps solutions, and it seems like everyone and their dog has a workflow problem. They’re looking for and want to have some rudimentary CD pipeline which helps them quickly deliver. It seems that Lando adoption is obviously growing and Vagrant/VM is thinning down. I was personally happy to see a houseful K8s workshop. I initially thought that not so many people would be aware of it, but was I was proven wrong!

How were the keynotes?

The keynote by Gabor Hojtsy was excellent. One thing I realized was that there are so many initiatives in Drupal. It’s really spread its wings and grown from being a small “LAMP” flavored CMS to painting with broad strokes—API first, workflow, layouts, etc.

In all honesty, the flipside, in my opinion, is that the developer audience is not clearly defined. Is Drupal a clicky, site-builder friendly tool (with layouts, out of the box initiatives, etc) or a content management framework (composer in core initiative, config YML files)? It’s hard to ride two horses at the same time.

Here are some of the initiatives I really like. For one, the Out of the Box Experience initiative (the Umami demo), for showing off Drupal’s superpowers to prospective people making CMS decisions in an organization. Also, Admin UI JS modernization? The name says it all—awesome. Some others: composer as a first class citizen, the telemetry initiative, and using GitLab as the issue tracker for Drupal.org.

And who manages all the initiatives and makes sure they don’t step on each other? Hojtsy. Really great work.

What other sessions or talks do you remember well?

What‘s new in Drupal Commerce. I personally think Drupal Commerce is technically feasible for a large organization, as Drupal can fit the bill in terms of other aspects too, like workflow, content strategy, personalization, etc. But like any other solution, engineering finesse alone doesn’t dictate product decisions. There was a lot of emphasis on having shared marketing resources, artifacts across agencies for Drupal Commerce—like how Drupal is competing with other platforms with similar offerings.

TDD using Drupal. The session demonstrated how TDD and Drupal is possible and I’m surprised that we don’t see tests in contrib and custom modules as much as we see in core. Another good takeaway was “tests as documentation”, the idea being that you figure out how to use a module by reading the test code.

Modular software, modular infrastructure. This was an aux armes! for all DevOps folks to create shared “best practices” Docker images for Drupal. Quite an intuitive talk.

One flew over the developer’s nest. I’m usually curious about sessions alluding to movies, and this one didn’t disappoint at all. It covered the importance of people and process in an organization, and is a must watch for anyone aspiring to be a CTO or Engineering Manager. You’ll come out with a gigantic reading list from the session, including but not limited to The Phoenix Project and Modern CTO and more. I also really liked how the session flowed like a personal anecdote—nice.

Any “business” highlights?

There really wasn’t too much marketing or sales that I could see on the ground—because developers are a hard sell—though it would be a great idea to sell developer-focused tools at the event, like IDEs and certain DevOps offerings.

Any last mentions you’d like to share?

There was certainly a lot of buzz abound Drupal Europe—inviting Matt Mullenweg, and everything people like Baddy and Gábor are coordinating. It seems like it’s going to be really special.

Having a blast @drupaldevdays closing session.. pic.twitter.com/08fTMzAYHf

— Lakshmi Narasimhan (@lakshminp) July 6, 2018

 
Overall, the experience was like drinking through a firehose. We had a lot of sessions to watch and had to juggle that with Lisbon sightseeing. I’m looking forward to watching the ones I missed once they’re uploaded to YouTube.

Here’s a shout out to the organizers, with a special mention for the lunch catering; this was one of the first Drupal events where I had more choices, being a vegetarian. Thank you!

Mohit Aghera

What did you think?

Contributions was a main focus—people sprinting in the sprint room for the whole week! There’s also tons of excitement around Drupal Europe.

Contribute, contribute, contribute! Go to initiative tables and ask what you can help with! #drupaldevdays has 3 big rooms with contributions going on. Go there! pic.twitter.com/9vE7nHxaAL

— Drupal Dev Days (@drupaldevdays) July 5, 2018
 
Keynote thoughts?

Gábor Hojtsy really did a nice job with his summary of all the initiatives in Drupal 8. He also covered the status of 8.6.x, and how the process is coming along.

I’m quite impressed with these—CMI 2.0, composer initiative, Out of the Box initiative, and the significant amount of work done on the JSON API module to move it into Drupal 8 core in an experimental state.

The composer initiative, for example, is being led by Alex Pott and Fabian Bircher. We are planning to have a sophisticated configuration management system in Drupal 8 Core. You can also check out the PoC of the composer initiative here.

As a community, we have made significant progress on media initiatives as well, and they’re in good shape right now. Gabor also mentioned the security release initiative and how we are dealing with it.

Updates on media initiative at @drupaldevdays #drupaldevdays pic.twitter.com/guYqIMyl8w

— Mohit Aghera (@mohit_rocks) July 5, 2018


Rachel's
 keynote was inspiring. It covered how Drupal is making a real impact on lives, how Drupal is changing the world. She covered some good use cases of Drupal, like how Warchild UK is using Drupal to help childrens in war affected areas. She explained how Drupal helped to double the conversion rate of donors—which in turn helped Warchild UK to receive more donations for more impact. She also urged everyone to donate, volunteer, and contribute to the Drupal Association.

Wednesday! Drupaldevdays starting at the main auditorium with an amazing Keynote by @rachel_norfolk pic.twitter.com/G9lO7xMHT5

— Drupal Dev Days (@drupaldevdays) July 4, 2018

So which sessions did you attend?

Lakshmi’s for one! The Helmsman and the water drop: Running Drupal on Kubernetes.

This workshop by Lakshmi was really useful for developers who want to use Docker in their development and production environment. He covered Kubernetes and Minikube nicely, and related concepts that help get things up and running using Kubernetes and Docker.

@lakshminp explaining why we need docker.. #drupaldevdays
Join in workshop room to learn more about it @drupaldevdays pic.twitter.com/4ti8q8dTfp

— Mohit Aghera (@mohit_rocks) July 4, 2018


I attended Fabian Bircher's session too: CMI 2.0 and configuration management with contrib today. He did a helpful, quick overview of best practices in configuration management and how to implement them. He also provided some insights for CMI 2.0 to make configuration management even better.

@fabianbircher explaining about configuration management and CMI2.0 initiative #Drupaldevdays pic.twitter.com/Ioz2pe0j7r

— Mohit Aghera (@mohit_rocks) July 3, 2018

You were an active contributor. How did it go?

I was actively working with the Out of the Box initiative team to use CSV import for sample content. Thanks much to Elliot Ward for providing so much help and setting clear expectations from a ticket perspective. I spent around three days working with the team and we are currently working on this issue. (Everyone is welcome to contribute.)

The enthusiasm for contribution was clearly visible—and contagious—in the contribution room. Everyone were really helpful in contributions and other things.

A HUGE thank you to everyone that's helping out on the Out of the Box @d8initiatives (the Umami demo) at @drupaldevdays!

In fact, a huge thank you to everyone who's getting involved in making Drupal better :) https://t.co/nJyCPXAicY

— Gareth Goodwin (@gareth5mm) July 4, 2018
 
Any last thoughts?

This event was planned very well. Thank you to the awesome team who worked hard at Drupal Portugal—and to all the volunteers, speakers, contributors, sponsors, and attendees.

Jul 13 2018
Jul 13

Read our Roadmap to understand how this work falls into priorities set by the Drupal Association with direction and collaboration from the Board and community.

Announcements

Last chance to vote in the Drupal Association board election

Elections for the Drupal Association board end on July 13th, 2018 at 5pm Pacific (in just over an hour at the time this is posted). There are nine candidates from 7 countries across six continents representing a wide variety of perspectives from the Drupal community. Anyone user who has been active in the last year and registered before the elections began is welcome to cast a ballot.

We encourage you to vote today and help guide the future of the Drupal Association.  

Reminder: Drupal Europe is coming up soon

Drupal Europe is coming up in less than 60 days! Drupal Europe will be the largest gathering of the Drupal community in Europe and is a reimagining of this important community event as both technical conference and family reunion. The Drupal Association engineering team will be attending to connect with the community, provide updates on Drupal.org, and listen to some of the incredible speakers who will be in attendance.

Join the community in Darmstadt, Germany from September 10-14, 2018. Make sure to register, book your travel, and secure accommodation: http://drupaleurope.org/

Project maintainers: Change your git remote configuration

Git authentication methods for Drupal.org hosted projects are changing as we approach upgrading our developer tooling stack. In particular we will be:

  • Deprecating password authentication for git

  • Deprecating the git remote format <username>@git.drupal.org/project/<yourproject>.git in favor of [email protected]:project/<yourproject>.git

We have updated the version control instructions for Drupal.org projects, and put a message in the git daemon for any user who makes a push using the deprecated format.

For more information, please review: https://drupal.org/gitauth

Drupal.org Updates

Ecommerce industry page launched

Since last year, one of our ongoing initiatives has been to develop more content on Drupal.org focused on specific industries. Drupal is an incredible powerful tool for building ambitious digital experiences, but it's flexibility can sometimes be overwhelming. These industry specific pages help Drupal evaluators discover how Drupal can be tailored for their specific needs, and highlight successful case studies of Drupal in the wild.

The Drupal Association has launched our sixth industry page promoting the power of Drupal for Ecommerce. We want to thank Commerce Guys for their contributions to getting this page off the ground.

Display project screenshots in a more user friendly way

For every new Drupal project that a developer or site-builder undertakes, time is spent evaluating distributions, modules, and themes to find integrations that will accelerate launching the project.

To improve the user experience for users evaluating modules on Drupal.org, we've implemented a new lightbox-style display for project screenshots.

Here's an example of a screenshot from the Token project:

Granted more maintainers the ability to give contribution credit

Since the introduction of contribution credits at the end of 2015, they've become an important part of the way the Drupal community recognizes individual and organizational contributions to the project. The Drupal Association Engineering team regularly reviews the contribution credit system to make small tweaks and adjustments to make the experience even better.

For our most recent update, Drupal.org now grants all project maintainers with the 'maintain issues' permission the ability to grant contribution credit, instead of just those users with 'Write to Version Control' permissions. This means that a much wider group of maintainers can now participate in granting credit.

Showing maintainer photos on top level Docs guides

Documentation is critically important to the Drupal project To make it easier for potential contributors to find out who they should reach out to for issues that affect the top levels of documentation, we've added maintainer information to the top level documentation guides.

Email confirmation when creating an organization node

To help more organizations that work with Drupal join our community, we now send an email confirmation to any user who creates an organization profile with information about becoming listed as a service provider, details about the contribution credit system, and information about becoming a Drupal Association member or supporting partner.

We encourage everyone in the Drupal community to ask your clients to create a Drupal.org organization profile. Bringing end-users into the contribution journey will be a key part of Drupal's long term health and success.

Contributing to the Open Demographics Initiative

One of our goals on the Drupal Association engineering team is to adopt the Open Demographics Initiative in our user registration process. As part of our effort to work towards that goal, we have contributed a machine readable version of the demographic questions and and answers to the ODI project.

We're hopeful that can be reviewed and committed soon, and be used as the basis for an ODI Drupal module.

Security Improvements

Added PSA and SAs to the /news feed

To increase the visibility of security notifications, Public Security Announcements and Security Advisories will now be included in the https://drupal.org/news feed.

Multi-value CVE field for Security Advisories

We've also updated the security advisory content type so that an advisory can be associated with multiple CVEs.

Infrastructure Updates

DrupalCI: Converted core javascript tests to use Chrome driver

The DA Engineering team has worked together with Core to convert the Core javascript tests from using PhantomJS to using Chrome Webdriver. This provides much more powerful and better supported tools for javascript development in Drupal.

DrupalCI: Reduced disk space usage of the DrupalCI dispatcher

One of the most important services the Drupal Association provides for the project is DrupalCI, the suite of tools used to test all of Drupal's code. These tools are very powerful, but also expensive to maintain, and something we have to monitor carefully. In June, we spent some time automating disk space management for the DrupalCI dispatcher, to help reduce the maintenance cost of keeping it running smoothly.

———

As always, we’d like to say thanks to all the volunteers who work with us, and to the Drupal Association Supporters, who make it possible for us to work on these projects. In particular we want to thank:

  • OPIN - Renewing Signature Supporting Partner
  • Srijan - Renewing Signature Supporting Partner
  • Lullabot - Renewing Premium Supporting Partner
  • Aten - Renewing Premium Supporting Partner
  • Phase2 - Renewing Premium Supporting Partner
  • WebEnertia - *NEW* Premium Supporting Partner
  • Pantheon - Renewing Premium Hosting Supporter
  • Datadog - Renewing Premium Technology Supporter
  • Promet Source - Renewing Classic Supporting Partner
  • Evolving Web - Renewing Classic Supporting Partner
  • ImageX - Renewing Classic Supporting Partner
  • Adapt - Renewing Classic Supporting Partner
  • Green Geeks - Renewing Hosting Supporter
  • Microserve - Renewing Classic Supporting Partner
  • ThinkShout - Renewing Classic Supporting Partner
  • Amazee Labs - Renewing Classic Supporting Partner
  • Four Kitchens - Renewing Classic Supporting Partner
  • Access - Renewing Classic Supporting Partner
  • Appnovation - Renewing Classic Supporting Partner
  • Studio Present - Renewing Classic Supporting Partner
  • undpaul - Renewing Classic Supporting Partner
  • Position2 - Renewing Classic Supporting Partner
  • Blend Interactive - Renewing Classic Supporting Partner

If you would like to support our work as an individual or an organization, consider becoming a member of the Drupal Association.

Follow us on Twitter for regular updates: @drupal_org, @drupal_infra

Jul 13 2018
Jul 13

Omeda and Drupal are a perfect match for managing customer relationships

As you may have figured out by now, Drupal is a great platform for 3rd party integrations. Whether it’s eSignatures with Hellosign, more sophisticated search with Solr, or a host of other options, Drupal works best when it’s not trying to reinvent every wheel and is instead used to leverage existing business tools by tying them all together into a robust and useful package. Today, we’re going to take a look at a new set of integration modules that Ashday has just contributed back to the Drupal community: Omeda, Omeda Subscriptions and Omeda Customers.

The Omeda Solution

If you haven’t heard of Omeda by now, let’s take care of that. They are a family-founded company who have been around for over 30 years and offer a host of Audience Relationship Management tools meant to properly leverage modern technology to properly segment and target your customer base. They are on top of their game and really know their stuff (they even collaborated on the brainstorming of these new modules). And best of all, they offer a very complete and well-documented API, which is key to any good integration.

While their API is extensive, much of it can be very tailored to a particular customer’s needs so we set out to build a contributable integration that covers some great typical use cases as well as allow for custom development where necessary. So far, this has taken the shape of three modules that potentially can be extended later on.

Omeda Base Module

The Omeda base module is meant to be a simple core module to get you wired up to Omeda so you can start doing things. It has settings to configure your connection to the API as well as a setting to work in testing mode. At its heart is a Drupal service that is meant to be injected into other contrib modules that can tackle specific Drupal solutions. This service provides the Comprehensive Brand Lookup, which the module uses to cache your Omeda brand config daily, as well as a generic utility for making API calls, which has the benefit of consolidating some basic error handling and formulation of HTTP requests. Here’s a little example of how simple it is to call the API using this service:

 

$brand_lookup = \Drupal::service('omeda')->brandComprehensiveLookup();

 

So that’s pretty easy, right? If anything is wrong with the API config or the service is down or something along those lines, the service throws an exception with a helpful message. Otherwise, it returns the Omeda API response to the caller. Again, it’s simple but provides the base functionality you need everytime you wish to connect with Omeda.

Omeda Subscriptions Module

The first module to leverage the Omeda base module is the Omeda Subscriptions module. This module adds a My Subscriptions tab to the user profile, for the roles you select, where users can manage their deployment subscriptions. You can also configure which Omeda deployments you wish to allow your users to manage. The available deployments come from the stored Comprehensive Brand Lookup data cached by the base Omeda module. This module includes a new Omeda Subscriptions service that adds functions to fetch a logged in user’s opt ins and opt outs as well as allow the user to opt in or opt out of a deployment. It’s a simple, specialized module (which is the best kind) to provide an out-of-the-box solution for the most common Omeda user subscription management needs.

Omeda Customers Module

The Omeda Customers module is another extension to the base Omeda module that allows you to map user fields to your Omeda customer entities and sync them on user updates. You can choose which roles will sync and which user fields will sync. Since field mapping can get quite hairy, we provide a solution for simple use cases where you need to simply tell Omeda that “this field = that field”. If it’s a standard base Omeda field like “First Name”, those are called base fields and are meant to be a simple hand off of the Drupal field value to Omeda. If it’s an email, phone number, or address field, you can choose that type and we will then ask you to determine which contact type it represents so that it gets into Omeda properly. It should be noted that for addresses, we only support Address fields from the Address module since mapping a bunch of individual Drupal fields to a single Address entity in Omeda is more complicated and likely needs a custom solution.

This mapping config also provides a simple solution for Omeda Demographic fields, which are more complex and dynamic fields that store IDs instead of literal values. It allows you to choose which demographic field a Drupal user field maps to and then create a mapping of possible Drupal field values with available Omeda field values. So if you have a field on the Drupal user called “Primary business role”, but you want to map it to the Omeda “Job Title” demographic field, you can do that. You would then hand enter a mapping that indicates that a Drupal field value of “President” maps to the Omeda value of “President / CEO” so that we can send Omeda it’s desired ID value of 5******* instead of the literal text of “President / CEO”, which would be invalid. Again, this is for more simple use cases; if your Omeda fields don’t map 1-to-1 to Drupal fields, the necessary business logic is wide-ranging and you will likely need custom programming. The great thing though is that we’ve included support for a custom hook (hook_omeda_customer_data_alter) to inject your own adjustments into the data mapping process and provide your own custom alterations.

In Conclusion

Hopefully these modules prove useful to you - especially if you’re already an Omeda client with a Drupal site - and the goal again is to provide some basic functionality that doesn’t require developer resources to integrate with some basic Omeda functionality. We ourselves have custom needs beyond what the modules can offer and find that it’s quite easy to extend them to do what we need for particular customer solutions, largely thanks to Drupal 8’s architecture. As always, if you need assistance please feel free to contact us and if you’d like to offer any module patches or report a bug, feel free to use the issue queues for each project and we’ll check it out!

 If you need to integrate Drupal with anything, talk to us! We can integrate just about anything with Drupal

Jul 13 2018
Jul 13

Do you use Drupal? Before working at Palantir, I used Drupal only once: to help a legacy client with their Drupal 6 website. They had a support contract with my company, so if they had an issue or question I would do my best to help them, even though the original team who built the site had moved on to other jobs, and even though my company focused on WordPress sites.

I remember scrutinizing every menu item of the admin section, trying to familiarize myself with the platform while careful not to misclick and mess up something on the client’s site. Some of the terms I could understand—users, taxonomy—but some were new or vague, and not very clear to their meaning such as nodes, views, and blocks. While I was able to help the client at the time, I felt Drupal was too obtuse of a platform for me.

Redesign planned for Drupal

Now that I’m at Palantir, and knowing Drupal is a bigger part of my job, I’m still struck by how user unfriendly the platform can be out-of-the box, especially to a non-developer. While add-on modules like Workbench and Content Moderation can mitigate some of this complexity, installing and configuring those requires specialized knowledge. From talking to current clients, I know that I’m not the only one who feels intimidated by Drupal’s default administrative interface.

The Drupal community is also aware of the high learning curve to Drupal, and is in the process of modernizing the look and feel of the admin experience to make it more intuitive. Given how big the changes are, it’s the perfect time to include the people who work with Drupal every day to make sure Drupal is a system everyone feels comfortable using.

Therefore, I am working with fellow Palantir web strategist Michelle Jackson, Drupal front-end designer Cristina Chumillas, co-founder and front-end lead at Evolving Web Suzanne Dergacheva, project manager Antonella Severo, design consultant Roy Scholten, folks from the Drupal Association and other interested volunteers to conduct research on popular content management systems and web platforms such as Drupal, WordPress, Squarespace, and Joomla in order to learn how best to update Drupal.

Here’s where you come in

We want to make Drupal the best platform for content editors and managers to use everyday. Therefore, if your job involves updating the company blog, swapping out images, tagging content to group related information, or some other way you interact with your website, we want to hear from you.

We put together a quick, 5-10 minute survey that asks about your general familiarity with Drupal. For example, we want to know common tasks you perform on the platform as well as frustrating pain points. This way we can target our redesign efforts to make Drupal work better for you.

In addition to the opportunity to shape the future of Drupal, at the end of the survey you’ll have the opportunity to enter into a drawing for two great prizes: 1 full conference ticket to the (new) DrupalCon Content Marketing track at DrupalCon Seattle 2019 - $695 value (flight and hotel not included), or 1 two-day, online Drupal 8 training session from fellow Drupal agency Evolving Web.

Take the Survey

So what happens next?

This survey is step one of our research efforts. After reviewing the common tasks, we’ll ask folks who had provided their email address if they are willing to participate in card sort exercises to determine the best label for grouping common tasks together. Next we’ll design solutions to address the biggest pain points and ask participants to validate our assumptions through usability tests.

Looking at the long term, we are interested in comparing Drupal with other popular systems such as WordPress and Squarespace. We plan to reach out to people who use those platforms to find out what they find easy or difficult about them, which may inform the direction of the Drupal redesign. No matter which direction our research takes, we want to ensure we’re building a product with you, the content editor, in mind.

More ways to help

We want to make the new Drupal as intuitive as can be on a global scale, but as a small team of volunteers, there’s only so much we can do on our own. If you develop or design for Drupal, and are interested in our research efforts, there are a number of ways to get involved. First, check out the Admin UI and JavaScript Modernization initiative on Drupal.org. Then, reach out to us on the #admin-ui channel on Slack. We can show you how to copy the survey so you can run your own tests. We’re especially grateful if you’re able to translate it and test users in Africa, Asia, and Latin America.

It shouldn’t take specialized knowledge to update and maintain a website on Drupal. With your help, we can make Drupal a more approachable platform for content editors. I can’t wait to hear from you!

Pages

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web