Dec 18 2019
Dec 18

To make queries and build listing pages on Drupal 8, or any other content to collect, we have EntityQuery, the API Database (see Make a SQL query on multiple tables with Drupal 8) or the Views module which provides us an extremely powerful requester and graphical interface. Each of these methods has its advantages and disadvantages and may be more appropriate in certain situations (complexity of the request, etc.).

One of the advantages of the EntityQuery is that it is easy to make complex queries under many dynamic conditions. However, Views requests can also be dynamically altered, although this type of alteration may be slightly more complex due to the power of Views.

A particularly useful use case can be to add a relationship to a View dynamically (the equivalent of $query->join()). Let's take an example right away, with a view based on the Node entity (base table: node), for which we want to add a relationship based on a field_user field referencing a user, and then be able to alter the query based on the Users entities referenced by this field.

To do this, we will implement hook_views_query_alter() which allows us to alter the request of a View before it is executed.

/**
 * Implements hook_views_query_alter().
 */
function my_module_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
  if ($view->id() == 'view_machine_name') {
    $current_user = $view->getUser();
    $condition = _my_module_custom_condition($current_user);
    if ($condition) {
      $definition = [
        'table' => 'node__field_user',
        'field' => 'entity_id',
        'left_table' => 'node',
        'left_field' => 'id',
      ];
      $join = \Drupal::service('plugin.manager.views.join')
        ->createInstance('standard', $definition);
      $query->addRelationship('my_relation', $join, 'node');

      $currentUserId = $current_user->id();
      $query->addWhereExpression('AND',
        'my_relation.field_user_target_id = :currentUid',
        ['currentUid' => $currentUserId]);
    }
  }
}

/**
 * Helper function to test a condition.
 *
 * @param \Drupal\Core\Session\AccountInterface $current_user
 *   The current user.
 *
 * @return bool
 *   TRUE if condition passed.
 */
function _my_module_custom_condition(AccountInterface $current_user) {
  $result = TRUE;
  // Some stuff.
  return $result;
}

In this example, according to any business condition, we can instantiate a new $join relationship, add this relationship as "my_relation" to the query, then add a condition to our query based on this new added relationship.

Not being a big user of Views except for specific use cases, I recently discovered the use of this type of Plugin used by Views to create and manage relationships to a view. A type of plugin that makes it possible to facilitate complex alterations of a view in a relatively clear way. With the help of a Drupal developer, we can use views designed by site builder profiles for these relatively complex use cases, and managed and maintained by users with different profiles.

All tastes are in nature, and it takes everything to make a world.

Dec 17 2019
Dec 17

Developer portals need three kinds of great content to succeed. 

  1. API Documentation

  2. Technical Documentation

  3. Marketing Content

Content is being consumed differently now than it was in the past. Dense long-form, bespoke technical communication is going away. Clear, highly visual , easy to read content is taking the lead.  When building a developer portal, content quality and organization needs to be a high priority for your team. .   

API Documentation

Clear API Documentation is a critical component of success.  Your developers rely on this documentation during development.   It needs to be easy to read and understand, and most importantly it needs to be consistent across all your APIs; this consistency starts with good planning upfront. This is content strategy with a particular focus on technical documentation and will result in a writing guide for API docs to help foster usability and readability. Templates and writing guides provide consistency that will increase your developer community’s happiness and productivity.  

Technical Documentation

Technical Documentation is your API program’s supporting content. These include practical use case scenarios, SDK documentation, Frequently Asked Questions, and other technical topic content. Paying attention to the quality of this content is important.  Rambling, bespoke technical documentation will not be consumed by your developer community and will slow the growth of your API acceptance. We help companies develop content governance strategy plans that create a consistent tone, tenor and taxonomy for your technical documentation. Consistent, easy to read, well tagged technical content is a winning combination. 

Marketing Content

Marketing Content. Digital transformation is being powered by APIs; the company API developer portal is becoming the place where these initiatives are being communicated. The ‘customer’ is the developer who comes to your site and consumes your API’s in order to build out new products, services and transactions. Growing adoption of API programs along these channels requires solid marketing material. This content communicates the business value of using your API products and should include all stakeholders in the process as you gather input from across the organization. Work with writers who will create great copy and content to sell your API program. 

The Apigee developer portal is a powerful content management system built using Drupal 8. It is the perfect platform to manage these three types of content.   

Chapter Three is a digital agency that helps organizations develop amazing Apigee developer portal experiences by providing API program strategic planning, content strategy, technical writing, development, training and support.

We look forward to partnering with you. 

Dec 17 2019
Dec 17

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.

Writing this here in the United States, after having enjoyed the Thanksgiving holiday with friends and family, reminds me of how much we have to be thankful for in the Drupal community. We have a wonderful international community with incredible talent and thoughtfulness that goes into building software that touches millions of people. #DrupalThanks.

Project News

Reminder: Drupal 8.8.0 has been released! 

With the release of Drupal 8.8.0 comes some great improvements, including a stable Media Library and new experimental Administration UI called Claro, and a new Composer scaffold that means that even sites started from the tar.gz archive will be Composer ready.

Time to get ready for Drupal 9

The time is now to get ready for Drupal 9; it'll be here before you know it. To learn the latest about Drupal initiatives, follow @DropisMoving.

If you are a site owner, the best way you can get ready is to make sure you're up to date on the latest version of Drupal 8. From there, it'll be an easy upgrade to 9.

If you maintain a community module, or your own custom modules, you may have some work to do.  Many contributed or even custom modules only need a one-line change to be ready for Drupal 9. Check yours using: the upgrade status module, or the Drupal Check command line tool.

Drupal.org Update

Happy Holidays! We've wrapped a gift for you.

All engineering work on the Automatic Updates contrib module for Drupal is now complete. Pending any last feedback on the release candidate, the stable release of the module is scheduled for this Thursday December 19th.

If you're interested in supporting Phase 2 of automatic updates, with an A/B front-end controller, contrib updates, and support for updating Composer-based site installs, please contact the Association.

We want to thank: The European Commission, Tag1, Mtech, Acquia, and Pantheon for their support of Phase 1. When the stable release goes live we'll have a dedicated post talking about what's included in this first stable release and more completely thanking all of the individuals and organizations that helped us get here.

Updates to Update Status XML

The update status XML that Drupal.prg provides to inform all Drupal sites of available updates has been overhauled to include better support for Drupal 9, and to prepare for contributed modules to use semantic versioning. It now also includes support for more descriptive support and security information.

Session browsing improvements for Events.Drupal.org

November also saw us deploy some significant improvements to the session browser on Events.Drupal.org. With the call for papers ended and sessions under evaluation, we wanted to prepare a new experience.

Session Filtering and Search

Once accepted sessions are published for Minneapolis, you'll see new search facets and a title/description search that should make matching attendees with programming better than ever.

Our hard work behind the scenes

A lot of the work that goes into supporting the Drupal project and community happens behind the scenes. Visible improvements like the Automatic Updates feature, or even new releases of modules are just the tip of the iceberg. To make these things possible, the Drupal Association engineering team must keep the whole machine humming.

A large portion of the Drupal Association engineering team's work in November was spent on improving the services and infrastructure we provide to support Drupal core.

Drupal 8.8.0's release and its changes to Composer meant a rewrite of Drupal.org's packaging pipeline, updates to the Composer facade, and updates to DrupalCI to prepare for testing Drupal 8.9.x.

Supporting the automatic updates process required deploying a new Signing oracle server to sign and verify the integrity of update packages, as well as provisioning and deploying Hardware Security Modules (HSMs) to protect our root keys.

———

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:

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

Dec 17 2019
Dec 17

Our testing approach was two-fold, with one underlying question to answer: what is the most intuitive site structure for users?

Test #1: Top Task survey

During the Top Task survey, we had users rank a list of tasks we think they are trying to complete on the site, so that we have visibility into their priorities. The results from this survey informed a revised version of the navigation labels and structure, which we then tested in the following tree test. The survey was conducted via Google forms with existing Center audiences, aiming for 75+ completions.

We then used these audience-defined “top tasks” to inform the new information architecture, which we tested in our second test.

Test #2: IA tree test

During the tree testing of the Information Architecture, we stripped out any visuals and tested the outline of the menu structure. We began with a mailing list of about 2,500 people, split the list into two segments, and A/B tested the new proposed structure (Variant) vs. the current structure (Benchmark). Both trees were tested with the same tasks but using different labels and structure to see with which tree people could complete the tasks quicker and more successfully.

Dec 17 2019
Dec 17

When we are talking about tools for local development -- there is a huge variety of options. It is less and less common to set up LAMP stack locally. Instead more developers use docker based environments. In Drupal world there are quite a few of them: docker4drupal, Lando, Docksal, DDEV.

In my last few years I used to work with Docksal and recently also started using DDEV. In this article I would like to demonstrate the differences between the two.

Maintainers

Docksal was initially built by FFW team. DDEV is maintained by Drud Technology. Both projects have online communities and leaders.

Docksal

This is the first docker based system I started playing with.

What I really liked is convenience. You can run fin drush <command> or fin drupal <command> to run drush or drupal console commands.

Another big thing is auto-starting projects. You can simply hit the URL of the project in your browser and it will start the environment for you. Meanwhile, you still can manually run fin up or fin stop (fin project start / fin project stop) to start and stop projects.

You can control things like enabled/disabled XDEBUG from editing docksal.env file. Main idea that you use docksal.env for all your configuration. Meanwhile, if you need more granular configuration like custom environment variables or custom php extensions you can edit docksal.yml file and extend appropriate section.

If you like to enable / disable XDEBUG for example you can run fin config set --env=local XDEBUG_ENABLED=1 && fin project start or edit docksal-local.env file manually and then run fin project start.

Docksal comes with a concept of addons. These are shortcuts to install additional containers. For example if you need PHPMyAdmin simply run fin addon install pma and you’ll get appropriate container added to your configuration.

Here is a list of all integrations that Docksal provides https://docs.docksal.io/tools/.

DDEV

I got introduced to DDEV after I worked with Docksal. Because they are based on the same technology stack there are a lot of things in common.

For example same as with Docksal, configuration is stored in two files: /.ddev/config.yaml and /.ddev/docker-compose.yaml that looked very familiar. Meanwhile there are way more configuration options by default in “config.yaml” file. Definitively recommend to look through them.

DDEV by default already comes with Mailhog and PHPMyAdmin containers.

In DDEV all commands inside of container are triggered with ddev exec command example: ddev exec drush <command>.

DDEV doesn’t have autostart feature, so you need to run ddev start every time.

What I really liked about DDEV is that you can install custom php extensions and packages without the need to dive into docker internals. There is a configuration option “webimage_extra_packages” that accomplishes that.

In order to enable / disable XDEBUG you simply run ddev exec enable_xdebug and ddev exec disable_xdebug.

Which one to choose? DDEV or Docksal?

It is hard to say. Specially for me as maintainers of both platforms are very good friends of mine.

Both platforms are based on the same technological stack so you find them really similar.

I found Docksal being more friends towards less technical people. Its auto start feature rocks. Also it definitely has a lot of options hidden from user that is a good thing for beginners.

DDEV is tailored towards more experienced users -- it expose more things in configuration and make things easier if you need to customize your environment.

Can you use both?

Absolutely! The only place where projects overlap is NFS mounting. What I usually do when I need to switch between projects is enabling the proper mount.

For that on my Mac I edit /etc/exports file

# DDEV
/Users/ygerasimov -alldirs -mapall=501:20 localhost
# <ds-nfs docksal
#/Users/ygerasimov/Projects 192.168.64.1 192.168.64.100 -alldirs -maproot=0:0
# ds-nfs>

And then restart nfs with sudo nfsd restart.

But make sure you check documentation Docksal, DDEV if you are on Linux or Windows. I am sure milage will vary.

Happy coding!

P.S. If you liked this article you can support my side project Diffy.

Dec 17 2019
Dec 17

Created in 2004, and donated to the Apache Software Foundation in 2006 for open source publishing of the code, Solr Search has emerged into what many now consider to be the gold standard of enterprise search platforms. 

When developing Drupal 8 websites, this highly popular platform built on the Apache Java Lucerne library, is often proven to be the ideal solution and perfect fit for a website’s specific objectives and information architecture. 

But not always.

Among the considerations when integrating Solr Search into Drupal 8 sites:  

  • Solr Search usually requires the set up of a separate server. Drupal search, on the other hand can be set up with the installation of a module and the selection of a few settings. While Solr tends to require considerably more development work for sites that have a wide range of requirements, basic integration can be accomplished with relatively little effort if the Solr server is available.
  • Solr often represents the optimal solution for achieving great performance large sites with complex, highly updated content. For less complex websites, Drupal search and caching can also provide good performance.
  • Apache Solr comes with a set of great features (listed below), which may or may not be needed. These features will always need to be reviewed against the needs of the project to determine whether they will be useful. 

Preconceived Preeminence

Among Solr’s key achievements: the perception that it’s the best. It’s not uncommon that clients specifically request Solr as the search platform for their site. Our approach is to first seek to understand the big picture, dig deep into requirements, explore available options, and move forward with recommendations.

This exercise is incorporated into the Promet Source architecture workshops. We also create a detailed matrix of search requirements, identifying an entire set of search specifications and then ask the client prioritize them in order to inform the decision-making process.  

Prioritized search requirements may include features such as:

  • Spell check
  • Suggester
  • Keyword highlighter
  • Multiple character wildcard
  • Single character wildcard
  • Synonyms
  • Term proximity
  • Exact phrase boost

Range of Objectives

