Planet Drupal

CTI Digital: CXO DrupalCamp London 2019

1 week 6 days ago

Running a business is demanding. To be successful requires leadership be equipped with a broad range of skills from financial astuteness to empathy for staff. Whilst developers have ample resources from which to draw reference on best practice, for managers and business leaders knowledge gained is often be deemed competitive advantage and so kept secret or is accessed only through expensive training or courses.

Working in open source brings many benefits including the fostering of knowledge transfer that transcends merely code. It is to the benefit of all that business leaders in Drupal share this openness and are willing to reveal lessons learnt or formulae of success, that in other industries would remain behind closed doors. A fine example of this mindset is DrupalCamp London CXO, this years incarnation was no exception.

Prof. Costas AndriopoulosCass Business School, spoke about leadership and innovation in scaling enterprises. He explained that it’s far wiser to sort out your business early, when you are small and well ahead of scaling because what kills businesses is success, age and size.

Promet Source: Just What is Human-Centered Design?

2 weeks ago
Promet's acquisition last year of a team focused on user experience and strategy, has opened an exciting new sphere for the types of conversations that we are having with clients.  The former DAHU Agency’s Human-Centered Design expertise has sparked a lot of questions and within a relatively short span of time, has driven the delivery of expectation-exceeding results for clients from a range of sectors. 

Agaric Collective: Adding Extra Source Properties in Drupal Migrations

2 weeks ago

Sometimes it is necessary to add extra information in our entities to migrate the content to Drupal 8.

Let’s say that I want to migrate the articles content type from Drupal 7 to Drupal 8 and as part of that I want to migrate the tags with my articles.

There are two options:

  • Create a new migration for the taxonomy terms and later link them using the migration_lookup plugin.
  • Make the article migration check to see if the terms exist already and if not then create them.

I will go with option two in this example. To do that I’m going to use the Migrate Plus module, which provides some handy plugins such as entity_generate.

Read more and discuss at agaric.coop.

Kanopi Studios: Ready to launch? Here’s a pre-launch checklist

2 weeks ago

It’s been a lot of hard work and the time has finally come to launch your new website. Congratulations! But before you push that launch button, take a minute to think; are you REALLY ready to launch your website?

  • Multiple rounds of quality assurance testing? CHECK!
  • Cross browser and responsive testing? CHECK!

But is there something else you might have missed?

The items above are some of the more obvious steps a team may go through when preparing a site to launch, but there are some lesser known or sometimes forgotten steps that are just as important to take when launching a new website. So what are they?

  • Set up redirects
  • Check links: Absolute vs Relative
  • Accessibility checks
  • Decide what to do with your old site
  • Decide who will maintain your new site
Set up redirects

Over the years you may have amassed a great deal of content on your old website, and  chances are that in the course of creating your new website you’ve changed how that content is organized. This can lead to content revisions during the process of migrating  that content to the new system. Any team that has gone through this process can tell you that it is a massive effort; even if you’re automating the migration of content in someway. During this flurry of activity in moving content from point A to point B, it’s easy to forget one simple matter: How will users find the same or similar content on the new website?

Creating Redirects ensures that users who arrive at the site via an outdated URL, say from a bookmark or external site, are automatically sent to the appropriate content. Setting up redirects is incredibly important to creating a solid User Experience and it’s good for SEO. Just about every URL on your old site should have a redirect if the URL has changed. This may seem like a herculean effort, but it actually pairs well with the process of moving content from the old to new website.

Check links: Absolute v. Relative

First off a brief explanation of Absolute versus Relative URLs. An Absolutely URL encompasses a URL in its entirety. ie: https://www.kanopistudios.com/about-us. A Relative URL is just the portion of the URL that occurs after the “.com” in the example above. ie. /about-us. In the course of preparing a new website by loading copy and uploading images, you most likely are working from a temporary Development URL. When the time comes to launch the new website, the Development URL will change. When the URL is changed, any links that are pointing to the Absolute Development URL will break. This is a common mistake, and one that can have disastrous results once your new website goes live.

As a general rule of thumb try to avoid Absolute URLs when loading content to any environment. This ensure that if the core URL ever changes, your links won’t break. Leading up to launch, try to work with your Developer to identify and rectify any Absolute URLs.   

Accessibility checks

Accessibility was not exactly a top priority of early website development; as technology catches up, supporting users with impairments is becoming an ever increasing need for any modern website. Accessibility starts early on in a project’s planning, and should be discussed early and often. From Designs to Development there are many touch points where a project team can ensure that the site is compliant with standards.

But what if your site is about to go live and you haven’t considered this? Luckily there are tools like Site Improve that allow you to run automated tests to see where your site may need remediation before it can be compliant. Not only is it good for SEO, but making your site is accessible to the widest range of users ensures you reach a wider audience and that they have the best user experience possible.   

Decide what to do with your old site

In the activity leading up to the launch of your new website, it’s easy to overlook this question. Regardless of how confident you are in the new website, it’s important to have a plan in place for what to do with your old website. Here are some important questions to consider when considering the fate of your old website:

Will you need to reference your old site at any point in the future? Perhaps you weren’t able to move all the content to the new site before launch or maybe there is old content that won’t be migrated, but you still need to reference it in the future. Whatever the reason may be if the answer to this question is yes, you’ll want to keep your site up in some capacity.