Clearly, one product owner’s idea of what constitutes ideal search capabilities differs from another’s. There is not one gold standard or ideal enterprise search platform, and as such, before discussing the functionality and relative merits of search platform options, we do the work upfront to understand the full scope of search criteria. Until this information has been gathered, one cannot effectively develop recommendations and move forward with decisions based on the search platform that aligns most closely with specific requirements.

Interested in looking beneath the surface concerning the search platform that meets your specific objectives -- or any other aspect of Drupal design and development -- contact us today.
 
Pamela Ross and Luc Bezier contributed to this post.

Dec 17 2019
Dec 17

GraphQL talks to Drupal in HTTP and the outputs are more structured than ever before!

Today, great customer experiences begin with great content. Content that is made available everywhere. With Drupal 8’s API-first initiative, the content that is managed by Drupal can be readily used by other systems over HTTP. REST (Representational State Transfer) provides a design standard for APIs. However, with client applications getting more complex and challenging, developers need a more modern and effective solution.

GraphQL was born out of the demand for a more flexible and powerful client-server interaction. It is a sophisticated query language and an execution machine. In 2012 Facebook created the specification for it, which describes its capabilities and the requirements of data models for headless applications. 

What is GraphQL? 

GraphQL is an adaptive standard for APIs and provides a runtime to fulfill those queries. GraphQL gives a complete and reasonable details of the information in your API. It's developed with an ideology of "Ask for what you need and get exactly that". It empowers the client to fetch for the exact response they need from the API, nothing more - nothing less. 

GraphQL Advantages

Few of the many advantages of using GraphQL for Drupal -

  1. Faster frontend development

    Emphasize quickly on applications without waiting for new backend endpoints. Improve data fetching and code maintenance by getting the data in the shape you need.
     

  2. Ask for what you need and get exactly that

    It provides the exact response the client asked for. It always returns predictable result. Applications using GraphQL are also stable because the application controls the data it gets, not the server.
     

  3. Use your existing data

    GraphQL can be used with any existing infrastructure e.g. REST, SOAP or existing database, or anything else. It allows you to query all the data in a single request and provides you a cleaned predictable response.
     

  4. Fewer bytes and roundtrips

    Using GraphQL all the required data can be fetched using single query. It’s makes the
    application faster.

drupal-graphql
                                 GraphQL with Drupal 8

REST vs JSON:API vs GraphQL

If we compare these three according to request efficiency, JSON:API and GraphQL are excellent. Because in a single request JSON:API and GraphQl can serve all the required responses. In case of JSON:API, sometimes we have to tailor the response but when it comes to GraphQL, it only serves what we need. REST is slower as compared to these, because multiple requests are needed to serve the common needs. 

In terms of operational simplicity and implementation, REST is the easiest, it has been there for quite a while now. JSON:API also works out of the box with CDN and reverse proxies. For GraphQL extra infrastructure is needed and client libraries are necessary to implement it. 

It’s easier to use web cache in REST and JSON:API as compared to GraphQL. In GraphQL, there’s only one endpoint (most of the time an HTTP POST endpoint) where all the queries are sent. Since each query can be different, it is harder to use this type of caching.

The Drupal GraphQL specification supports bulk/batch operations automatically for the mutations you've already implemented, whereas the JSON:API specification does not. The ability to perform batch write operations can be important.

Installing GraphQL for Drupal 8

The Drupal GraphQL module supports all the GraphQL specifications and can be used to build and expose GraphQL schemas. The latest alpha release of the Drupal 8 module in the version 8.x-4 offers a capability for Drupal modules to extend the schema with a plugin.

Here is where you can install Drupal GraphQL module from - https://www.drupal.org/project/graphql
You can install using composer command.

composer require 'drupal/graphql:^3.0'

It will provide you two modules GraphQL Core and GraphQL. You need to enable both the modules. You can enable it using drush e.g.

drush en graphql
drush en graphql_core

Queries with Drupal GraphQL

Drupal GraphQL module provides a tool called GraphiQL. It’s a powerful tool and has an interactive UI with functionalities like auto completion. Using this tool, you can run queries and get outputs. Navigate to – “/graphql/explorer” for the interface.

You will get a UI that looks like this –

GraphQL-UI           
           GraphiQL UI

On the left side panel of this UI you can write a query and on the right side, you will see the results as an output in JSON format. Clicking on Docs at top right corner, will get you the documentation of the available queries. Query Variable section on the bottom left panel can be used to pass query variables.

Examples

1.Querying Nodes

Quering-nodes-graphql            
            Drupal GraphQL - Querying Nodes

2. Querying Taxonomies

Drupal GraphQL - Querying Taxonomies      
           Drupal GraphQL - Querying Taxonomies


3. Querying Routes

Drupal GraphQL - Querying Routes
          Drupal GraphQL - Querying Routes

4. Query Fragments

Drupal GraphQL - Query Fragments
          Drupal GraphQL - Query Fragments

5.Filters

Drupal GraphQL - Filters
            Drupal GraphQL - Filters

6. Filters with conjunction

Drupal GraphQL - Filters with Conjunction
         Drupal GraphQL - Filters with Conjunction

Other available operators are: 

  • EQUAL
  • NOT_EQUAL
  • SMALLER_THAN
  • SMALLER_THAN_OR_EQUAL
  • GREATER_THAN
  • GREATER_THAN_OR_EQUAL
  • IN
  • NOT_IN
  • LIKE
  • NOT_LIKE
  • BETWEEN
  • NOT_BETWEEN
  • IS_NULL
  • IS_NOT_NULL

Conjunctions can have two values

You can also use Groups to write more complex queries.

7.GraphQL variables

Drupal GraphQL - Variables
           Drupal GraphQL - Variables

Mutations

In GraphQL, a mutation is the terminology used whenever you want to add, modify, or delete data stored on the server. In this case, Drupal. Unfortunately, the module does not include a way to perform common mutations out of the box due to some technical requirements of GraphQL.
Example code for creating, deleting, updating, and file uploads, can be found here: https://github.com/drupal-graphql/graphql-examples

Example mutation:

Drupal GraphQL - Mutation example
           Drupal GraphQL - Mutation example

Drupal GraphQL with Twig

Using Drupal GraphQL with Twig can significantly improve the performance of your website. Here’s how – When you inject data into the Twig template, you can fetch all the required data using a single API call. Moreover, because the client controls the data they get and not the server, it makes the process even faster.

To use Drupal GraphQL with Twig we need the GraphQL Twig module. To download and enable it, use the following commands:

composer require 'drupal/graphql_twig:^1.0'
drush en graphql_twig

And then you can use GraphQL query in your website e.g.

{#graphql
query {
  admin:userById(id: "1") {
    uid
    name
  }
  user:currentUserContext {
    uid
  }
}
#}

You will get the response data in the GraphQL variable.

Dec 15 2019
Dec 15

I have to say, I was skeptical about dark mode in our current operating systems, but since wiring it up to switch to it automatically after sunset, I’m a believer. I know some people always operate their in dark mode, and that's not for me. I prefer the light on my screen to match the light of the day. It's especially nice to have my iPhone in dark mode at concerts, so I can avoid being "that guy" who blinds the person behind me,

Websites now respect the system setting of dark mode, and ever since Jeff Geerling updated his site's theme to support dark mode, I had on my list to do the same.

It turns out that the Responsive Blog Drupal theme, a very nice theme that does what it says on the tin, has a switch for turning on the dark mode version of it. I'm glad I realized that most of the work had been done for me, and I've submitted a patch to the project for review.

The last frontier of dark mode based on system setting is third-party JavaScript widgets. None of the 3 widgets on my blog, to my knowledge, have the ability to switch automatically.

Dec 13 2019
Dec 13

Learn how Drupal Association membership can help you secure discount on Drupal Minneapolis full ticket and summits registrations!

Dec 13 2019
Dec 13

A number of significant improvements have been introduced with Drupal 8.8. The update was released in December 2019 and significantly deprecated a lot of elements in the process of preparing the codebase for Drupal 9. The release has mostly focused on improving the management and contribution that will aid the impending update.

Let’s take a tour of updates introduced in Drupal 8.8.0

a woman typing on a laptop keyboard

#1 Media embedding in Drupal 8.8!

Like a final nail in the coffin, we have received the much-awaited media embedding update in this release. With the WYSIWYG integration, Drupal 8.8 completed the decade long wait for the site builders.  

The poorly handled media embedding is now easier for the content creators who wish to develop and integrate media embedding. 

#2 Claro is now a contributed project

The responsive theme, Claro is the new Drupal admin theme with an improved look and enjoyable perspective. As a new administration theme, it will bring a fresh design perspective to Drupal. Here’s a before and after screenshot for comparison. 

Clearly, the clean, concise, and enhanced look adds to the web accessibility factor, too. In Dries Buytaert’s feedback, the Claro theme has never looked this better or more accessible. 

#3 Composer in Drupal core initiative

With multiple composer plugins and templates launched in this release, Drupal development will become more in line with the PHP standards. The PHP dependency management tool will have Drupal/core-composer-scaffold, Drupal/core-vendor-hardening, and Drupal/legacy-project as the new components that will support an easy transition path for sites. 

#4 JSON:API module to be prompt and fast

The Drupal 8.8 update empowered and resolved these issues:

  • The include paths are now resolved for every resource in a resource collection. 
  • The resource normalization is no more leveraged or shared
  • And the resourceTypeRepository computes ResourceType value objects on every request

These changes prompted a growing ecosystem of contributed modules and thus, the JSON:API can create faster working and communication by eliminating the need for an ad-hoc code. Additionally, this update opened gates for an API-first future for Drupal websites with improved capabilities. 

#5 The Content Moderation and Workspaces modules are now compatible to be used together! 

This is an update for the two core modules for content workflows: Content Moderation (D8.3) and Workspaces (D8.6)

Earlier the two modules used to create a clash in the latest revision and showed only the latest workspace-specific revision. Now, the workspace can be published to Live now without entities requiring to reach a publishable moderation state for entities in draft (non-default/unpublished) moderation states in a workspace. They both can work in sync and create custom workflows too with interesting capabilities.

#6 End of life for jQuery UI from the Drupal core

In the process of switching to JavaScript solutions only phase, the Drupal core is doing away with jQuery UI which allowed developers to add experience components to their code. This collection of widgets is being deprecated for now and will be permanently removed in the upcoming Drupal 9. For modules and themes dependent on it will have to find a replacement contributed to the project. 

#7 Configuration Management improvements

If your settings are still on $config_directories, you need to make a move. Either to $settings or another storage option. This change began with Drupal Configuration Initiative 2.0 implemented in the release of Drupal 8.6. 

Now, the Drupal 8.8 configuration management will see new improvements starting with relief for developers who had to rely on contrib solutions such as Config Split for separating the development configuration.

#8 Path aliases have been converted to revisionable entities

A new path_alias revisionable content entity type will now provide custom URL aliases in Drupal 8.8. Its hook is deprecated and it recommends code changes for the new system that will be launched with Drupal 9. 

#9 Help topics are now searchable with Experimental Module

As a new Experimental module, plugin-based help topics can now be added, along with a few new help topics. Developers can provision helpful instructions in Twig files, the topics can be categorized according to complexity and tasks, and you can add help topics from the browser.

Outcome 

These updates are surely a huge shift from the existing Drupal 8 version. More than being a way of advancing, it is a wake-up call for many who are still on Drupal 7. 

The next Drupal 8.9 release will give closure to Drupal 8 updates and give way to Drupal 9. It will not make Drupal 8 insignificant but will surely affect the current workings. We are super excited to welcome the all-new Drupal 9!

Drop us a line at [email protected] to know more about Drupal 9 and our plans. 

 

Dec 13 2019
Dec 13
User-friendly event schedules with the Smart Date Drupal 8 module

ebsites that host various events have their own usability secrets. Among the tips for building a great event website, perhaps the most important is the “what, where, when” of your conference — the event’s date, time, venue, and key subject should be clearly displayed in the website’s prominent place.

Read more
Dec 13 2019
Dec 13

More user-friendly, more intuitive, more accessible — this is what modern websites should be. One of the key aspects of improving website accessibility is enabling keyboard navigation.

The newly released Drupal 8.8 is great in this arena — it introduces keyboard accessibility for quickly adding media from Media Library to CKEditor’s content with no mouse.

Let’s see this in action — video included! And if you want to see this (and many other cool new features) right on your website, schedule an update to Drupal 8.8 with our Drupal experts.

Why keyboard accessibility is important

Undoubtedly, website accessibility is vital for business reputation, your website's traffic, audience, SEO, and overall user-friendliness. And website accessibility would be incomplete without keyboard accessibility — see why.

Many users prefer keyboard navigation to mouse navigation because they find it more efficient. However, for users with particular disabilities, it’s not a matter of preference — they simply have no choice, so keyboard accessibility is essential. These cases include:

  • motor impairments, tremors, loss of muscle control (users cannot hold a mouse properly)
  • visual impairments (users rely on screen readers and cannot see where to click the mouse)

That’s why respectful brands include keyboard accessibility in the requirements to their websites. And it’s now easy with D8.8!

The particular feature we are discussing today is about keyboard accessibility in creating content and adding multimedia. In addition to admins and content editors, it will be helpful to all users on a wide variety of websites that allows content creation. Let’s go.

Keyboard accessibility as final touch in Drupal’s media ecosystem

It looks like keyboard accessibility is the final stroke in Drupal 8’s perfect media handling ecosystem. Up until the D8.8 release, users and editors have been enjoying other new features in this sphere:

  • With D8.6, came easy media handling with saving and reusing it in Media Library and embedding it into the content. The oEmbed feature allowed everyone to easily add YouTube or Vimeo videos through links.
  • D8.7 gave us the new attractive and user-friendly Media Library interface with bulk uploads and other useful features.

Finally, Drupal 8.8 has introduced Media Library and WYSIWYG integration to add media with a simple icon in the content editor. It has also made the Library stable so it is absolutely ready for live sites. And keyboard accessibility has finally brought the beauty and interactivity of multimedia close to everyone — no need for a mouse!

Tweet about keyboard accessibility in Drupal 8 Media Library

How it works: Drupal 8's keyboard navigation in adding media to content

To embed some items from Media Library using keyboard accessibility opportunities, users can:

  • move to the CKEditor toolbar (“Alt” + “F10” on the keyboard)
  • find the Media Library icon (“Tab” + “arrow keys” on the keyboard)
  • open the Library (“Space” or “Enter” on the keyboard)
  • move around the Library interface to select items (“Tab” + “arrow keys” on the keyboard)
  • select the desired item (“Space” on the keyboard)
  • edit the item’s ALT tag, position, and caption (“Enter” on the keyboard)
Selecting media to embed in Drupal 8.8 CKeditor from Media Library
  • move to the “Insert selected” button (Tab + arrow keys on the keyboard)
  • embed the item into the content (Enter)
Embedded media into Drupal 8.8 CKeditor from Media Library

Note: please keep in mind that the correct key commands may depend on the version of the OS.

A video is worth a hundred words, so see how keyboard accessibility works for media embedding in Drupal 8.8.

[embedded content]

To get the Library icon on the CKEditor dashboard, it’s necessary to first add it to the active toolbar by dragging.

Adding Media Library icon to active toolbar in Drupal 8.8 CKEditor

Drupal will also ask you to enable the “Embed Media” filter below.

Enabling the Embed Media filter in Drupal 8.8 CKEditor

Of course, the Media and Media Library modules should also be enabled. It is also possible to add multiple media fields as part of your content type structure, which is covered in the blog post on media handling by our colleagues from Drudesk. For example, every your blog post could have 3 videos, 5 photos, and so on, built into its structure.

Let your website have the latest features!

Indeed, keyboard accessibility in Drupal 8 looks great. We can help you with its setup on your website. Entrust our web development agency with smoothly updating your website to Drupal 8.8 — and let your website follow the best digital trends in keyboard accessibility and much more!

Dec 13 2019
Dec 13

Acknowledged as one of the most popular online activities, online shopping is considered one of the key contributors in taking up global e-commerce sales to 3.53 trillion US dollars in 2019, with e-retail revenues' projected growth of approximately 6.54 trillion US dollars in 2022.

Desktop PCs are still the most popular devices among users for placing orders; however, mobile devices, especially smartphones are getting up to speed to deliver seamless digital experiences.

Drupal has modernized itself from being just a pure WCMS to a full-grown e-commerce site builder 

As more enterprises have taken their core businesses on the internet, Drupal has adapted itself well enough from being a pure website content management system to a full-grown e-commerce site builder. 

Though e-commerce is not yet a part of Drupal’s core, it extends its support in the form of contributed modules. The e-commerce community in Drupal stays active by introducing revolutionary features to help build simple, powerful, and intuitive sites.

This blog illustrates those e-commerce modules which smoothens enterprise mission-critical operations that drive business results and have a direct impact on the bottom line.

But Why Drupal?

In case you have already ventured into e-commerce or are planning to, you should never underplay the essential role of the technology as it takes on a critical role in helping you reach millions of customers digitally and make your company rise and shine into a vibrant & flourishing business.

Considering that fact, Drupal can prove lucrative in creating a stable online store with its ability to provide an attractive and clean design, leading to engaging user experience and increased conversions and revenue.

Read on to find out why you should capitalize on Drupal only to make it big in your e-commerce venture-

  • Implicit SEO Tools

It helps you out in taking your Drupal-powered website on the top ranks of the search engine results

A lot of e-commerce websites become lost in the shuffle and fail to garner the attention of people from various sections of society. However, with Drupal, you require minimum support of SEO experts as it already comprises of SEO Checklist module, built-in URL optimization, advanced.htaccess, and other analogous useful tools. Thereby, it helps you out in taking your Drupal-powered website on the top ranks of the search engine results.

  • It Is Powerful and Multi-skilled WCMS

Today, making customers place their orders is not the ultimate goal of e-commerce sites. Rather it is to engage them through blogs, forums, community, articles, and reviews around products to attract the new ones and at the same time, keep the existing ones loyal towards the brand. 

These features can be easily integrated and administered to your e-commerce site with a groundbreaking system like Drupal.

  • Seamless Integration With Third-party Solutions

Drupal allows effortless and seamless integration with third-party solutions, like Acquia Lift for enabling personalization on your site to deliver customized results to users, or Smart Content module for Account-Based Marketing. All this can be done through the RESTful API. Or you can also employ the Feeds module, which lets you import content from external data sources.

  • Fast Deployment

Drupal ensures that you get many capabilities and functionalities fresh-out-of-the-box without paying exorbitantly

The type of framework you handpick for designing your e-commerce site also relies on the speed of the deployment of the end solution.

Drupal, with more than 40K modules, ensures that you get many capabilities and functionalities fresh-out-of-the-box without paying exorbitantly. Simply put, Drupal provides all the tools utilized by the most renowned marketplaces of the world successfully for a long time.

  • It Is Secure

There are more than 45,000 developers lending their support to the community & making every effort possible to combat all security risks that may occur, ensuring that the information in your store, as well as your client’s data, is out of reach of intruders and malicious attacks.

  • Seamless Mobile Experience

Drupal-based pages are already created with responsive web design guidelines in mind and are adapted to modern smartphones, thereby; saving you from creating separate mobile-specific websites. Further, it can deliver content directly to mobile apps.

Drupal Modules To Help You Get Your E-commerce Site Going

The most suitable modules that can help you build your out-of-the-box e-commerce site swiftly are listed below-

Drupal Commerce module makes a great fit for small and large businesses alike as it is highly flexible, scalable, and customizable. Users can create several types of displays and product categories with this module and simultaneously manage the payment procedure and orders efficiently.

Get your Drupal site up and coming with Commerce Kickstart in an accelerated way with its built-in configurations and modules, making the whole procedure of launching an online store quick and easy.

Those running their site on Drupal 7, two versions of the module are available: both 1.x and 2.x. For those running their site on Drupal 8, you’ll need the Drupal Commerce 2.x installer.

It provides you the flexibility to tailor more complex shipping scenarios while your business grows at every stage

Chances are high that if you are selling products online, you are shipping them too. 

So, instead of setting a constant shipping price, let this module calculate a cost for shipping based on the customers’ location at the checkout stage.

Commerce Shipping can also be integrated well with other shipping modules, like Commerce Flat Rate or Commerce UPS. Indeed, it provides you the flexibility to tailor more complex shipping scenarios while your business grows at every stage.

Keeping track of your customers’ transactions has now become easier with Drupal’s e-commerce Invoice module, where you can generate invoices for each purchase, for yours and your customers’ records.

 It has an abundance of invoice templates from which you can select the one that best suits your needs. Also, you have the option to view and download your invoices in PDF format, as needed.

Enterprises can boost their revenues per order with cross-selling and upselling techniques. Both Commerce Recommender and UberCart Recommender are the Drupal modules that you should install to enable cross-selling on the Drupal Commerce and Ubercart platforms, respectively.

Both modules help in triggering personalized messages and product recommendations for web users

Both modules help in triggering personalized messages and product recommendations for web users. The suggestions are based on users’ current orders and previous purchases.

This module also comes in handy when the user is new on the site and the software doesn’t have any prior purchase history to refer to for making any suggestions.

In such a scenario, these cross-selling modules analyze the purchase history of other users who previously bought the same product in the current order and hence recommend products that these users ordered in the past.

Even though phenomenal growth and new trends are being observed in leveraging social media, email marketing remains an undivided strategy of any online marketing plan. 

Marketing and sales campaigns are regularly employed by sending emails to people on subscription lists. 

The Mailjet module works on Drupal Commerce for running email marketing campaigns while the MailChimp E-commerce module supports both Drupal Commerce and Ubercart.

To get started with the module, you need to first signup with the respective company. The services are free, however, the email volume should be kept below a certain threshold. 

Both modules enable site administrators to create email campaigns, personalize the marketing messages, and track campaign efficacy. 

Learn more about the modules from the video

[embedded content]

It is adept in automatically tweaking the display format of price information based on the location of each online shopper

E-commerce gets its customers on its radar from the farthest and remotest countries of the earth, with all having different local currencies. Thus, the online store should be capable enough of converting product prices for customers as per their geographical location. Besides, the freshly converted local amount must be showcased in a format that conforms to the customers’ regional convention.

This module specializes in converting world currencies based on stored exchange rates. Besides, it is adept in automatically tweaking the display format of price information based on the location of each online shopper.

This module identifies the visitors’ IP address to recognize his or her geographical location (the country) of the user and store it in its database.

You can also perform your lookup on the data via a function to use the data in the way you want to. Besides, it automatically updates the IP-country database and admin spoofing of an uncertain IP or Country for testing purposes.

The technology behind maintaining this database is for establishing a link between IP address and Country is hosted and maintained by ARIN, the American Registry for Internet Numbers, therefore the database is 98% accurate

With the aim to remarket the product to the customer that he or she left in the shopping cart, this module saves the product for a later purchase. Products added to the wishlist display image of the product, add to cart button, stock, and price.

It also comes with a wishlist page showcasing a similar interface to Commerce’s Shopping Cart and a block.

Recurly, when integrated within Drupal, relieves you from subscription billing service and management. It can work alongside your existing payment gateway or merchant account or you can use the included Recurly Gateway.

With basic integration from Drupal, it includes receiving push notifications from Recurly.com. It also comprises of built-in pages for users to view invoices, subscriptions, and to upgrade/downgrade their subscription level.

Customers can easily and securely make payments in your Drupal Commerce shop without needing to leave the site

The Commerce Stripe module integrates well with Drupal commerce to support the tokenized payment gateway. This way, customers can easily and securely make payments in your Drupal Commerce shop without needing to leave the site.

The Physical Field module provides an API for storing and controlling physical measurements. It supports all kinds of unit conversions-

 It lends its support to measurement types like Area, Length, Volume, and Weight.

It also supports these following field types-

  1. Physical measurement: Stores a single measurement and it’s unit.
  2. Physical dimensions like length, width, and height along with its unit.

Commerce Stock assists in stock management for Drupal Commerce stores.

The other features include enabling and disabling the add to cart form, checking the cart form submit, checkout submit, and review submit, stopping the user from checkout in case the order contains out of stock items, and advanced configuration of the add to cart button for more control.

This module adds coupon functionality to Drupal Commerce through integration with the Commerce Discount module. You can add any number of coupon codes to a discount. Customers need to enter coupon code during checkout to activate the related discount. If there are some terms and conditions on the discount that prevent it from being applied to the order, the customer will be notified of the same.

Otherwise, the discount will be applied and the customer will see that the coupon has been redeemed.

This checkout progress block has been added to the core. It adds a block visible on the checkout pages to find out on what step of the checkout process the user is currently on. The status is an unordered list with each checkout page title being an item. 

The Commerce Message module integrates order-specific messages into it, such as order paid, product added to the cart, admin comment, order confirmation sent after checkout complete. A history view option appears to display all messages for a given order

Commerce File module widens the Commerce License ability to sell access to files. Whenever a user buys a product, he or she gets access to all files attached to that product’s commerce_file field.

This adding up of new files to the commerce_file field makes them available instantly to all the users who have an active license.

This module facilitates you to add new customer profile types for the Commerce module using a UI. So, in case you want another customer profile type other than the default billing pane in Commerce, then you can now easily do so by using this module. 

Similar to that of adding fields to the billing profile type and controlling how the fields are displayed, you can add new profile types to the ones you create here too, using this module.

In the End

Drupal does not only work as a driving force for content but also makes up an essential element in designing your e-commerce site. You can leverage the best of both the worlds- Drupal’s flexibility as a CMS in combination with e-commerce, to suit your business no matter at what stage it is!

Further, knowing about the ideally-suited modules as per your requirements can help you in kicking off the ideal site, or to improve the site that you already have. Either way, you’ll need developers to install these modules for you.

Srijan Technologies can assist you in taking your site up a notch. Whether you have decided to switch to Drupal, or fine-tune your existing site; it can help you to assure the success of your e-commerce site. Talk to us now!

Dec 12 2019
Dec 12

Drupal core 8.8.0 is released on 4 Dec 2019 and with it, and the first thing everyone should try is the new Claro admin theme.

The current default admin theme "Seven" in Drupal 8 was picked up from Drupal 7 with some modifications and since then we didn't see many changes in it. Admin theme is one of the first interactions of site owners with Drupal and not having a modern admin design out of the box.

Claro theme is a result of the Drupal admin UX Study in which content editors were asked to share their experiences and suggestions. And one of the biggest outcomes was that the Drupal admin interface is not that appealing to first-time users.

Claro theme was built in compliance with Admin UI & JavaScript Modernisation initiative to produce a re-imagined content authoring and site administration experience.

Here is how the new Claro admin theme looks like.

Drupal 8 Claro accessibility

Drupal 8 Claro mobile experience

Drupal 8 Claro content view

Claro theme is still in the experimental state but this is something that can be enabled or disabled any time if you find any blocker issue. So if you haven't tried the new Claro admin theme then you are missing on an amazing admin experience on your Drupal 8 site, just give it a try.

How to enable Claro admin theme in Drupal 8:

  1. First thing first, update to Drupal 8.8.0.
  2. Log in as administrator and go to `admin/appearance`.
  3. Look for the "Claro 8.8.0 (experimental theme)" theme and click on "Install". Note: Don't click on "Install and set as default" because it will make Claro as your default theme for the frontend as well.
  4. Once the Claro theme is installed, scroll down to the "Administrator Theme" section, select "Claro (Experimental)" from Administrator theme options and submit.
  5. ENJOY!
Dec 12 2019
Dec 12

Never fear if you thought you missed your chance to submit a talk to MidCamp 2020. We want to give everyone one last chance to submit their session ideas, so we’ve extended the call for proposals deadline to Wednesday, December 18. 

Submit your talk while you still can

Will you join us at MidCamp?

You might notice something different with MidCamp’s tickets this year. At MidCamp we’ve long had an underlying Alice in Wonderland theme, from our Drupal-hatter, to Alice coloring books, to maddening our logo. This year, we’ve Alice’ed our tickets. 

Check out our site for more info about this strange new world…Oh, and just a hint, the early bird gets the worm, and the worm is a really good deal only available for a couple more short weeks. Register for O’MidCamp today

As always, thank you to our current sponsors and future sponsors like you.

Dec 12 2019
Dec 12

So you heard of React, the JavaScript library developed by Facebook for creating fast and interactive user interfaces, and thought “Wow! It would be awesome if I could use this with Drupal.”

Well, today I will show you exactly how you can add React to any Drupal site, as well as provide you a module with all the boilerplate code required to get you up and running with React as quickly as possible.

Before getting started, we need to understand decoupling. Decoupling is the idea of separating content management from content presentation. In a traditional or coupled Drupal site, Drupal is responsible for both content management and content presentation. I won’t bore you with long drawn out explanations, just know there are two common approaches to decoupling Drupal.

Headless:

Content Management: Drupal

Content Presentation: Any Front-End Framework (Angular, React, etc.)

Progressive:

Content Management: Drupal

Content Presentation: Drupal + Any Front-End Framework (Angular, React, etc.)

Headless decoupling is perfect for building something like an Android or IOS app because Drupal runs only on the back-end and your entire front-end code can be written in a device’s native language or any front-end javascript framework.

More often than not, you don’t need a full headless implementation, but just one or two highly interactive elements on a few pages of your website. This is Progressive decoupling where React is used as part of what a user sees on the page. In this case, Drupal’s standard theme layer is responsible for outputting the primary user experience, and React is used to enhance it.

Progressively Decoupling Drupal

Before we install the React module and start writing any code, we need to configure Drupal to send data to the React app via an API (application programming interface), we can very easily do this with the Views and RESTful Web Services modules included in Drupal core.

Login to your Drupal site

  1. Navigate to Manage > Extend
  2. Enable the following modules:

  1. Navigate to Manage > Structure > Views
  2. Create a new view as a REST Export and provide an endpoint for your React app to access:

In this example, we’re creating an event list. However, you can use any data from Drupal you’d like (content types, paragraph types, users, taxonomy, etc.).

I like to prefix all my endpoints with “api” to avoid any conflicting path names

  1. In your newly created View under Format > Settings select JSON
  2. Then add and configure all the fields you want to export

To make sure everything is working, navigate back to the homepage of your Drupal site and add your API path to the end of the URL- in my case it is http://mysite.local/api/events. You should see a JSON object containing key/value pairs of your field names and their respective content.

That’s it! Now we can add React.

Install the React Module

Setting up a standalone React app is a quick and easy process using the “create-react-app” script. However, it’s not that simple when using React within a Drupal module. Luckily for you, I have already created a sandbox React/Redux Boilerplate module so you can skip all the setup and get started writing your own React code right away.

To install the module, visit https://www.drupal.org/sandbox/kemanewright/3096257 and follow the detailed instructions on the project page to get started. 

Using the React Module

This module works great in any scenario where you want a few highly interactive elements on a few pages on your site, because it’s using the Drupal block system you can place it anywhere on any content type you need. Maybe you’re building an appointment or event scheduler and need a calendar and posts feed that updates in real time, this is a perfect scenario for React.

Further Module Documentation

This session from Texas Camp covers everything you need from Drupal to React/Redux basics, with a more thorough example of this module in action utilizing POST and DELETE requests as well.

If you’re completely new to React and/or Redux, I highly encourage you to read some documentation before getting started.

Whether you’re a Drupal developer with little React knowledge or a React developer with little Drupal knowledge, you can get up and running with this module in a matter of minutes. I recommend you give progressive decoupling a try and spice up the user experience of your next site.

Dec 12 2019
Dec 12

Last month, I attended Acquia Engage in New Orleans. My goal was to gain a better understanding of Acquia’s Digital Experience Platform (DXP). Personalization and marketing automation using products like Acquia Lift and Mautic are the latest trends in building ambitious digital experiences, and I think they are here to stay. One of my takeaways from Acquia Engage is personalization can make our lives better.

Personalization

I see personalization having two possible impacts on digital experiences:

Personalization can try to sell more products and services to users, or it can sell a better product and provide better service.

I lean toward the latter because I’d rather have a company make it easier for me to buy the things I want, rather than a company trying to sell me something that I don’t need or want. On a side note, I am gradually becoming obsessed with Voice Assistants, like Alexa and Google, because they have to potential to make our lives easier. For example, I would love to have Alexa buy me movie tickets at my local theater in one or two voice commands. For this to happen, Alexa is going to need to have a comprehensive user profile about me, which is then used to create a personalized voice experience. We are not exactly there yet, however, soon personalized digital experiences are going to be the norm. The immediate challenge is figuring out how to get there.

Crawl, Walk, Run Methodology

Personalization is challenging to get started with, which is why everyone is using the “Crawl, Walk, Run” methodology for gettings up-to-speed with personalization. “Crawling” begins with collecting data, “Walking” starts when organizations can understand and segment their users, and finally “Running” is creating personalized, individualized user experiences. To me, the real lesson of the “Crawl, Walk, Run” methodology is its emphasis on the value of stepping back from a complex, challenging problem, figuring how to understand the problem, followed by outlining a solution, and finally implementing the solution.

The Webform module tries to solve the problem of collecting and distributing user data via forms. For personalization to work, user data needs to be collected from multiple channels and data points. Webform is one of many data points within a person’s user experience.

Webforms and Marketing

“No, the Webform module is not a marketing automation module but is one of the most vital building blocks of an integration between Drupal and other third-party marketing automation software.”

The blog post then proceeds to highlight some marketing-related modules, including a few CRMs and Mautic. Shefali’s blog post does a great job of showing what’s possible with marketing automation and recognizes that webforms are a key part of the process of connecting with users.

Webforms and Data

A form is one of the largest data points when it comes to personalization and marketing. Forms are one of the only data-points where users deliberately and intentionally share a lot of information with an organization. A well-designed and easy to complete form can collect a lot of valuable information about a site’s users. In some cases, forms are the most immediate indicator of a website’s ROI, because a user filling out a form is either a potential or actual paying customer. It is important to ensure that users can and will fill out a form.

Webforms, Testing, and Variants

Building intuitive, easy-to-use, and accessible forms is a good investment that leads to better user experiences. Building a great user experience requires an iterative process of planning, implementing, testing, and improving. The best way to confirm that an improvement or experiment is successful, is to perform an A/B test where the original and improved variant is randomly presented to end-users, and each variant’s success rate is tracked and then compared. Being able to create variants of a webform makes it easier to create A/B tests. Webforms that support variations should also be able to support personalization.

A variant is a form or version of something that differs in some respect from other forms of the same thing or from a standard.

-- https://www.lexico.com/en/definition/variant 

Webforms and Personalization

Good personalization begins with finding a common starting point and then tailoring the user’s journey. For example, a user visits your homepage and the different targeted variation of the banner changes based on the user’s demographics.

Shouldn’t forms be able to provide personalized user experiences?

The Webform module supports conditional logic, which can hide/show or require elements based on inputted and computed values. Conditional logic is limited when it comes to which aspects of a form’s user experience can be changed. For example, replacing a form’s labels, descriptions, and behaviors is not supported by conditional logic. Conceptually, personalization means any aspect of a user’s experience should be alterable as long as it provides value.

Being able to personalize a webform sounds like a daunting task, especially considering many people, including myself, are still getting comfortable with personalizing a callout on a homepage. Using the “Crawl, Walk, Run” methodology might be the best way to take on the challenge of creating a personalized webform and figure out the best approach to implementing them.

Crawling - A/B Testing

Crawling begins with collecting data and testing a hypothesis.

Personalization can only begin when user information and statistics are collected and analyzed. Most websites have some basic page views analytics setup. If, after completing a form, users are directed to a dedicated confirmation page, which is the default behavior for a webform, then form completion rates are already being tracked. Knowing if a form is completed makes it possible to perform some A/B testing.

A/B testing allows teams to start thinking about how they can improve a form’s user experience, test their theories, and collect meaningful data. Frankly, before any form personalization can begin, teams need to understand their users and provide a thought-out baseline user experience. Knowing if a website’s targeted audience is okay with long multi-step forms compared to short compact one-page forms helps designers and site builders to establish user experience guidelines and style guides.

The goal of A/B testing is to start collecting meaningful data about users and to start improving user experience by gradually testing and confirming the success of small improvements in a form. A/B testing encourages digital teams to think about the different variations of a form, which then leads to building form variants that target specific audience segments.

Walking - Segmentation

Walking starts when specific audience segments are targeted.

Instead of building form variants to A/B test a hypothesis, segmentation is creating form variants that target specific audiences. The goal is to create a tailored user experience that makes it easier for different types of users to complete a form. Segmentation could be as simple as showing and hiding form questions based on conditional logic. Advanced segmentation would entail changing the language, messaging, and tone of a form based on the current user type.

For example, on an appointment request form, changing an input’s label depending on whether someone is a patient or caregiver could make people feel more welcome. Asking for ‘Your first name’ or the ‘Patient’s first name’ is more direct than just the label ‘First name’. This might seem like a silly and nuanced change, but take this example and apply it to a form being completed using a screen reader or a voice application. We should all care about form accessibility, and one day our forms are going to have to be voice friendly. Forms are going to have to be personalized based on the current user’s information.

Another benefit of segmented forms is the submission data could be saved to the same place with the first piece of data being the user type/segment. Once we have a comprehensive user profile then we can start thinking about personalization.

Running - Personalization

Running occurs when a form is personalized to an individual user.

For me, a personalized form means a lot more than conditional logic and segmentation. A personalized form might begin with fully identifying a user and pre-filling in any known information. Form labels and descriptions might include a user’s name with appropriate pronouns. A truly personalized form’s user experience should interact and respond as a user enters information.

A personalized form is going to have to ask the right questions, in the appropriate tone and at the right time.

Voice user interfaces (VUI) are still evolving with the end goal of computers, with AI being able to engage in seamless conversations. Forms are currently one-sided, somewhat stilted conversations with a user that collects information. Personalized forms should be a flowing intelligent, even empathetic, natural, and productive conversation with a computer.

My hope is a personalized form’s user experience, possibly through a voice user interface, will result in the end-user simply feeling that they just had a pleasant conversation with a computer, which helped them get what they need. We are most likely a decade or two off from this goal; for now, we need to start crawling and walking for a few years, and then we can move on to running.

What’s next?

For any type of personalization to occur in the Webform module’s user experience, webforms are going to have to start supporting variants. Being able to create and manage variations of a webform will open up the Drupal community to performing A/B tests and building out segmented forms.

I am actively working on adding variant support to the Webform module. I will follow-up this blog post with a more technical post about how to use webform variants to create A/B tests and segmentation.

To build that impossible ‘pie-in-the-sky’ intelligent, personalized form user experience, we are going to build extensible and reusable APIs that hook into personalization engines and inspire the Drupal community to do what it does best…collaborate. As always, I can’t wait to see what we all come up with.

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OK

Dec 12 2019
Dec 12

Last year I re-wrote a few classic Christmas Carols for everyone to enjoy.  And looks like I've done it again.

The night before Crashmas

Twas the night before Christmas and all through the site,
Not a pixel was stirring, not even a byte,
The modules were patched on the server with care,
In the hopes that Dries soon would be there,

The developers were nestled all snug in their beds,
While visions of pull requests danced in their heads,
DevOps in his Fedora and I in my cap,
Had just settled down for a long winter's nap,

When out on the error log there arose such a warning,
I sprang from my chair with a look of scorning,
Away to the terminal I flew with a flash,
Tore open the log files and threw up the cache,

The light from the router gave the room a green glow,
An errie tinge to the to keyboard below,
When what to my bleary eyes should I read,
But a DDOS attack, the thing I most feared,

With little old drivers so broken and and krick,
Well I knew in a moment, it must be CRASH_Nick,
More rapid than BigPipe, the packets in pain,
And it whistled as it printed and called me a name,

"You silly little Admin all snug in your chair,
You have an unpatched dependency, were you aware!
I will use this small crack to crash down your site,
And you will wish you had patched it last night!"

And then a beep, has a notification appeared,
Before my eyes my Christmas leave disappeared,
My face in my hands as I was turned and bowed,
Out the server came Dries, from the cloud,

He spoke not a word but went straight to his work,
And patched all the software, didn't call me a jerk,
With a click of the mouse and a tap of the keys,
He flew back into the server quick as you please,

His visage displayed on my screen, charged no commission,
But then faded away like a CSS opacity transition,
But I heard him exclaim as he uploaded out of sight,
"Patch your damn websites and have a good night!"

Dec 12 2019
Dec 12

Agiledrop is highlighting active Drupal community members through a series of interviews. Now you get a chance to learn more about the people behind Drupal projects.

This time we spoke with Kanopi Studios' awesome CEO Anne Stefanyk, covering everything from her first getting to know the Drupal community to Kanopi's exciting projects and community involvement all through to Anne's love of treehouses. 

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

My name’s Anne Stefanyk and I’m the founder and CEO of Kanopi Studios. Kanopi is an agency that focuses on the full life-cycle of the website, which means we do everything starting with strategy, design, development, through to long-term support. 

And we do it in a really nimble way, where we are able to jump in at any stage of a website and immediately make positive impacts for our clients. It’s because we believe in a continuous website improvement methodology, where we can take small bites that create big wins for clients.

Our sweet spot is actually support: so many agencies do just build, and then are done. But we believe that the first day of launch is really when your site begins! So we’re there to support you as your site grows and evolves.

Beyond owning Kanopi, I am one of the chief cat herders and lead organizers of the Bay Area Drupal Camp. I also help run SFDUG (the San Francisco User Group).

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

I came across Drupal back in 2006 and I was working at an agency, so I was on the client side. I was actually very angry at Drupal; I was coming out of Flash as an agency person, and then all of a sudden I had to manage a website. So I feel very much for Marketers today: they have to manage so much stuff compared to 2006. 

But it was interesting because I started working with Drupal as an end-user, and then things switched where I actually ended up getting a job with an agency that built sites in Drupal. This was after my real estate career came to a crashing halt in 2007.

At first, I was a content editor. My first experience was going to DrupalCamp Victoria in 2006 and I met this wonderful wacky group of people: I met Chris from BuildAModule — he came up for that camp — and I met Shiraz Dindar who’s one of my employees in Victoria now, and I just found this really quirky community.

Then, in 2009, I had the opportunity to go the PNW Drupal summit in Seattle, and that’s where I met Jen Lampton! We met a lot of good people back in the day and I thought, wow, these are brilliant nerds and really fun and easy to talk to. I remember wearing my business attire the first day and not really making as many friends. The next day, I wore my hoodie, my ball cap and my T-shirt, because that was the general vibe and I was super stoked for that.

It was interesting because, coming in on the client side, I was never in the code at all. But I fell in love with the community for their inclusivity and for their uniqueness, and really so many people enjoying Drupal in a social activism way.

So it was really going to DrupalCamp PNW when I discovered there’s this whole group of people that were willing to sit down and teach me about what the heck CCK fields were, or how the user permissions actually work. And that’s when I got really interested in the actual content editing experience of Drupal and learning about it.

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

I remember when I went to DrupalCon San Francisco in 2010, I thought “Wow, people really do this professionally. This is a big thing”. And that’s when I opened my eyes to the opportunity that was beyond my backyard.

I’m from Canada, so it was in 2010 when not only did I fall in love with Drupal in a bigger way, I actually then fell in love with San Francisco. Shortly after, I had a job and a visa, and I was in San Francisco working at Chapter Three.

I really feel like Drupal absolutely changed my life in terms of where I was before to where I am now, because previously I had to have a desk job where I had to go into an office; now, I get to work from home and travel the world with really smart fun people and wear hoodies to work. Life is really good, you know.

I feel like Drupal’s really empowered some really cool stuff in my life just because of the nature of the open source vibe. I really vibe on that open source mentality, “let’s collaborate, let’s share, let’s assume positive intent, let’s make the world a better place, you know, one line of code at a time”. I just think Drupal is a really fun platform to work with. 

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

One of my biggest passions in Drupal is making it easier to understand. So, when people ask what Drupal is, I always say “it’s a tool to build websites, it is cool code that we build websites with.” It’s very basic the way I try to explain it. 

There is brand recognition on WordPress, I’m not going to lie, so I often ask “Have you heard of WordPress?”, and they usually have, and so I tell them “Well, it’s that, but it’s kind of bigger, you can do more stuff.”

So I just try to make it really easy to understand and use plain language whenever I talk about Drupal. Ultimately, I’m a big fan of asking “What are your goals? How do you want to use Drupal? How can Drupal be the tool that makes sure that you achieve your goals?”

It’s context dependent and I try to use analogies. Although we don’t like using the LEGO analogy, sometimes it helps clients understand that you get a base core kit — Drupal core is like your central core kit of LEGO — and then you have all these cool LEGO builders all over the world that build these smaller components that can pop into your master LEGO ship. Except that your LEGO ship’s really your website. 

It’s very helpful for non-technical people to understand the concept of other people contributing more pieces to a bigger, totally custom website experience, because Drupal can really be anything you want it to be.

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

It has been since about 2006 that I’ve been involved with Drupal, so I’ve seen a lot. 

I’ve seen a lot of version changes: from 5 to 6, from 6 to 7, from 7 to 8, and now 8 to 9. And, although I love that Drupal has always reinvented itself to be better, I’m really grateful we’re at a point where we’re committing to backwards compatibility. 

To me that’s really important, because backwards compatibility means that we can really create growth instead of having to rebuild every version. Because that’s been really hard on clients; as an agency owner, I’m noticing that it’s been hard for clients to accept that they need to spend a lot of money over and over again. 

So committing to backwards compatibility is going to just skyrocket our growth, I think, in terms of adoption. Because it’s now also being built in an open object-oriented framework that gives a broader sense of interest from other developers, in that it’s taking this computer stuff a little more seriously in version 8. It’s fantastic from a scalability standpoint.

I’m also really proud, honored and excited about how far Drupal has pushed the needle in terms of accessibility and multilingual in core. I think that’s something that no other CMS can boast, that our whole editing experience is accessible and that we’ve, in a sense, forced the hand to get people to compliant. I’m really excited about that. 

Also there’s been a big shift in Drupal where they have the larger corporate entities that are players in the space, whether it’s Autodesk, Pfizer, or Tesla or whatnot. I’m thrilled to see the movement. 

I’m also excited to promote the movement of getting large corporations to contribute back to open source, and what needs to happen to facilitate that collaboration. Because, without contributions back to the software, none of us would have jobs. 

It’s so important for contributions, and I think for so many agencies or big companies it’s hard sometimes to allocate time, but there are sustainable ways that you can do community work within your regular workflow. 

That’s where I really see the future; if we can continue to foster a real sense of community and foster that within the new corporate entities that are playing in our fields, then we can really get more people to contribute back. 

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

I would say that one of the contributions that I’m personally most proud of is our Community Contribution program at Kanopi Studios. I think we’ve created a sustainable model where it facilitates multiple different initiatives in our business. I want to do a talk at DrupalCon about this and we’ll see how that goes.

First, we have a dedicated Community Ambassador who helps organize commits and run sprints within our workflows to move community stuff along. AmyJune Hineline — who’s our community ambassador — also goes out and facilitates finding other projects that need support, whether it’s the Breadcrumbs module or whether it’s Bootstrap Paragraphs, and that our team is then geared up on sprints to help. 

AmyJune does 50% billable work, that’s how she pays for herself. And then the other 50% of the time she’s focused on community. Through that it’s been so cool because I’m a big community person. 

But, because I can’t code, I’ve never been able to really jump in and get credit on any of this stuff — which is fine. I’ve always just done it altruistically. But it’s great having this new system on drupal.org so we get credit for community work.

I’m really excited that people are actually seeing the business value in community, because there is true business value going to these conferences. AmyJune’s evangelizing our brand and attracting talent. She’s talking to clients who are really interested in contributing; those are our kinds of clients, we want clients that want to pay for the trip.

I’m really proud that we can measure AmyJune’s ROI. I feel like that’s a model that we can then systemize and then take it to every agency and say, “You need someone doing your QA”, “You need someone handling client stuff” . . . that’s what AmyJune does 50% of her time, and it keeps her billable, and everything’s paid for that way. And we then have someone 20 hours a week working on Drupal (and also WordPress!) which, to me, is really exciting.

It’s a total win-win. And we really live by our values; we value community, it’s one of our core values.

The second part is being able, as an organization, to operationalize community contribution. We have time and resources within our workflows to do community contrib. 

Our community contrib program is where employees go on to Slack and they report what they’ve done with just a numeric value, like, “I worked 2 hours on the weekend on this” or “I spent an hour on this”, and it’s good for all the things, so all levels of people can get involved. A lot of people that are community people put the time in regardless, they just will, right? So we wanted to enable them to get recognition for doing that. 

And it’s not like somebody wins, there are different tiers; if you are doing stuff pretty regularly, then you’ll get a whole other conference day added on to when you go. So if you wanted to go to three conferences or four conferences, the people that spend time in the code, in the community, doing the work . . . they are the ones that tend to want to go to the conferences. And this is a good program that enables us to say: “Hey, you did that community work, so then you can go to more conferences.” 

All of the community people, they all want to go and travel to all the events — I mean, why wouldn’t you? It’s amazing! But there is that sustainable model that you have to balance when, as a CEO, I can’t just send all the people to all the things all the time. But those that are really jazzed up about it and want to spend some extra time getting there and contributing, there’s an avenue to be able to do that. Basically when you do community contrib, you get extra free time, on Kanopi’s dime, to do even more.

So we make sure that when people are hired, they’re in tune with that. Because I do feel like there are lots of projects, and lots of money out there. But again, if we don’t support and shine the little Drupal drop, it’s going to be tricky for all of us come later on. 

We really value people that are into community. And they understand the balance because we also have to work.

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

It’s actually one that’s not even on Drupal.org because the distribution requirements made it so complicated, but we ran a project called Mukurtu. It’s all run on GitHub. 

I’m really really really honored to be part of that project. It was funded by Washington State University, and it’s a project that a couple of shops worked on beforehand, with Kanopi working on launch version 2.0. 

It’s on Drupal 7 right now and there’s an incredible set of features. Essentially, Mukurtu is a website installation profile that you can spin up using Drupal 7 and Organic Groups, and have a place where you can archive your digital heritage of digital items securely online. 

So it’s great for museums, it’s great for indigenous tribes, and First Nation folks. We have some people at Oxford that are, for example, tracking the migration of different birds. There are so many different applications of this, but it is a place where you can actually use roles and permissions.

Also, it’s really tightly built so that you can partition off secure content, so Google doesn’t just take all your content and now it’s theirs. Especially when it comes to cultural assets from museums or first nations folks. So that is just wonderful. 

It runs on GitHub and it is sponsored by WSU, but we’re one of the four committers and one of the core developers on that, so that’s super fun, I just love that project.

And it’s cool because we built it for around 70-100k at the time and WSU has spun up hundreds and hundreds and hundreds of sites using that installation profile. And it runs with features — I’ve never had a site so tight. You know, regression bugs . . . they’re the bane of our existence in Drupal, and Drupal 7 was all featurizing everything, and that was just so tightly featurized that it was so nice. It was a very smooth project.

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

My dogs! I love my dogs; they’re a chihuahua and a chi-wiene, and they’re actually nicknamed “the evils.” 

But I’m really excited about treehouses, I’m a big fan of treehouses. I actually started Kanopi to facilitate that. And, as most entrepreneurs can relate, it’s been one heck of a ride and super busy, so getting to actually building treehouses hasn’t happened. ;)