Can you afford to host two websites at the same time? This one is a little less straightforward; depending on the size, state, and makeup of your old website, you have options. From a budgetary standpoint, paying for a website that no one will really visit is probably not going to look all that great to accounting. The good news is that with no traffic visiting the old website you probably don’t need all that expensive infrastructure; many enterprise level hosting providers have a free tier that is great for storing a legacy site on.    

Regardless of your situation, you can always find options. What’s most important is that you have a plan.

Decide who will maintain your new site

Building a website is a process; one that requires regular upkeep and ongoing maintenance. Understand that your website is a tool, and built right it should be designed to grow and adapt to the changing needs of your business. This is the philosophy we at Kanopi believe in, and try to instil in our projects. So with that in mind, it’s important to consider who will be responsible for ongoing improvements, maintenance, updates, and bug fixes when the times arise.

While not uncommon for teams to try to take this on internally, it’s important to consider if you have the right skill sets, let alone bandwidth for this to be a viable option. Another solution is to work with an agency like Kanopi to provide ongoing support for your site. An agency will have access to a wider range of expertise and ensures maximum flexibility for the future growth of your site.

Check these off your list, and you’re good to launch!

These items may seem like big additions to your plate leading up to launch, but they pale in comparison to the what could occur if you leave them out. Plan for these early on, and it will ensure your launch goes off with one less hitch.

The post Ready to launch? Here’s a pre-launch checklist appeared first on Kanopi Studios.

Drupal Centric: DrupalCamp London 2019 Highlights

2 weeks ago
DrupalCamp London 2019 Highlights

I headed to City University with a slight hangover, meeting up with a friend in SE London the night before doing the damage. But after some food I was ready for the opening keynote.

Richard Dewick Mon, 04/03/2019 - 14:52 Tags >DrupalCamp >Drupal >Drupal Planet About the author Richard Dewick

Company director of Drupal Centric, a web design and Drupal development company, with 20 years experience in the trade. On this blog he shares his knowledge of web design, Drupal, CRM and App development, in an easy to follow and hopefully fun way.

OpenSense Labs: Implementing pattern libraries with Drupal

2 weeks 1 day ago
Implementing pattern libraries with Drupal Shankar Sun, 03/03/2019 - 21:26

Consistency is a key element in two things, success and web development and both go hand in hand when working on developing a website, either from scratch or revamping an existing one. What aids this consistency is the ability to recognise a pattern that is often repeated in the process and then followed for achieving a common result.


Ensuring a consistent and easy to maintain website is one of the biggest headaches faced by large organisations. This is the exact gap where the suggestion of creating a pattern library as the solution can come into the picture.

But what are pattern libraries? And how can they be put to use? Let’s find out! 

Pattern libraries aid in using easy elements and styles in a project in order to document the visual language of a site, promote consistency, provide user control and reduce cognitive load.

What is a Pattern Library? The primary attraction of a pattern library is that the time taking process of building new features and pages is reduced to a minimum

The importance of Pattern libraries gained attention in the tech space when developers started understanding the benefits of having readymade components for projects. In this era of wanting quick and easy fixes, the primary attraction of a pattern library is that the time taking process of building new features and pages is reduced to a minimum. Thus, the main purpose is to help create consistent websites that are easy to maintain and become a solid part of the design and development process. A pattern library works in a way that it documents all ‘patterns’ (also known as modules) to defines what they look like and how they behave and code.

Style Guides, Pattern Libraries, Design Systems

Style guides, pattern libraries and design systems may hold similar implication for designers and developers, but they exist as individual entities. Also, style guides and pattern libraries( also known as component libraries) may co-exist together to form complete and coherent design systems for a product. Let’s explore the difference between them in detail. 

Typically encompassing a company’s branding guidelines, including components like logo usage, designated color palettes, and editorial tone, a Style Guide is a collection of pre-designed elements to be followed to ensure consistency and a cohesive experience at the end. It is often wrapped as a whole by the company as a deliverable to work with vendors in partnerships. They can directly influence the look and feel of a Pattern Library with the basic difference being that Style Guides can have a standing without data, while Pattern Libraries do rely on some data to function.

On the other side, a Pattern Library often confine static UI elements, being a storage for your components  like articles, headers, galleries, dropdown menu, accordion, and even common web page layouts, like grids. Though style guides do not always worry about context and relationships with data, UI elements and their application in the overall user experience depend largely on context and the interplay with content. Thus, Pattern Libraries focus on interface design, and would not include rules that apply globally to print or other mediums.

This brings us to the Design system joining the dots between a style guide and a pattern library to define the principles relating to the way in which components should exert together. It defines how a layout should work being a form of product documentation which contains everything that helps with delivering the outcome.
 
Often influenced by a style guide, a pattern library usually includes HTML snippets or living documentation for website components which are well-documented and responsive. For instance, pattern libraries can include –

  • Buttons
  • Images
  • Hero 
  • Elements
  • Sliders
  • Galleries
  • Navigation
  • Articles
Why do you need a pattern library?

We have reached an understanding that pattern libraries escalate productivity, but how and in what ways it makes it possible on the ground level? Following are the three-fold benefits of pattern libraries:

Consistency

Development of big sites happens over a prolonged period by a group of developers working on it and requires to be revised regularly. This leads to a fragmented user interface unless everything is in place to ensure consistency.