Now that we have a team of 44+ and we’re getting to the place where we’re really stabilized and we’re building a sustainable agency, now’s the time that we can go build this super awesome WiFi-enabled tree house in southern Costa Rica.

We’re planning on getting that going as part of our company planning for 2020, so I’m really excited about building a treehouse for the Kanopians to go and play in.
 

Dec 11 2019
Dec 11

by David Snopek on December 11, 2019 - 2:45pm

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 Critical security release for the Webform module to fix a Cross Site Scripting (XSS) vulnerability.

The Webform module is for making forms and surveys in Drupal. 

It doesn't sufficiently sanitize token values taken from query strings. If a query string token is used as the value of a markup component, an attacker can inject JavaScript into a page.

See the security advisory for Drupal 7 for more information.

Here you can download the Drupal 6 patch or the full release.

If you have a Drupal 6 site using the Webform 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).

Dec 11 2019
Dec 11

We have been hard at work developing a migration path from Panelizer 4, which is the layout system used by Lightning, to core's Layout Builder. It's finally ready to be tested.

The important word there is "tested". The migration has automated test coverage, of course, but it hasn't really been tested in the wild yet. That means you, brave soul, are in somewhat uncharted territory -- and more importantly, it means there is a risk of data loss. This migration modifies both content and configuration of your site, so before running it, you should absolutely, positively, back up your database and configuration. And even if the migration appears to complete without errors, you should verify that your content continues to look and work the way you expect it to.

If something goes wrong (aren't you happy you made a backup first?), post an issue into the Panelizer issue queue, under the 8.x-5.x version, describing your problem in as much detail as you can manage.

Two more caveats:

  • This requires Drupal 8.8 and later. It will not work on an older version of Drupal core.
  • This migration path does not yet support translated content. Panelizer's support for translations is sketchy as it is -- and Layout Builder's is still a work in progress -- so migrating translated content from Panelizer to Layout Builder may have wildly unexpected results. If you do try it, whether it went well or poorly, let us know how it went.

Now, then, I've warned you enough. To run the migration:

  1. Explicitly require Panelizer 5 in your project, like so: composer require drupal/panelizer:^5.0. If you are using Lightning 4.1.0 (8.x-4.100) or later, you might want to run composer update first to get the latest version of Lightning Layout.
  2. Add the Core Context and Layout Builder Library modules as well: composer require drupal/core_context drupal/layout_library
  3. Ensure that Layout Builder is installed. ;)
  4. Visit the "Manage display" page of any panelized content type (or other entity types, if you are using Panelizer on them).
  5. You should see a button that says "Migrate to Layout Builder". Press it.
  6. Read the confirmation page carefully. (Spoiler: it will strongly recommend that you back up your database.)
  7. Press the "I understand the risks and have backed up my database. Proceed!" button.

Repeat the last four steps of this process as needed for every panelized entity type on your site until everything is using Layout Builder.