From Navigation shifts position to form elements, everything has a different format and approach. A pattern library offers a straightforward way to duplicate existing design and functionality on any page of the site for a steady user interface in a fixed frame.

Reusability

If multiple web teams work on multiple sites of different departments in a company, they might end up reinventing the same styles at a considerable cost.

In such cases, a central pattern library can be formulated for reuse functionality and design. A pattern for a particular requirement in the area of responsibility can then be shared with the whole group and also be available for future projects.

This makes a new site or subsection becomes a mere matter of combining these patterns, in much the same way you build something out of Lego bricks.

Easy Maintenance

Having a consistent pattern library that everybody pools from makes the maintenance work easier as seeing all of the pieces in one place makes the task effortless. 

Having coded elements in the same way from the very beginning makes it much elementary for a developer to work on somebody else’s code. Also, for a new developer, work efficiency can speed up by looking at the existing pattern library in use and build the site based primarily on it.

Who is it For? End User:

From the user’s perspective, websites and products that are familiar and consistent provide a smooth experience along with reducing cognitive load on the user.

Development Team:

For teams to focus on the bigger picture without worrying about pushing pixels, pattern libraries help ship products faster to ensure greater efficiency in internal processes and allowing engineers to re-use existing codes.

Organization:

Providing longevity to big sites which are developed by different people over a prolonged period and revised regularly, Pattern Libraries proves to increase the productivity of the organisation at large.

One of the more popular Pattern Libraries, a static site generator called Pattern Lab, is based on Brad Frost’s Atomic Design concept. There are many others to choose from, but this blog will focus on Pattern Lab being a dynamic prototyping and organization tool.

Pattern Lab is available for download on GitHub and can be used as part of your existing or new projects.

Pattern Lab + Drupal 8 = Emulsify


Emulsify is a component-driven prototyping tool that uses atomic design principle and modern frontend practice to develop a living style guide. It can be easily implemented into any CMS to render twig files as it adopts the methodology where the smallest components are atoms, which are assembled into molecules, organisms, templates, and finally pages.

With the shift for templating in Drupal 8 to Twig, a whole new range of tools are now available for theming.

Emulsify authorises you to assemble and manage components in a way that enhance your workflow by integrating Pattern Lab. The Emulsify based project works with custom template names that are specific to the project, developers, and clients. This segregates category-wise patterns(modules) and increases the proficiency of the process.

Emulsify authorises you to assemble and manage components in a way that enhance your workflow by integrating Pattern Lab

When the templates are all set for production, Emulsify connects them to Drupal in a non-complex way as a Twig function (include, extends, or embed) and connects the Drupal templates to the component files.

Emulsify swears by a "living style guide" approach where the style guide components are the same ones in use on the live site. One doesn’t have to worry about the components becoming obsolete or looking unusual than the style guide.

Also, the components constructed with Emulsify are used on any project, with or without Drupal. In simpler terms, it can be used with any CMS that renders content with Twig, including WordPress. This provides an opportunity to work with any frontend expert in a development team as they will be only working with familiar technologies. However, if your project doesn't use Twig, Emulsify can still be used by designers and front-end developers to build a style guide and then be carried forward by backend developers.

In Conclusion

Though building a pattern library demands a lot of work, but once set, it eases the process for all future projects. You can always take baby steps and start small, with just a lightweight overview of the main patterns and modules, without any detailed documentation. Later, you can always progressively refactor and upgrade the pattern library over time by adding features according to the team need.

Aiming for a full-proof pattern library that solves all problems at once might take a year-long project’s time without immediate, tangible benefits to extract from. 

We at OpenSense Labs provide best of Drupal services in enhancing your development in respect to industry standards. Mail us at hello@opensenselabs.com to connect and know more.

blog banner blog image Pattern libraries Pattern library Pattern Lab Emulsify Drupal 8 Blog Type Articles Is it a good read ? On

Colorfield: Reuse readme.md in hook_help() with Parsedown

2 weeks 2 days ago
Reuse readme.md in hook_help() with Parsedown christophe Sat, 02/03/2019 - 14:56 Here is a pretty simple way to maintain the hook_help() of a Drupal project, straight from the readme file. Markdown is preferred here to .txt so it can be reused on a GitHub, GitLab, ... repository as well.

Lullabot: Lullabot Team Retreat 2019

2 weeks 3 days ago

Our annual company retreat happens at the beginning of each year. It’s a perfect time to think of the intentions we want to set in our personal and professional lives. This year’s retreat was once again at the quiet and unassuming Smoke Tree Ranch in Palm Springs, California. It’s a destination that now feels like home for Lullabot, with this year marking our fifth trip to the same place.

OPTASY: What Are the Cannot-Live-Without Drupal Modules that Give Developers the Most Headaches? Top 4

2 weeks 3 days ago
What Are the Cannot-Live-Without Drupal Modules that Give Developers the Most Headaches? Top 4 adriana.cacoveanu Fri, 03/01/2019 - 13:27

Which of those Drupal modules that are crucial for almost any project make you want to... pull your hair out? 

For, let's face it, with all the “improving the developer experience” initiatives in Drupal 8:
 

  • BigPipe enabled by default
  • the Layout Builder
  • Public Media API
  • and so on
     

… there still are modules of the “can't-live-without-type” that are well-known among Drupal 8 developers for the headaches that they cause.