Before you ask: there is currently no way to automate this process. Because this migration is not proven yet, we purposefully want you to click through the UI and accept the warning. Every time. When the worst bugs have been ironed out, we can look into some form of automation. But now isn't the time.

That's pretty much everything you need to know about this for now. We wish you godspeed! See you, hopefully, in Layout Builder land. :)

Dec 11 2019
Dec 11

More so than ever before, ensuring digital accessibility through compliance with  WCAG 2.1, is a multi-faceted endeavor that needs to be approached from several angles. 
 
Those of us who are in the business of developing and remediating websites and apps for accessibility are well aware of the fact that automated accessibility checkers primarily catch the low hanging fruit of inaccessibility. It’s completely possible for an inaccessible site to be run through any number of automated checkers with no accessibility issues being detected -- happens all the time.
 
It’s also possible that an automated accessibility checker can red flag a site, when the issue cited is not an actual impediment to accessibility.

Case in Point

A client came to us recently with a legal challenge from an outside organization. In the statement, this organization claimed that a user was not able to access certain parts of the client's website with a screen reader. In checking the validity of this claim, I discovered that it was false. 
 
So where did this information come from? An automated accessibility checker. Even though a screen reader user would have had no problems navigating the site, the underlying code was out of sync with the automated accessibility checker’s rules. Tightening up the code was needed to satisfy the automated tool -- not to make the site accessible to someone who uses a screen reader.

Legal Landscape

Due to the U.S Supreme Court’s recent decision not to review Robles v Domino’s Pizza, LLC, we can expect to see more and more accessibility related lawsuits such as this, from a new breed of opportunists deploying accessibility checkers without the benefit of any real perspective or passion for accessibility. 
 
In the current climate, cleaning up code to satisfy automated accessibility checkers is an important step toward avoiding legal challenges from individuals and organizations that use these tools simply to target their next defendant.
 
At Promet Source, we are passionate about putting solutions into place to ensure a more inclusive online environment, at the same time, we are passionate about helping our clients to avoid nuisance lawsuits. 

Covering All Bases

Our approach to achieving both objectives begins with a reliance on the following four tools for reviewing, auditing, remediating or developing websites and applications:

Why these tools and why all four?

They are distinct from each other in that separate organizations developed them. Many other automated accessibility tools are built off of these tools, and our goal is to avoid duplication of effort while covering as many bases as possible. 
 
While the first tool on the list, Validator, functions as a code checker, the three that follow, Siteimprove, AXE, and WAVE serve as accessibility checkers. 
 
Double and triple accessibility checks are a best practice that enhances both confidence and outcomes, often serving to uncover the types of subtleties in the underlying code that could spark an accessibility lawsuit. 

Dev Pro Tip

When developing a new site, we recommend utilizing these tools on an ongoing basis. This practice is a key step to ensure continuous advancement toward the development of an accessible site, vs. making one step forward and two steps backward, which is too often the case.
 
Despite the sophistication of these tools, always keep in mind that automated accessibility testing will never replace manual audits. Manual accessibility auditing by a real human is still the most dependable accessibility checker. Here is a short list of audit steps that call for human intervention: 

  • Increase/Decrease the zoom in browsers. 
  • Adjust the color contrast. 
  • Test with multiple screen sizes. 
  • Use only the keyboard to navigate the website. 
  • Use a screen reader to hear how the website functions for users who are visually impaired. 

 
Automated tools are a great start to the process of auditing a site for accessibility, and in the current legal climate, it’s essential to be able to proactively evaluate a site from the same angle as unscrupulous litigants in search of accessibility lawsuits.
 
The process, however, does not end with automated tools. Not by a long shot.
 
Looking for more insight about leveraging the right tools or learning where to start with digital accessibility? Promet Source can help. To speak to an accessibility specialist, contact us today.

Dec 10 2019
Dec 10

Computed Field Module is extremely beneficial to a Drupal developer at various events. There are times when you have tons of Fields, a few of which can be consolidated into one field. Sometimes, you might need a field that is a computation of two or more fields, which does not need user inputs. Or you might just want to store the current user’s data directly into the database. 
  
When you want to populate content automatically without user inputs in Drupal, we can leverage the Computed Field Module for Drupal 8. This module is a very powerful field module that allows us to insert custom calculated/computed fields via PHP code. These values can be either stored directly in the database or can be calculated while using node views. 

This module comes with a security warning as the custom code entered in the field is going to be saved in the database. Adding PHP code in the text area (“Insert your working code here”) without the use of Hooks in custom modules, is a huge threat to the security of your website. This module is recommended to be used by developers with good skills and knowledge in PHP and Drupal APIs. It is also recommended that you first test your PHP code in the Body field of a Drupal page.

Installing the Drupal 8 Computed Field Module:

Initially, you will need to download the Drupal Computed Field module from this link - https://www.drupal.org/project/computed_field/releases/8.x-2.0 or you can  Install with the Composer :  composer require 'drupal/computed_field:^2.0'

Once you have installed the module, navigate to extent and enable the Computed field module. 

Enable computed field module               Figure 1- Enable the Computed Field Module

Using Computed Field to automatically populate content

Step1 - Once you have enabled the module, navigate to Structure -> content- type -> select your content type. For now, I have selected the Article content type.

Step 2 - Go to Manage fields, add field of type Computed field. There are 5 types of computed fields - 

  • Computed (decimal): This field automatically populates as decimal value based on the php code.
  • Computed (float): This field automatically populates a floating value based on the php code.
  • Computed(integer): This field automatically populates an integer valued based on the php code. 
  • Computed (text): This field automatically populates a string values based on the php code.
  • Computed (text, long): This field is the same as Computed text but takes more text.
select field type         
           Figure 2 - Select the Field Type

Time to Try it out! Let us now automatically calculate and populate the age of a person based on their Date of Birth that the user has entered.

Step 3 -  First, we will have to add the Computed Field. In our case I am going to calculate the Age of a person so I will add the field by navigating to 
Configuration -> Account settings -> Manage fields. Lets’ select the Computed (integer) field to populate the Age automatically.

computed field         
             Figure 3 - Add the Computed (integer) Field


When we add the Computed (integer) field and give a Label (name of the calculated field), click on Save. We will then see this window as shown in the image below.

Setting up the Drupal Computed Field            Figure 4 - Setting up the Drupal Computed Field

Step 4 -  In the settings window, you can add an optional Help text that instructs the user on what the calculated field value is about. The most important part, however, is the text-area called “Code (PHP) to compute the integer value”. Here is where we write the custom code to calculate the Age (in this case). Below the text area you will see some security warnings and some suggestions/recommendations. Also mentioned are a few example variables that can be used in the PHP code. In our case, I am going to write the PHP custom code to calculate Age in the PHP code text area. To automatically populate the Age.
 

Calculating the Age within the PHP Code text area            
           Figure 5 - Calculating the Age within the PHP Code text area

Inside the PHP code text area, we can also use “if” conditions to populate the content automatically.

Step 5 - After writing the custom code for the Compute Field, hit the save button. Next, lets’ test this by entering the Date of Birth.

Entering the Date of Birth           
           Figure 6- Entering the Date of Birth

Step 6 - After saving the content the Age will be populated automatically (as shown in the image below)

Figure 7 - Calculated Age presented to the user             
           Figure 7 - Calculated Age presented to the user

This is a very simple example of using the Drupal 8 Computed Field Module but similarly you can populate values with various types of computations and custom code. 
 

Dec 10 2019
Dec 10

Web components are a collection of web standards allowing you to create new HTML tags with custom names, reusability and full encapsulation on styles & markup. Because they are included in the HTML spec, they are compatible with the big frameworks. None of the big frameworks can avoid supporting HTML (as this is required to render in a browser) therefore support for web components is guaranteed. 

In this blog, we’ll talk about the advantages of using Web Components as well as how to avoid common problems.

Basics
 

Web Components consist of four main standards which can be used independently or all together:

HTML Templates: necessary for writing reusable code and declaring how it should look
HTML Imports: these let you import HTML code and reuse your components in other pages
Shadow DOM: the rules on how to create a unique DOM encapsulated by HTML markup
Custom elements: needed for adding new HTML elements into the DOM

This DOM addition gives us the ability to “componentize” the web into small, reusable, modular containers that fit into web apps. Best of all, they’re purely built with HTML, CSS, and JAVASCRIPT. 

Challenges 
 

Some of the most common challenges are:
           
Code complexity: building web components can be complex and developers often think they will require writing a large amount of code to implement simple functionality.            
Shared resource: A web component has its own scoped resources. There may be cases where some of the resources between the components are common.                
Polyfill size: The polyfill are a workaround for a feature that is not currently implemented by the browsers. These polyfill files have a large memory footprint.                
SEO: As the HTML markup present inside the template is inert, it creates problems in the search engine for the indexing of web pages.

Solution
 

Lit-element is a simple base class for creating fast, lightweight web components. Its familiar development model makes it easier than ever to build Web Components. You can express your UI declaratively, as a function of state. No need to learn a custom templating language – you can use the full power of JavaScript in your templates. Elements update automatically when their properties change.                    

LitElement also uses lit-html to define and render HTML templates. DOM updates are lightning-fast because lit- html only re-renders the dynamic parts of your UI – no diffing required.

Check out the examples below to see it in action: 

HTML Code    

CSS Code

JS Code

Code example 
https://codepen.io/mattiasimonato/pen/wvBvLgZ

Dec 09 2019
Dec 09

With Drupal 9 set to be released later next year, upgrading to Drupal 8 may seem like a lost cause. However, beyond the fact that Drupal 8 is superior to its predecessors, it will also make the inevitable upgrade to Drupal 9, and future releases, much easier. 

Acquia puts it best in this eBook, where they cover common hangups that may prevent migration to Drupal 8 and the numerous reasons to push past them.

The Benefits of Drupal 8

To put it plainly, Drupal 8 is better. Upon its release, the upgrade shifted the way Drupal operates and has only improved through subsequent patches and iterations, most recently with the release of Drupal 8.8.0

Some new features of Drupal 8 that surpass those of Drupal 7 include improved page building tools and content authoring, multilingual support, and the inclusion of JSON:API as part of Drupal core. We discussed some of these additions in a previous blog post

Remaining on Drupal 7 means hanging on to a less capable CMS. Drupal 8 is simply more secure with better features.

What Does Any of This Have to Do With Drupal 9?

With an anticipated release date of June 3, 2020, Drupal 9 will see the CMS pivot to an iterative release model, moving away from the incremental releases that have made upgrading necessary in the past. That means that migrating to Drupal 8 is the last major migration Drupal sites will have to undertake. As Acquia points out, one might think “Why can’t I just wait to upgrade to Drupal 9?” 

While migration from Drupal 7 or Drupal 8 to Drupal 9 would be essentially the same process, Drupal 7 goes out of support in November 2021. As that deadline approaches, upgrading will only become an increasingly pressing necessity. By migrating to Drupal 8 now, you avoid the complications that come with a hurried migration and can take on the process incrementally. 

So why wait? 

To get started with Drupal migration, be sure to check out our Drupal Development Services, and come back to our blog for more updates and other business insights. 
 

Dec 09 2019
Dec 09

The year has come to a close - and what a year it has been! For Agiledrop as well as for Drupal, it has truly been an amazing and successful one - and yet, we feel it is only a prelude to all that’s coming in 2020. To properly end the year, here’s a recap of all our posts from last month - enjoy!

International Splash Awards: A celebration of Drupal innovation

Following DrupalCon Amsterdam and the concurrent Splash Awards, which we sponsored, our first blog post in November was aimed at promoting the event and congratulating and showcasing some of the winners. 

For Ronald van Rooijen, Managing Partner at FRMWRK that won the award in the Government and Public Services category, the award is a testament to the successful collaboration between their and SIM’s team, as they were able to quickly replace their existing system (used for over 10 years) with Drupal. 

Daniël Smidt, the CTO at Synetic that won in the Tools & Apps category with their DAM (Digital Asset Management) system, was happy that their work not only provided obvious benefits to their clients in terms of user experience, but that it also meant a significant contribution to Drupal.

Read more

Interview with Alex Moreno López: Materialize your digital dreams with Drupal

Next up, we had one of our Drupal Community Interviews - this one with the friendly Alex Moreno López, Acquia’s Technical Architect. We talked about his beginnings with Drupal and open source, his greatest inspirations and interests in tech, and much more. 

Alex gauged the potential of Drupal early on, already with Drupal 4 / 5, and saw it as having an advantage over the easier to use WordPress. As he brilliantly describes it, “Drupal is a tool that allows you to materialize your digital Dreams in a way that you don’t necessarily need coding knowledge.”

He is excited about a lot of things in tech and open source, both the technologies and the community (the people, speaking at events, etc). He wishes a day had 40 hours, so he’d be able to squeeze in more learning and contributing each day.

Read more

How development agencies can attract & retain clients

Our third post from November was more business-oriented and was aimed at development agencies struggling with properly positioning themselves and hence winning over long-term clients.

In this post, we outlined five proven approaches to attracting and retaining clients. These are: 

  1. Prioritizing the employee experience
  2. Dedicating time to learning
  3. Becoming a partner in the true sense of the word
  4. Aligning with the client’s in-house team
  5. Be transparent from the get-go

As we see, these can mostly be distilled to, on the one hand, understanding the needs and wishes of your employees, and, on the other, communicating well with the clients. The most important thing is to always take into account the human aspect in these relationships.

Read more

A month in the life of an Agiledrop developer

With our last post written in November, we wanted to provide our readers some insight into what a typical month looks like for an Agiledrop developer - their daily and weekly tasks, internal events and meetups, and just the general vibe in all of our offices.

Since we want only the best for both employees and clients, we hold regular meetings to keep each other up-to-date on all current projects and vacations, and we also make use of these meetings to recognize and congratulate our employees for a job well done. 

We also hold a host of activities, ranging from internal ones, such as our AgileSport and AgileFood, to broader developer community events (e.g. open-source meetups). In order to facilitate collaboration and knowledge-sharing, we work predominantly in the offices, while still maintaining a healthy work-life balance.

Read more

Happy holidays to all our readers - we hope to see you all again in 2020!

Dec 09 2019
Dec 09
On 6th December, version 8.x-1.3 of GoogleTagManager was released. Along with the fix to the 8.x-1.2 version I outlined in my previous post (see link), GoogleTagManager now supports multiple containers as well as additional condition logic via the container management page. 

Here are the release notes to version 8.x-1.3 : 

Release notes

Feature requests:
Recharacterize the base uri setting as the parent uri.
Add the container as a parameter to alter hooks.
Separate the container settings from insertion conditions.
Enable more insertion conditions on a container.
Add condition plugin logic to containers.
Add domain and language conditions.

Tasks:
Change the menu path for container management (under admin/config/system/).
Rename __file_prepare_directory().
Replace routines and constants deprecated in 9.0.x.
Add automated tests.
Update README file and convert to markdown.
Enhance automated tests with more user interface assertions.

Bug fixes:
Add update 8102 to install the container configuration entity type.
Correct the redirect in ContainerForm::save().
Change the defer attribute value to TRUE from 'true'.

Dec 07 2019
Dec 07

Services Module is a standardized solution for building API's so that external clients can communicate with Drupal. It provide Drupal plug-ins that allow others to create their own authentication mechanisms, request formats, and response formats. Some of the existing users of this module may have faced the service registration issues while implementing it, I have worked out some solutions for various registry issues you might come across.

Technical details of the tools used.

  • Drupal 7.41
  • Module: Service [ Version:- 7.x-3.13 ]
  • Chrome Extension: Advanced REST client - 4.12.8-stable.0

Register Users through service API module:

CASE 1 – Using default registration parameters

{

"name" : "testuser",

"mail" : "[email protected]",

"pass" :{ "pass1" : "123456", "pass2" : "123456" }

}

This should get you going!

CASE 2 – Custom registration parameters

{

"name" : "testuser",

"mail" : "[email protected]",

"pass" : { "pass1" : "123456", "pass2" : "123456" }, "field_voucher_number" : { "und": [{ "value": "1234" }] }

}

you need to add one more line of code mentioned here in the bold.

If the response is 200 OK then, everything's alright and user has registered successfully.

EXCEPTION No. 1.

If you are getting 500 internal server error as shown in the screen-shot below, you need to follow below mentioned procedure to make user register.

Services Module - Registration 

First of all check error report logs. If you have same error as shown in below screen-shot then you need to apply patch #6.

Link to the patch - https://www.drupal.org/node/2543010

Services Module - Registration 

After that again try to register. if you haven't implemented captcha you will get a response as shown in the screen-shot below.

Services Module - Registration 

Captcha Exception

If you have captcha validations on registration page then you will get error named “406: Not Acceptable: What code is in the image? field is required.” as shown in the screen-shot below

Services Module - Registration 

Solution

To rectify this issue we will need to apply one form alter hook which will be applied only when registration will be performed through API.

function MYMODULE_form_alter(&$form, &$form_state, $form_id) {

if($form_id == 'user_register_form'){

if (arg(0) == 'api') {

// You might have to update this line depending on the path to your API unset($form['captcha']);

}

}

}

After this user registration will work properly for the given fields as shown in the screen-shot below.

Services Module - Registration 

Custom field with text

If you are adding new custom field involving “text”, you can use below mentioned method.

{ "name" : "testuser", "mail" : "[email protected]", "pass" : { "pass1" : "123456", "pass2" : "123456" }, "field_test_text" : { "und": [{ "value": "1234" }] } }

Also there's one more thing that you need to be careful about:

Suppose you have added “field_test” as per shown in the image and have added its list value for radio button list are as described below:

a|A

b|B

c|C

and add field value to store while registration is

{ "name" : "testuser", "mail" : "[email protected]", "pass" : { "pass1" : "123456", "pass2" : "123456" }, "field_test" : { "und": "a" } }

this will throw an error as per shown in the below image.

Services Module - Registration 

Now, let's try something else!

Lets create new field “field_test2” and set its field type and widget as shown in the image, I have set its value as described below:

1|a

2|b

3|c

now add field parameter in the registration api:

{ "name" : "testuser", "mail" : "[email protected]", "pass" : { "pass1" : "123456", "pass2" : "123456" }, "field_test2" : { "und": 1 } }

this works perfectly as shown in the below image

Field type “List(text)” generates some issue to store values and it is not added in the error logs either.

So, basically if you are using “String” to store its value, it will throw an error, so instead use “integer” value and it will work perfectly!

Difference between “field_test” and “field_test2” is shown in the below image

Services Module - Registration 

Stay connected for more technical blogs. You can even drop us your any Drupal Web Development queries, we provide optimal solutions.

Dec 07 2019
Dec 07
<?php
function MYMODULE_drush_command() {
  $items  = array();
  $items['nodecreate'] = array(
    'callback'    => 'custom_drush_create_node',
    'description' => dt('Triggers a node-save'),
    'aliases' => array('nc'),
    'arguments'   => array(
      'title'     => "Title of node",
    ),
    'options' => array(
      'repeat' => 'Number nodes to create.',
    ),
    'examples' => array(
      'drush nc error' => 'Prints error as node title is blank.',
      'drush nc Test --repeat=5' => 'Creates 5 nodes with title Test.',
    ),
  );
  return $items;
}

Running the Drush help command for our own command drush help nc will list some useful information about this command (arguments, options, description, aliases, examples etc)

Callback Function

As we have written callback function, Drush expects a function to be declared called drush_create_node(). This default naming structure starts with drush followed by the name of the command all connected with underscores.

function MYMODULE_create_node($title) {
  $repeat = drush_get_option('repeat', 1);
  for ($i=0; $i < $repeat; $i++) {
    $node = new stdClass();
    $node->type = "page";
    $node->title = $title;
    $node->language = LANGUAGE_NONE;
    $node->uid = 1;
    $node = node_submit($node);
    node_save($node);
  }
  drupal_set_message(t('Created ' . $repeat . ' node with title ' . $title));
}

Now clear the drush cache: drush cc drush

And run command: drush nc OR drush nodecreate

Arguments and options

-> Arguments are mandatory whereas options are not.

-> Arguments are passed as function parameters (in order) while options are retrieved in the callback using a special helper function (drush_get_option).

We declared 1 argument (called title) and one option called repeat.

-> The argument type will be the first string that gets written after the command name in the terminal (drush nodecreate or drush nc).

-> The option will be an integer value that gets assigned to the --repeat flag in the command.

Ex. drush nc Test --repeat=2

This will create 5 nodes, with title “Test”

User input

Let’s make it so that if a user doesn’t pass an argument, we ask them what argument they’d like to pass and use the value they provide interactively.

This goes to the top of the command callback function before checking whether the correct argument was passed.

// Check for existence of argument
if (!$title) {
  $options = array(
    'Test' => t('Test'),
    '0' => t('Error'),
  );
  $title = drush_choice($options, t('Please choose a option.'));
}
…
  1. Everything happens only if the user has not passed an argument.
  2. We create an array of key-value pairs that will represent the choices we give the user. The array keys represent the machine name of the choice while the values, the human readable name.
  3. We pass this array along side a question string to the drush_choice() function that will return the machine name of the choice the user makes. And that becomes our new $title variable (the argument).

If the title is not set or error is returned, we can add code to print error in terminal.

…
  if(!$title || $title='error') {
    drupal_set_message(t('Error! No title set.'));
  }
…

Full Code will look something like this:

<?php
 
function MYMODULE_drush_command() {
  $items  = array();
  $items['nodecreate'] = array(
    'callback'    => 'custom_drush_create_node',
    'description' => dt('Triggers a node-save'),
    'aliases' => array('nc'),
    'arguments'   => array(
      'title'     => "Title of node",
    ),
    'options' => array(
      'repeat' => 'Number nodes to create.',
    ),
    'examples' => array(
      'drush nc error' => 'Prints error as node title is blank.',
      'drush nc Test --repeat=5' => 'Creates 5 nodes with title Test.',
    ),
  );
  return $items;
}
 
function MYMODULE_create_node($title) {
  if (!$title) {
    $options = array(
      'Test' => t('Test'),
      '0' => t('Error'),
    );
    $title = drush_choice($options, t('Please choose a option.'));
  }
  if(!$title || $title='error') {
    drupal_set_message(t('Error! No title set.'));
  }
  else {
    $repeat = drush_get_option('repeat', 1);
    for ($i=0; $i < $repeat; $i++) {
      $node = new stdClass();
      $node->type = "page";
      $node->title = $title;
      $node->language = LANGUAGE_NONE;
      $node->uid = 1;
      $node = node_submit($node);
      node_save($node);
    }
    drupal_set_message(t('Created ' . $repeat . ' node with title ' . $title));
  }
}

Feel free to drop your any queries/concern related to this blog. For Drupal Web Development we are always ready to help :) Stay tuned! 

Dec 06 2019
Dec 06

Mark brings a fifteen year programming background and six years of Drupal experience to his role as Senior Drupal Developer at Mediacurrent. Highly involved in his local web community, Mark runs the ABQ Webgeeks Group and started the Albuquerque Drupal Users group.

A former radio personality, Mark switched careers to become a programmer when he realized he could have a fun job and eat. (No seriously, kids, radio pays horribly). But as a nod to his days as in radio, Mark hosts the bi-weekly Mediacurrent Dropcast show and the Friday 5 video seriesPrior to Mediacurrent, Mark first dove into Drupal to convert dreamincode.net to a better CMS than it had. Through that he was sent to Do It With Drupal in New Orleans, where he met the great people of the community. From that point, he was hooked. 

Mark resides in Albuquerque, New Mexico. When not in front of the computer, he enjoys playing hockey, tennis, and a good craft beer- not necessarily in that order.

Dec 06 2019
Dec 06

Lutheran Social Service Contact Directory

HELPING LSS CLIENTS CONNECT DIRECTLY WITH THE SERVICES THEY NEED

Lutheran Social Service of Minnesota (LSS) is one of the state’s largest private nonprofit social service organizations, providing a vast array of services in all 87 Minnesota counties for children and families, older adults and people with disabilities.

Finding the right contact person for LSS services on their website was not as easy as the organization wanted it to be. On the lssmn.org site, while each service has its own page within the navigation, there was no consolidated contact directory. The main contact page contained a single web form which would send an email to the LSS marketing department (usually one person). This resulted in a bottleneck of incoming requests for numerous services. The team noticed that the contact form was consistently in the top 10 most-visited pages in the site’s analytics. Since it’s important for LSS to provide prompt and efficient service, they required a solution that would allow people seeking service to connect directly with program staff.

Though external visitors are the primary audience for the contact directory, LSS knew that internal users would benefit from the tool as well. The organization’s intranet has a directory, but that focuses on people results, not services: if you know someone’s name, you can look them up. But if you need to find the main contact for disability services in Hinckley, MN, this is much harder to find using the internal tool.

To quote our favorite infomercial, “THERE’S GOT TO BE A BETTER WAY!”

OUR ASSIGNMENT: BUILD A CONTACT DIRECTORY FOR BOTH INTERNAL AND EXTERNAL AUDIENCES

LSS knew that building a consolidated contact directory was going to be a top priority when we took them on as a TEN7Care support client. They had a head start on gathering contact information and putting together design options, thanks to the good work that was done during a recent website redesign. In addition, a Contacts content type had already been set up in Drupal.

We first exported the existing contact data out of Drupal into a spreadsheet, so we could see all the data in front of us. We worked to streamline the contact information, getting rid of duplicate listings and deleting unused fields. LSS Digital Marketing Manager Tom Lany was once again our hands-on partner in the project. Tom worked in concert with other LSS Marketing and Communications Managers in a multi-layered process to have all departments review their contact information for accuracy.

As the data was being updated, we worked to figure out the best hierarchy for the content. Each contact had two important facets: location and service category.

Granularity of location was crucial. Each LSS service operates at a different level of scope. Some are very local physical locations. Some resources are tied to counties, which are grouped into regions. Finally, there are statewide services, those that have no locality. They can be accessed from anywhere. For the most part, the system contextualizes every contact on a local, regional or statewide level. We used two off-the-shelf Drupal modules, Geocoder and Geolocation Field, to get the latitude and longitude based on the contact address, and to save it to the contact.

We also needed to assign each contact to a service category. In addition to the Contacts content type, the LSS site also had an existing Service content type. We had hoped to use this in conjunction with the Contacts content type for the content directory, but the Service content type represented the marketing pages for the services in the navigation structure. Since we didn’t want to be disruptive to their existing content, we created a new content type, Contact Directory Service, that would associate individual contacts with a service grouping.

To organize and display the search results, we used the Views module, which is part of Drupal core. It allows us to compile listings, add filters and perform searches. However, a little tweaking was needed. “The Drupal Views module doesn’t easily allow us to take three different queries and merge them into a single result set,” said Les Lim, Technical Project Lead, “so we wrote custom code that allowed us to dynamically change the underlying database query that built the results, according to filter inputs we were given.”

OUTCOME: INTERNAL AND EXTERNAL AUDIENCES CAN FIND INFORMATION QUICKLY

Site visitors, whether internal staff or external clients, can now quickly find the information they’re looking for. If a site visitor uses the zip code field, the system will provide local results first (including the distance from the zip code entered), then regional, then statewide. A site visitor can also use the category boxes to drill down to a list of results. If a zip code is not provided, the system will show statewide results first, then regional listings. We figured people providing a local zip code will want to see these specific results first, where people who do not have a specific location in mind will likely want to see general statewide results first.