And their drawbacks, with a negative impact on the developer experience, go from:
 

OpenSense Labs: Protecting your Riches: SSO with SimpleSAMLphp

2 weeks 3 days ago
Protecting your Riches: SSO with SimpleSAMLphp Vasundhra Fri, 03/01/2019 - 17:01

Do you remember Scrooge McDuck? He was the uncle to the most famous and beloved character - Donald Duck. Most notable for his piles of shiny, golden coins stacked in his cartoon mansion. 
 
His favorite pastimes: Pinching pennies, counting gold and swimming around in his mountains of money. 
 
While we can’t all have Scrooge McDuck’s limitless riches, we’re still like him in a few important ways. Among which guarding his riches in every sort of manner is one.


New technologies and approaches are creating massive changes that have forever altered the way consumers and businesses interact. Adding to these technological changes, our e-mail accounts and other social media handlings play a similar role as Scrooge McDuck’s riches. And having to log in to these treasures one by one is something we dodge to do.

Right?

Thus, here is one of the most trustworthy applications for your software systems. 

Presenting Single Sign-On (SSO) 

Single sign-on (SSO) is a session and user authentication service that allows a user to use a single set of login credentials (like a name and password) to enter multiple applications. In the SSO system, a third party service offers the identification and authorization mechanism and is responsible for informing the user identity. 

This identification and authorization are handled with the help of Federated Identity. 

Federated Identity refers to the standards, tools, and use-cases that enable the users to access multiple applications using the same access credentials. 


So now the question is - how is the authorized data exchanged?

Well, Federated Identity comes with OASIS security assertion markup language (SAML) specification (It may involve open source technologies also). This specification helps in standard exchange of data between the security domain, having the main focus on providing support for:

SAML 2.0 as an Identity Provider: is the system or the domain that supports the user authentication and has associated attributes. In SAML, Identity Providers are also called SAML authorities and Asserting Parties

SAML 2.0 as a Service Provider: is the system or administrative domain that relies on information or the data supplied by the Identity Provider. 

Source: blog.imagineaSecurity and Privacy in SAML 2.0

This protocol brings no security by itself and highly relies on secure communications (SSL and TLS) or some pre-existed trust relationship which also typically relies on     PKI or asymmetric cryptography.   

It represents a wide variety of security mechanisms to identify and guard the data against attacks. The relying party and asserting party should have a pre-existing trust relationship which typically depends on a Public Key Infrastructure (PKI). 

When a party demands an assertion from another party, a bi-lateral authentication is needed. Among which SSL or TLS are the two that are recommended with the management of mutual authentication or authentication via digital signatures.
 
In terms of privacy, SAML 2.0 also promotes the establishment of pseudonyms between an identity provider and a service provider. The authentication context mechanisms enable  a  user to  be  authenticated  at  a sufficient and assured level ( appropriate to the resource that is attempting to access at the service provider)

Source: MediumSimpleSAMLphp for Implementing the standards of SAML 2.0

What is SimpleSAMLphp?

It is an application that is written in PHP which helps in implementing SAML 2.0. SimpleSAMLphp is a really easy way of integrating all the web-based PHP application into a federation. 

SimpleSAMLphp maintains all the non-PHP scenarios by using the Auth Memcookie approach (a special cookie is added in Memcache that the Apache module Auth MemCookie understands).

It offers support to the two scenarios:

  • SimpleSAMLphp as a Service Provider 
  • SimpleSAMLphp as an Identity Provider 

Service Provider Scenario 

It is important for the user to know that the Service Provider API presents with basic functionality.

  • Verifying if the user is genuine or not
  • Whether they need any authentication or not
  • Login and Logout
  • Preparing the user attributes
  • Preparing the URLs for login and log out. 

For authentication, SimpleSAMLphp connects to an identity provider (which is easily defined by configurated files). This is done so that the Service Provider easily configures to connect to other Identity Providers without having to modify anything in the web application.

In the web application, if the user wants to implement SimpleSAMLphp as a Service Provider, they need to add classes by using the API. Once the authentication is complete, they can easily access the user’s attributes.

Identity Provider  Scenario

The identity provider in simpleSAMLphp is configured to validate the user against various origins - it may be static, LDAP, SQL, Radius, OpenID, Facebook, and Twitter. 

For setting up the Identity Provider, configuration files are required to be changed so that the authentication module can be used and specified ( with additional information and the list of Service Providers). When several Services Providers utilize the same Identity Provider to verify the user, the user needs to log in only once. This is done because the session information is stored by the Identity Provider. 

The Identity Provider also requires a certificate so that identification is proven to the Service Provider.

Source: JulianZhuHow are Sessions in SimpleSAMLphp?

SimpleSAMLphp consists of an abstraction layer for session management. That indicates it is possible to select between different kind of session stores, as well as write new session store plugins.
There are five ways in which the user can store their sessions in SAML. The five ways are:

PHP: If the user wants to use the PHP session handler, then they need to set the store.type configuration option in config.php. But they have to keep one thing in mind that the PHP does not allow two sessions to be open at the same time. 
This indicates that if they are using PHP sessions, both the application as well as the SimpleSAMLphp at the same time, then they need to have different names.