Lutheran Social Service Contact Directory

We launched the new contact page on October 15, 2019, and it’s been well received. A month after launch, Tom Lany presented the contact directory project to a leadership team at LSS, and it got a round of applause. “People here really recognize how this tool will add a lot of value to what we’re doing,” Tom said.

Tom notified us that the contact directory launch made a difference right away. “We’re getting half of the form submissions we were before the directory went live,” explained Tom, “which means people are contacting the services directly. This saves our central staff time and means people are getting faster responses from the people they need to reach.”

As a self-sufficient client, LSS will maintain the contact database themselves in Drupal.

Dec 06 2019
Dec 06

Drupal 8.8 is paving the way to the future

Drupal 9 is approaching fast. However, until Drupal 9 arrives, there is another major update that is coming soon. Drupal 8.8 was launched on the 4th of December. In this blog post, I am going to tell you what are the changes and quality of life improvements that you can expect from the next major Drupal update.

Drupal WYSIWYG will include will allow media embedding

This is a feature that was long awaited for Drupal. Media has been poorly handled by Drupal for a while now. Because of that, this feature was awaited for a decade already. However, with Drupal 8.8, this wish becomes a reality. The good news is that this feature will come with complete media management capabilities that make it easier to embed the media for content creators and site builders alike. Thanks to this new development we will also be able to integrate media embedding in a future release of our Glazed Builder visual page builder.

Claro, a new administration theme integrated into Drupal core

On top of these updates, Claro, a new administration theme will be integrated in the Drupal core. This theme will bring a new refreshed design to Drupal. This UI refreshment has been long requested by the Drupal community. However, in drupal 8.8, these requests are finally coming to fruition. Below, you will see a comparison between the old and the new improved UI of Drupal with screenshots taken from both of them.

Drupal 8.8 old

In the first screenshot you can see the new page creation tab from the old Drupal UI.

.

Drupal 8.8 new

In this screenshot, you can see the same page as in the screenshot above, however, with the new UI added on top of it. As you can see, now it has a white background with blue highlights. The fields appear to be  bigger than previously, further improving the clarity and the text readability. The blue highlight seems to use a darker blue than the one in the previous version of the UI. All in all, the changes are so drastic, however, the better color pallette choice and the boxy look bring out a more clean and modern look for Drupal 8.8.

JSON:API should become significantly faster

First, let’s start with what JSON:API is.JSON:API or JavaScript Object Notation is an encoding scheme that is designed to eliminate the need for an ad-hoc code in order for that code to be able to communicate with the servers that communicate in a defined way.

In the Drupal 8.8 update, JSON:API is thought to be able to create the work even faster than before. This was possible because of a couple of issues that were resolved:

  • The include paths are resolved for every resource in a resource collection, instead of once per unique resource type. 
  • ResourceTypeRepository computes ResourceType value objects on “every request”
  • Resource “entity” should use partial caching

These changes will make Drupal 8 a better platform for phone apps and other "headless" applications.

jQuery UI is going to be deprecated from Drupal core

jQuery UI will be deprecated in Drupal 8.8. This front-end library is used to render user experience components like dragging and dropping, sliders, selecting and sorting, etc. It was first added in 2009 to the Drupal core. However, it became unmaintained since 2017 and as a  consequence was listed as an Emeritus project, which means that the people who were maintaining the projects are reaching or are at the end-of-life of the project. Even though jQuery UI will become deprecated in Drupal 8.8, it will be completely removed from Drupal with the release of Drupal 9. On top of that, because of the end of life, jQuery Ui will not work with future jQuery versions. With this in mind, it seems that Drupal core is in the middle of the process of switching to JavaScript solutions. Also, it seems that Modules and themes that are depending on jQuery UI will have to have it as a dependency and also to manage their libraries.

Path aliases are going to be converted to revisionable entities

Custom URL aliases will now be provided by a new revisionable content entity type in Drupal 8.8. However, the path.alias_storage has been kept for backward compatibility purposes, although its hook has been deprecated. You can check out the next link in order to be fully prepared to upgrade your code for Drupal 9.

Configuration Management improvements

Drupal Configuration Initiative 2.0 started being implemented from the release of Drupal 8.6. However, it started being implemented more and more with new releases of Drupal. Now, with the release of the new Drupal 8.8, the configuration management will see new improvements. One of the changes is that the Sync directory is defined in $settings['config_sync_directory'] in settings.php.
On top of that, the ability to support multiple configuration directions is $config_directories is not deprecated. Furthermore, if you happen to have a custom or contributed code that relies on this ability you either need to move your setting either to $settings or another storage. To read more about this see the change record.

Full support of Composer to build Drupal projects

Composer has helped Drupal development become more in line with the PHP standards. The relationship between Composer and PHP had started to develop more with the release of Drupal 8. Now, Drupal 8.8 will come packed with more Composer plugins.

  • Drupal/core-composer-scaffold: This plugin will be replacing the drupal-composer/drupal-scaffold plugin. The new plugin will be in charge of automating the scaffolding of the Drupal core Composer in the right place. On top of that, this plugin will provide a couple of options for the setup approaches.
  • Drupal/core-vendor-hardening: The task of this plugin is to remove some of the unnecessary folders that are present in vendor directories such as tests or documentation, this process being important when the vendor folder is included in the docroot.
  • Drupal/recommended-project: This composer template will have a role in the generation of a Drupal project structure which follows the recommendations presented in Drupal 8.8, which states that the vendor folder should be outside of docroot.
  • Drupal/legacy-project: This Composer template will generate a Drupal project that will follow the old structure. However, using this will not be recommended for Drupal 8.8.0 and further.

These Composer related parts can be found in the new /composer folder from Drupal source core.

Drupal, better than ever!

Drupal 8.8 seems to bring out a new cluster of features and quality of life improvements that will surely make the life of the site builders and content creators easier. This release will is one important release that paves the way for the arrival of Drupal 9. With that being said, congratulations to all the people that have contributed to the release of Drupal 8.8. Keep up the good work!

Dec 06 2019
Dec 06

We are excited to share details about our recent integration with the Group module.

By default, Group module stores group memberships in the Drupal database. For a recent project, our Client required that group memberships are canonically stored in their existing LDAP directory. That way, memberships may be re-used to control access to 3rd party applications like real-time chat, file sharing, etc.

Group module provides a simple service, GroupMembershipLoader, that is responsible for loading all memberships for a group or all memberships for a user. We swapped that service for a custom one that queries LDAP instead of querying database. Further, we added a simple caching layer so that a user’s group memberships are cached in that user’s session.

// Cache a user’s own groups in their session for fast retrieval.
$duration = \Drupal::getContainer()->getParameter('ldap_directory.dgids_duration');
$this->getPrivateTempStore($account, $duration)->get('ldap_directory')->set('dgids', $dgids);

A group membership not only relates a user to a group but also assigns a role to that membership. In our implementation, a member can be a Reader, Contributor, or a Group Admin. We decided to model that by creating a DirectoryGroup content entity, and configuring Group module such that DirectoryGroups can become group content. So, when a new Group is created, an insert hook does the following:

  1. 3 LDAP groups are programmatically created
  2. 3 DirectoryGroup content entities are created+affiliated with the new Group.
  3. The group creator is added to the Group as an Admin member.

That last step hints at another part of the custom integration. The Group::addMember and Group::removeMember methods control what happens when memberships are created and removed. We overrode the default implementation in our Group bundle class and perform LDAP operations instead of DB operations. Then we clear that user’s Tempstore in order that they immediately see the new membership.

Judicious use of cache tags insures that this list is invalidated when the user is added or removed from Groups.

// Invalidate that user's group memberships
Cache::invalidateTags($account->getCacheTags());

Also, we are pulling user avatars and other profile info from LDAP. Avatars are cached locally at full resolution and we may then use Image Styles to scale them down as needed. Drupal’s re-use of LDAP data demonstrates that Drupal is a good enterprise citizen.

Kudos to kristiaanvandeneynde for the excellent architecture of group module that made this integration possible without any patches to Group.

Dec 05 2019
Dec 05

For the final time in 2019, we’re back with our overview of the top Drupal blog posts from the previous month. It’s been a great year for Drupal, and we can’t wait for everything that 2020 will bring. So, let’s end this great year with some appropriately great posts!

State of Drupal presentation (October 2019)

What better way to round off the year than with a post by Dries breaking down the state of Drupal at DrupalCon Amsterdam. As it is essentially a recap of his keynote from the event, it is a great opportunity for anyone who couldn’t make it to the ‘Con to get themselves up to speed on where Drupal is by either reading the blog post or watching a recording of the Driesnote which is included in the post.

In addition to recapping what’s new and improved in Drupal 8, Dries also gave an update on Drupal 9 to be released in June and proposed 4 strategic tracks for Drupal 9: reducing cost and effort; prioritizing the experience of beginners; driving the Open Web; and becoming the best structured data engine available. 

Read more

Making Drupal easier for beginners

Coincidentally, the objective of the next blog post we wanted to include is practically synonymous with one of the strategies proposed by Dries for Drupal 9. Manifesto’s Gabriele Maira, the author of the post, even references Dries’ keynote and the difficulty of adoption for beginners.

Gabriele identifies the following steps that are necessary for beginners to embrace a technology: it has to be 1) easy to install, 2) easy to evaluate and 3) easy to adapt to the needs of its users. In order to solve the pain point of a poor beginner experience with Drupal, he proposes a Not-Just-Code initiative, which would focus on local communities and the experience of newcomers.

Read more

Drupal North: Growth of the Drupal Ecosystem in Canada

Moving on, we have a blog post by Suzanne Dergacheva, co-founder of the Canadian web agency Evolving Web, about the growth of the Canadian Drupal community. With active user groups and regular events all over the country, Canada is in fact in 4th place in terms of active users on drupal.org. 

Besides the Canadian government, Suzanne is noticing more and more organizations turning to Drupal for their digital experiences, with a lot of educational organizations also giving back to Drupal, and Drupal being a popular topic even at non-Drupal conferences. 

She finishes the post by encouraging readers to share their ideas on growing the community and inviting them to attend some of Evolving Web’s trainings.

Read more

PreviousNext's Open Source Contribution Policies and Initiatives for the Drupal Community

In the next post on this month’s list, Owen Lansbury of PreviousNext shares in what ways they contribute to the Drupal community. One of the most important steps was reserving a portion of each employee’s week to contribution; the figure they’ve settled on is 20% of a week’s working hours.

The time dedicated to contribution has a lot of benefits to the employees that partake, such as developing communication skills and forging relationships with notable Drupal developers outside their company. What’s more, the contribution benefits not only the individuals, but Previous Next as a whole, as well as their clients who gain both recognition and contribution credit on Drupal.org for sponsoring certain work.

Read more

Drupal Business Survey 2019

The following blog post features the results of the 2019 edition of the Drupal Business Survey conducted by One Shoe and Exove, and was published on One Shoe’s blog, as well as by Lizz Trudeau on drupal.org. 

Some of the survey’s most notable findings include a 50% increase in the respondents’ Drupal project pipelines and a 65% increase in their average deal size. The most popular industry for Drupal projects is Education, with Travel & Tourism growing the most compared to 2018.

As far as Drupal 9 is concerned, the major and most common expectation are easier upgrades. More generally, the number one hope for Drupal is an improved dev/editor/user experience.

Read more

Drupal 9 Planning: A Guide to Upgrading, or Extending the Longevity of your Website

With the arrival of Drupal 9 only about half a year away, businesses are carefully weighing their options in terms of an upgrade. In her blog post, Anne Stefanyk of Kanopi Studios considers each of the three main options - skipping Drupal 8 and upgrading straight from 7 to 9; taking the upgrade path of 7 to 8 to 9; and opting for an entirely new CMS. 

Naturally, there are benefits and drawbacks to each option, and this is why Anne’s extensive breakdown of each of them comes especially in handy. After reading her post, you’ll certainly have a much better idea of where you stand and will hence be able to make the most informed decision possible.

Read more

Be the community

The next blog post that we wanted to highlight is a great community-centric post by 1xINTERNET’s Adam Juran recalling his unconventional (but nonetheless extremely important) Drupal contribution at DrupalCon Amsterdam earlier this year. 

Adam’s unique contribution consisted not of code or sharing his knowledge with others, but connecting and empowering people, one of them being, for example, Aleksi Peebles, who wouldn’t have been able to attend the ‘Con if it hadn’t been for Adam and the people supporting him (namely, Baddý Breidert and Ryan Szrama). 

He finishes the post with a powerful message to all Drupalists - “Be the community.” His contribution is a great testament to what we can achieve by being more connected, and it is through connecting that we can truly strengthen the Drupal community - and, in turn, the individual.

Read more

Custom Layout Options in Drupal 8

Last on our list for November, we have a post by Lullabot’s Jeff Eaton about creating special content types in Drupal 8. In the first half, he presents some (flawed) approaches to this: creating a special content type for each and every use case; including innumerable fields for a handful of content types; and simply giving editors the ability to work with raw HTML.

The second half of Jeff’s post then focuses on what you can do instead of relying on the aforementioned approaches and presents four more viable solutions. These are: template swapping; stacked components; entity embed; and using Layout Builder. Which one to use largely depends on the specific need; larger and more complex sites, for example, often combine several of these approaches.

Read more

Well, this was it for our final recap of the previous month’s top Drupal posts in 2019. We wish everyone happy holidays and we’ll see you all next year!

Dec 04 2019
Dec 04

The program committee shares about impostor syndrome and wants to remind community members that you know more than you give yourself credit for.

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