SQL: To store session to a SQL database, set the store.type option to SQL. SimpleSAMLphp uses PDO (PHP objects) when entering the database server, so the database source is configured with the help of  DSN (Data source name). The expected tables are generated automatically. If the user wants to store the data from multiple but a separate SimpleSAMLphp installation in the same database, then they can do the same by using the store.sql.prefix option to prevent conflicts.

Memcache: To store the Memcache session handler, the user needs to set the store.type parameter in config.php. memcache that enables them to store many redundant copies of sessions on various Memcache servers. Every server group is an array of the servers. The data or the information items are load-balanced between all types of servers in each and every server group.

Redis:  To save sessions in Redis, the user need to set the store.type option to redis. By default, SimpleSAMLphp will strive to combine Redis on the localhost at the port 6379. It is, then, configured with the help of store.redis.host and store.redis.port options.

Writing your own plugin: In SimpleSAMLphp there is an excellent open source community, and every type of users are welcome to join. The forums are open for everyone to ask questions and queries, provide answers, inquire improvements or offer with code or plugins of their own.

Drupal in the picture 

DrupalCamp 2018 talked about Drupal 8 module, simpleSAMLphp. The session was all about installing and configuring SimpleSAMLphp as IDP and SP. It also talked about integrating SimpleSAMLphp into Drupal 8 and create an SSO network.


Drupal SimpleSAMLphp module is one of the most robust and strong modules. It provides a comprehensive and complete implementation of SAML in PHP. 

This module not only made it possible for Drupal to communicate with SAML or identity providers (IdP) to authenticate users but it also resulted in the Drupal site to act effectively as a SAML or Shibboleth service provider (SP). Some of the features provided by it are:

  • The module provides with in-time provisioning to the accounts of the Drupal user which are based on SAML attributes.
  • It provides with automatic role assignment that is based on SAML attributes
  • The dual mode in the module guides the users with traditional Drupal accounts and SAML-authenticated accounts at the same time.
  • It supports multiple authentication protocols like OpenID (e.g., Google, Yahoo), Facebook, OAuth (e.g., Twitter), Radius etc
Conclusion 

SimpleSAMLphp is very valuable and important for executing an SSO mechanism in web applications. It is developed in a native PHP and maintains integration to any  SAML providers.

Yes, the library is very flexible and it comes with many authentication modules and furthermore, they can easily be adapted to third-party applications. 

The technology has become very popular especially with the rise of concepts like Web 2.0 and the continuous development of social networks websites like Facebook, MySpace, and others. 

At OpenSense Labs, we believe that security is the number one concern of any organization and we try to provide them with services that help them in a longer run. Ping us now at hello@opensenselabs.com, our professionals would provide you with suitable answers to all your queries and questions.  

blog banner blog image Drupal Drupal 8 CMS Single Sign-on SimpleSAMLphp SAML 2.0 Identity Provider Service Provider Blog Type Articles Is it a good read ? On

orkjerns blogg: Migrating Panel nodes into Layout Builder nodes. Is that even possible?

2 weeks 4 days ago
Migrating Panel nodes into Layout Builder nodes. Is that even possible? admin Thu, 02/28/2019 - 22:33

Oh snap”, said the project manager. “The client has this whole range of rich articles they probably are expecting to still work after the migration!

The project was a relaunch of a Drupal / Commerce 1 site, redone for Drupal 8 and Commerce 2. A couple of weeks before the relaunch, and literally days before the client was allowed in to see the staging site, we found out we had forgotten a whole range of rich articles where the client had carefully crafted landing pages, campaign pages and “inspiration” pages (this is a interior type of store). The pages were panel nodes, and it had a handful of different panel panes (all custom).

In the new site we had made Layout builder available to make such pages.

We had 2 options:

  • Redo all of them manually with copy paste.
  • Migrate panel nodes into layout builder enabled nodes.

Is that even possible?”, said the project manager.

Well, we just have to try, won’t we?

Creating the destination node type

First off, I went ahead and created a new node type called “inspiration page”. And then I enabled layout builder for individual entities for this node type.

Now I was able to create “inspiration page” landing pages. Great!

Creating the migration

Next, I went ahead and wrote a migration plugin for the panel nodes. It ended up looking like this:

id: mymodule_inspiration label: mymodule inspiration migration_group: mymodule_migrate migration_tags: - mymodule source: # This is the source plugin, that we will create. plugin: mymodule_inspiration track_changes: TRUE # This is the key in the database array. key: d7 # This means something to the d7_node plugin, that we inherit from. node_type: panel # This is used to create a path (not covered in this article). constants: slash: '/' process: type: plugin: default_value # This is the destination node type default_value: inspiration_page # Copy over some values title: title changed: changed created: created # This is the important part! layout_builder__layout: layout path: plugin: concat source: - constants/slash - path destination: plugin: entity:node # This is the destination node type default_bundle: inspiration_page dependencies: enforced: module: - mymodule_migrate

As mentioned in the annotated configuration, we need a custom source plugin for this. So, let’s take a look at how we make that:

Creating the migration plugin

If you have a module called “mymodule”, you create a folder structure like so, inside it (just like other plugins):

src/Plugin/migrate/source

And let’s go ahead and create the “Inspiration” plugin, a file called Inspiration.php:

<?php namespace Drupal\mymodule_migrate\Plugin\migrate\source; use Drupal\Component\Uuid\UuidInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\State\StateInterface; use Drupal\layout_builder\Section; use Drupal\layout_builder\SectionComponent; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Row; use Drupal\node\Plugin\migrate\source\d7\Node; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Panel node source, based on panes inside a panel page. * * @MigrateSource( * id = "mymodule_inspiration" * ) */ class Inspiration extends Node { /** * Uuid generator. * * @var \Drupal\Component\Uuid\UuidInterface */ protected $uuid; /** * Inspiration constructor. */ public function __construct( array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, StateInterface $state, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, UuidInterface $uuid ) { parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $state, $entity_manager, $module_handler); $this->uuid = $uuid; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) { return new static( $configuration, $plugin_id, $plugin_definition, $migration, $container->get('state'), $container->get('entity.manager'), $container->get('module_handler'), $container->get('uuid') ); } }

Ok, so this is the setup for the plugin. For this specific migration, there were some weird conditions for which of the panel nodes were actually inspiration pages. If I copy-pasted it here, you would think I was insane, but for now I can just mention that we were overriding the public function query. You may or may not need to do the same.

So, after getting the query right, we are going to do some work inside of the prepareRow function:

/** * {@inheritdoc} */ public function prepareRow(Row $row) { $result = parent::prepareRow($row); if (!$result) { return $result; } // Get all the panes for this nid. $did = $this->select('panels_node', 'pn') ->fields('pn', ['did']) ->condition('pn.nid', $row->getSourceProperty('nid')) ->execute() ->fetchField(); // Find all the panel panes. $panes = $this->getPanelPanes($did); $sections = []; $section = new Section('layout_onecol'); $sections[] = $section; foreach ($panes as $delta => $pane) { if (!$components = $this->getComponents($pane)) { // You must decide what you want to do when a panel pane can not be // converted. continue; } // Here we used to have some code dealing with changing section if this // and that. You may or may not need this. foreach ($components as $component) { $section->appendComponent($component); } } $row->setSourceProperty('layout', $sections); // Don't forget to migrate the "path" part. This is left out for this // article. return $result; }

Now you may notice there are some helper methods there. They look something like this:

/** * Helper. */ protected function getPanelPanes($did) { $q = $this->select('panels_pane', 'pp'); $q->fields('pp'); $q->condition('pp.did', $did); $q->orderBy('pp.position'); return $q->execute(); } /** * Helper to get components back, based on pane configuration. */ protected function getComponents($pane) { $configuration = @unserialize($pane["configuration"]); if (empty($configuration)) { return FALSE; } $region = 'content'; // Here would be the different conversions between panel panes and blocks. // This would be very varying based on the panes, but here is one simple // example: switch ($pane['type']) { case 'custom': // This is the block plugin id. $plugin_id = 'my_custom_content_block'; $component = new SectionComponent($this->uuid->generate(), $region, [ 'id' => $plugin_id, // This is the title of the block. 'title' => $configuration['title'], // The following are configuration options for this block. 'image' => '', 'text' => [ // These values come from the configuration of the panel pane. 'value' => $configuration["body"], 'format' => 'full_html', ], 'url' => $configuration["url"], ]); return [$component]; default: return FALSE; } }

So there you have it! Since we now have amazing tools in Drupal 8 (namely Layout builder and Migrate) there is not task that deserves the question “Is that even possible?”.

To finish off, let's have an animated gif called "inspiration". And I hope this will give some inspiration to other people migrating landing pages into layout builder.

Jeff Geerling's Blog: The 2019 Drupal Local Development Survey

2 weeks 4 days ago

It's that time of year again! Leading up to DrupalCon Seattle, Chris Urban and I are working on a presentation on Local Development environments for Drupal, and we have just opened up the 2019 Drupal Local Development Survey.


Local development environment usage results from 2018's survey.

If you do any Drupal development work, no matter how much or how little, we would love to hear from you. This survey is not attached to any Drupal organization, it is simply a community survey to help highlight some of the most widely-used tools that Drupalists use for their projects.

Take the 2019 Drupal Local Development Survey

Drupal core announcements: Drupal 8.7.0 will be released May 1; alpha begins week of March 11

2 weeks 4 days ago
Drupal 8.7.0-alpha1 will be released the week of March 11

In preparation for the minor release, Drupal 8.7.x will enter the alpha phase the week of March 11, 2019. Core developers should plan to complete changes that are only allowed in minor releases prior to the alpha release. The 8.7.0-alpha1 deadline for most core patches is March 8. (More information on alpha and beta releases.)

  • Developers and site owners can begin testing the alpha after its release.

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

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

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

    1. Most issues that are allowed for patch releases will be committed to 8.7.x and 8.8.x.
    2. Most issues that are only allowed in minor releases will be committed to 8.8.x only. A few strategic issues may be backported to 8.7.x, but only at committer discretion after the issue is fixed in 8.8.x (so leave them set to 8.8.x unless you are a committer), and only up until the beta deadline.
Drupal 8.7.0-beta1 will be released the week of March 25

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

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

Bugfixes and security support of Drupal 8.5.x and 8.6.x

Since September 2018, we have been providing security coverage for the previous minor release as well as the newest minor release.

So, in accordance with our policy, security releases for Drupal 8.6.x will be made available until December 4, 2019 when Drupal 8.8.0 is released. Bugfixes that are not security-related will only be committed until Drupal 8.6.x's final bugfix window on April 3.

Normal bugfix support for Drupal 8.5.x ended in August 2016. However security support is provided for 8.5.x until the release of Drupal 8.7.0 on May 1, 2019.

OpenSense Labs: Is BackDrop CMS - the fork of Drupal 7 - a viable alternative to Drupal 8?

2 weeks 4 days ago
Is BackDrop CMS - the fork of Drupal 7 - a viable alternative to Drupal 8? Jayati Thu, 02/28/2019 - 15:41

Change is the only constant. That’s the lesson we need to adopt when it comes to embracing Drupal 8 and migrating from Drupal 7. Since the launch of Drupal 8 in 2015, many new challenges have emerged among developers and one of them includes forking Drupal.


Quoting Dries' opinion on embracing change:

“The reason Drupal has been successful is because we always made big, forward-looking changes. It’s a cliché, but change has always been the only constant in Drupal. The result is that Drupal has stayed relevant, unlike nearly every other Open Source CMS over the years. The biggest risk for our project is that we don't embrace change.” What is Backdrop CMS?

Backdrop is a Content Management System (CMS) which can be put to use when designing a wide variety of websites from a single administrator's personal blog site to an intricate, multi-role business e-commerce site. It is the perfect fit for comprehensive non-profit, educational, corporate, or government websites.

Being a tool for structuring websites, the core Backdrop CMS package aims to include many useful features, but only those that are necessary for the majority of sites using it. Backdrop can be extended with the addition of modules, themes, and layouts which are easy in nature.

In a way, it allows non-technical users to manage a wide variety of content. It is feature-compatible with Drupal 8 (containing things like Configuration Management Initiative(CMI), WYSIWYG & Views in core), but is built on APIs more similar to those found in Drupal 7.

Evolution of Backdrop CMS

Backdrop CMS started its existence as an offshoot of Drupal. Although Backdrop originates from a common codebase with Drupal, its philosophy and organisation are distinct. Backdrop follows a policy of concentrated releases that account feedback from the community. 

Essentially, for the small to medium sized businesses, non-profits, educational institutions, or any other organisations, who are in need of a comprehensive website on a budget, Backdrop CMS is easy to build and extend. 

Advantages of Backdrop CMS

Both, Backdrop and Drupal projects have different end goals, but emerging from the same original code base, there are areas in which collaboration can benefit both projects. 

  • Along with easier updates, Backdrop is backwards compatible. Backdrop attempts to keep API change to a minimum in order for contributed code to be maintained easily, and for existing sites to be updated affordably.
  • Being simple in its structure, backdrop lets you write code for the majority. It aims to be easy to learn and build upon, even for those with a minimal amount of technical knowledge. Direct implementations are chosen over abstraction, and how things work can be immediately clear and easily documentable.
  • The focus is to include features for the majority. Backdrop core only includes features and tools that benefit the majority of sites that are running it. Also, Backdrop aims to include opinions from individuals who attend trainings, meetups, and camps as well as real-world engagements with consumers.
  • Backdrop can be extended. Backdrop aims to provide a powerful core that can be readily extended through custom or publicly available contributed modules. These additional modules provide desired features that are not incorporated in core due to their complexity or use cases that are too specific.
  • Rendering great performance, Backdrop has low system requirements. Backdrop runs on affordable hosting with very basic requirements. This means not chasing popular trends in technology, but instead adopting common, proven, and learnable systems.
  • Backdrop lets you plan and schedule releases. Each release contains a planned set of features, and is released on time. If a feature is not ready in time for a specific release, the feature gets postponed, but the release is delivered on time. 
  • It gives the freedom to remain free and open source. All codes included with Backdrop are under an Open Source license that allows anyone to use it for free, regardless of their beliefs or intentions.
Why fork Drupal?

There are lots of reasons why Drupal was forked to create Backdrop. These are the most notable ones:

Technical Gap

Though many features in Drupal 8 are identical to those in Drupal 7, the code underneath has little to share resemblance with the Drupal of yesteryear. Developers value maintaining the code that has a proven success rate rather than drifting from the track record of the success.

Coding Principles

The Backdrop community may vary from the Drupal community on some issues that they regard higher, and vice versa. As the principles diverge, so does the code. This justifies the existence of Backdrop.

Niche Audience

Backdrop CMS is dedicatedly targeted at small to medium-sized businesses, non-profits, and education. It best serves the kinds of organisations that need complex functionality, but on a budget.

Source: QuoraCase Studies

The NorCal Hunter Jumper Association is a not-for-profit recreational sports organization that was looking for a better viewing website experience for the membership, mainly on tablets and mobile devices. The new site also needed to be easy for the board and administrators to update and manage. Further, they planned to move board membership nominations, voting, general surveys, and other forms onto the website in the future, including forms that may need credit card processing. Thus, Backdrop was chosen as the medium to integrate all these requirements and following were the results:

  • A finer viewing experience for the members on tablets and mobile devices.
  • Easier updates and management for the board and administrators.
  • Flexible in adding features as the needs of the organization grows.
  • Easy to integrate with other web services.
  • Affordable maintenance and long-term development costs.


BGP Site Solutions is a group of business sites showcasing web publishing experience.

Founded in 2003, BGP Site Solutions has managed nearly 100 web properties with vast experience in performance-based online marketing (Cost per Lead, Cost per Acquisition, Cost per Click), white-hat organic search engine optimization, and web publishing in the marketing verticals of post-secondary education, home services, insurance (auto/health), wine, diet/weight loss/health, financial services, dating, and eldercare/senior services. 

On the other hand, formed in 2011, Authority Media is a leading publisher of career training web properties. The AM goal was to be the most authoritative source of information in each post-secondary education category in which they operate.  

These sites were formerly separate WordPress sites and were hacked multiple times. Thus, security of the website was the need of the hour. 

Since these are both fairly small sites, combining them into a single codebase site offered savings in terms of hosting and maintenance costs. And the multi-site feature offered by Backdrop CMS seemed like the perfect fit.


Final Thoughts

Drupal 8 is a huge departure from anything the Drupal community has released in the past and it’s a move towards the enterprise.

Backdrop is not about users but about developers facing challenges in adapting and investing their time to further improve the Drupal platform. That’s where Backdrop aims to fill the gap left and attempting to maintain connectivity and cohesiveness with the larger Drupal community.

Thus, both Drupal 8 and Backdrop are trying to address the problem, in fundamentally different ways.

Still confused? OpenSense Labs provides steadfast solutions and services to empower digital innovation for all enterprises.
Ping us at hello@opensenselabs.com and let us know how we can help you achieve your digital goals.

blog banner blog image Drupal 8 Backdrop CMS Blog Type Articles Is it a good read ? On

Freelock : Ask Freelock: "Traditional hosts" vs "cloud providers"

2 weeks 4 days ago
Ask Freelock: "Traditional hosts" vs "cloud providers" John Locke Wed, 02/27/2019 - 23:57

A client asks about yet another hosting option:

The VPS-2000HA-S includes the following resources:

6GB RAM (burstable)

150GB SSD Disk space

5TB Monthly Bandwidth

4 free dedicated IP's

options to configure the server for particular versions of PHP

2 hours of Launch Assist to help migrate and configure the server with the Managed Hosting team (one on one Tier 3 support)

... what do you think?

Backup DevOps Drupal Drupal Planet Hosting Risk Security WordPress

Kanopi Studios: Ensure long-term growth for your website with continuous improvement

2 weeks 5 days ago

If you’ve spent time looking for a website support partner, you’ll quickly realize that while there are a lot of options out there, they’re not all created equal. Keeping your goals in mind will help you find an agency with an approach that best meets your needs.

If you’re simply looking for software updates and security patches, there are a lot of options out there. But if you’re looking for a strategic partner to support your site, the search for the right fit can be a bit more challenging.

At Kanopi Studios, we cover the basics, but that’s just the beginning. Our support team focuses on continuous improvement and growth-driven design, ensuring long-term growth for your website. We can jump in at any stage of your site’s lifecycle to make sure you’re meeting your goals and getting the most out of your investment. And when it’s finally time for an upgrade, we can help with that too!

Here are a few details that set Kanopi’s support services apart:

Customer service is our #1 priority.

Our team goes the extra mile to provide stellar customer service. We’re here to make your life easier, regardless of the size of your account.  

Added value and strategic guidance

As part of your monthly support budget, you’ll gain access to experienced designers, user experience strategists, developers and more. When it’s time to go beyond bug fixes, you’ll have experts in your corner to help your site respond to changes in the market or shifts in your business priorities.

You’ll work with real humans!

Our full-time support team manages every detail of your account. We analyze incoming requests, make sure we have the details needed to get the job done right, and respond within an hour, all without a single bot in sight.  

A dedicated, senior-level team

Our support team focuses on support. We know that it takes a different set of skills, energy, and dedication to handle rapidly changing priorities and keep the issue queue clear. Our experienced team has identified and resolved nearly every issue imaginable. We encourage you to check out their bios so you can see their qualifications for yourself!

A partner you can trust

Kanopi Studios supports more than 135 active websites. Due to the great relationships we’ve built, we’re still working with some of the very first clients that signed on for our services. In fact, most of our work comes through referrals from happy customers. We welcome you to check out our five-star reviews and get in touch to learn more about ensuring long-term growth for your website.

The post Ensure long-term growth for your website with continuous improvement appeared first on Kanopi Studios.

Lullabot: Decoupled Drupal: Getting Started with Gatsby and JSON:API

2 weeks 5 days ago
Introduction

Anyone who’s built a React app of any appreciable complexity knows how challenging it can be selecting and configuring the multitude of libraries you’ll need to make it fast and performant. Gatsby, a static-site generator built with React and GraphQL, alleviates these pain points while also providing a straightforward way to consume data from an API. On the back-end, we can leverage Drupal’s content modeling, creation, and editing tools along with the JSON:API module to serve that content to our Gatsby front-end.

Droptica: 11 lectures and presentations worth seeing at DrupalCamp London 2019

2 weeks 5 days ago
DrupalCamp London 2019 is approaching fast. Are you ready for another great time with Drupal? This year, 42 sessions on Drupal and related topics are scheduled. We hope, that with our help, you will choose the most promising lectures. Below are a few sessions you should definitely visit. We've picked topics both for experienced coders and beginners, as well as something for business owners, editors, marketers and others.  1. Visual regression testing   https://drupalcamp.london/session/visual-regression-testing-patterns This talk will cover:
Checked
31 minutes 18 seconds ago
Drupal.org - aggregated feeds in category Planet Drupal
Subscribe to Planet Drupal feed