Drupal

myDropWizard.com: Get FREE help from a "Wizard" at DrupalCon Nashville!

Planet Drupal - 4 April 2018 - 11:53pm

We're trying something new this year at Drupalcon 2018! Book some time with a myDropWizard "Support Wizard" for some FREE help with your Drupal site!

You're a first time Drupalcon attendee? You're a veteran Drupaler? Either way, you made part of your Drupalcon mission to fix a lingering issue - or at least to be pointed in the right direction!

We're here to help!

We spend our days helping Drupalers just like you every day with their support needs, so we thought "Let's bring that myDropWizard Support Face-to-Face with Drupalers: FOR FREE!"

So, drop by Booth #818 or (better yet!) schedule with us below!

Categories: Drupal

Hook 42: Community in Harmony - Hook 42 gives back at DrupalCon Nashville

Planet Drupal - 4 April 2018 - 8:09pm

DrupalCon is one of the most exciting Drupal events all year, especially for those of us who enjoy working in the community. We really get to shine.

This year is no different. It’s nice to share knowledge through presentations, but there are many ways to give back to the Drupal Open Source project.

Categories: Drupal

fe_block_ui

New Drupal Modules - 4 April 2018 - 4:32pm

Adds fe_block overview to Block UI for Features related management

Requires: Works great along with:
Categories: Drupal

Multilingual Menu URLs

New Drupal Modules - 4 April 2018 - 2:24pm

The "link" field for menu items is not translatable - this is fine for internal links since Drupal knows which version to reference automatically.

This can be a problem for external links, as there might be a need to provide a different URL based on the link language.

This module creates a "Provide Translated External Link" option in the menu link form for translated items.

When enabled, it replaces the Link and Title fields with versions that are language specific.

Categories: Drupal

Colorfield: Drupal 7 to Drupal 8 migration with configuration entities

Planet Drupal - 4 April 2018 - 11:38am
Drupal 7 to Drupal 8 migration with configuration entities christophe Wed, 04/04/2018 - 20:38 The migrate system is stable since Drupal 8.5.0, so this is a great time to review the migration tools provided by the community. This post does not cover migration from the UI, it focuses on partially customized migration that are runned with Drush. In most cases, you will probably want to review the content model a bit (you know, that content type or field machine name that does not actually reflect the truth since its creation, ...). The idea behind is to delegate the heavy lifting to Migrate Upgrade for migration template generation, then apply content model changes if needed.
Categories: Drupal

FileCleaner

New Drupal Modules - 4 April 2018 - 10:58am
File Cleaner

This module allow to remove cache files and unused files.

CAUTION
- If you use this module, you are conscience what you are doing.
You are the responsible of your work.

Installation
Download via composer and install via drush (Recommended)
composer require drupal/filecleaner
drush en filecleaner -y

Download and install via drush
drush en filecleaner -y

Categories: Drupal

TIP Solutions: Why a critical security hole is actually not so bad?

Planet Drupal - 4 April 2018 - 9:28am
First (before the problem)

If you have a Drupal site and this is the first time you hear about the critical vulnerability published on March 28 2018 read the two last chapters immediately.

During the last week in the Drupal community around the world there has been a hustle about the security hole which was named DrupalGeddon2 [1] [2]. This vulnerability was "highly critical" and got many people scared - unnecessary. This post tries to explain when the vulnerability will become a problem? When the vulnerability is actually not a problem and how to handle the situation right. 

DrupalGeddon DrupalGeddon2 tietoturva Planet Drupal
Categories: Drupal

Dropsolid: How we installed a Drupal security patch on 1300 sites, stress-free!

Planet Drupal - 4 April 2018 - 8:28am
04 Apr How we installed a Drupal security patch on 1300 sites, stress-free! Nick Veenhof Drupal

Yesterday a highly critical security issue in Drupal was released. The issue itself is considered critical, because, the way we understood, it makes it possible to execute code as an anonymous user. This could lead to a complete hack of your site and complete exposure of your content - or, worse, if your webserver is badly configured, a full-scale hostile takeover of your server. (More background info available here and here.)

The issue was announced to the Drupal community a week early, so our Dropsolid team had plenty of time to anticipate and prepare. Currently, Dropsolid serves 482 unique and active projects, which contain on average three environments. To be more precise, this gave us a whopping 1316 active Drupal installations to patch. These environments are located on 65 different servers. 45 of those servers are out of our hands and are managed by other hosting companies, such as Combell or even dedicated hardware on site with the customer. At Dropsolid we prefer to host the websites within our own control, but to the Dropsolid Platform this ultimately makes no difference. For some customers we also collaborate with Acquia - these clients are taken care of by Acquia’s golden glove service.

So, back to preparing to patch all the different Drupal installations. We would be lying if we said that all Drupal installs were running on the latest and greatest, so we used Ansible and the Dropsolid Platform to gather all the necessary data and perform a so-called dry run. This was a real-world test across all our installations to verify if we could pass on a patch and then deploy it as soon as we have confirmed that the patch works for all the versions that we have available on our Dropsolid Platform. For example, it verified if the patch tool is available on the server, it injected a text file that we then patched to make sure the flow of patching a Drupal installation would go smoothly, etc. Obviously we detected some hiccups as we were testing, but we were left with enough time to resolve all issues in advance.

Throughout the evening, we had plenty of engineers on stand-by, ready to jump in should something in the automated process go wrong. The entire rollout took us about 2 hours - from the release of the patch over verifying the patch on all the different Drupal releases to rolling it out on all sites and, finally, relax with a few beers. This doesn't mean we had it easy. We had to work a lot, but a lot of hours just to make sure we could handle this load in this amount of time. That is why we are continuously building on our Dropsolid Platform.

Those who joined our hangout could bear witness to exactly how comfortable and relaxed our engineers were feeling during the rollout.

You might ask, joined our hangout? What are we on about exactly? Well, since the Drupal community was in this together, I suggested on Twitter to all join in together and at least make it a fun time.

A few nice things that happened during this hangout:

  • Someone played live ukelele for us while we waited
  • Someone posted a fake patch and made everyone anxious, but at least it was a good test!
  • People were able to watch Dropsolid in total transparency how we coped with this patch and were also able to interact and talk to others in the hangout.

It made the whole evening a fun activity, as witnessed by Baddy Sonja.

Obviously this couldn’t have happened without the help of our great engineers at Dropsolid - and also because we invest a lot of our R&D time into the development of the Dropsolid Platform, so we can do the same exercise times 10 or times 100 without any extra human effort. Thanks to the Drupal security team for the good care and the warning ahead of time. It made a tremendous difference!

All our Dropsolid customers can rest assured that we have their backs, all the time!

If you are not a Dropsolid customer yet and you are interested to see how we can help you make your digital business easy, we’d be more than happy to talk. If you are running a Drupal site and need help with your updates or with your processes, we’d be glad to to help out and onboard you onto our Dropsolid Platform. You can keep your server contract while benefiting from our digital governance and expertise. Are you in charge of many many digital assets and feeling the pain? Maybe it’s time you can start doing the fun things again - just have a chat with us!

 

Get in touch

Categories: Drupal

Evolving Web: Structuring Content with Drupal 8

Planet Drupal - 4 April 2018 - 7:11am
Structuring Your Drupal Website

Drupal has always been a strong content management platform. The number one reason we use Drupal is because it so easily adapts to our clients’ content models. It enables us to easily map and structure many different types of complex content.

Let’s look at how we go about structuring that content in Drupal, and how we use terminology to define, group and link different types of content.

Content Entities

In Drupal 8, every piece of content is an entity. To structure a site, you want to define different types of entities that will store different types of content.

Let’s take a publishing website as an example. We’re going to create entities for: books, authors, editions, interviews, reviews, book collections, book categories, and so on. You can start by drawing a map of all these nouns. I like mapping out content on a whiteboard because it’s easy to erase and change your mind and it’s bigger than a piece of paper.

Relationships

Once you’ve mapped all the different types of content that will exist on your site, identify the connections between them. Simply draw arrows arrows between the content types that are related to one another.

For example:

  • A book has an author (or multiple authors): draw an arrow from book to author

  • A book can have editions: draw an arrow from book to edition

  • A book can have reviews, interviews: connect these

  • A book collection has books: group books by collection

  • A book has categories: associate books with topics and categories

Entity Terminology: Bundles, Nodes, Taxonomy, Paragraphs, Blocks

Nodes, taxonomy terms, custom blocks, and paragraphs are all different types of entities. Each entity type has unique properties that make it better suited for different use cases and content types.

Here’s a breakdown of the most important Drupal terminology you need to know to structure your content:

  • Node: A page of content is a node, accessible via its own URL
  • Taxonomy terms: Used to categorize other content, taxonomy terms live in a hierarchy. They can be used to filter content and create unique landing pages.
  • Paragraphs: Content that lives within other content and doesn’t need a dedicated URL is a paragraph.
  • Custom Block: Any content that will be reused throughout the site becomes a custom block. You can also embed a block in a node.
  • Bundle: An entity sub-type is a bundle. Usually, bundles can have have unique fields and settings.
  • Field: A field is a component of the content, i.e. an ISBN, author’s name, or book title
Applying this Model to our Example Project

Here’s how we would decide which entity type to use for each content type:

  • Books and authors become nodes

  • Book categories become taxonomy terms

  • Interviews, reviews and editions could be paragraphs

  • Books and authors would be node bundles (aka content types)

  • A book category is a taxonomy bundle (aka vocabulary)

  • A book collection is a block bundle (block type)

  • Reviews and interviews are paragraph bundles (aka paragraph types)

  • A book collection that needs to be displayed on several pages becomes a block

Focusing on Each Entity to Create Fields

Once you’re looking at a book, you can start to think about what defines a book.

Ask yourself:

  • What information should it have?

  • Which information needs to be displayed?

  • How will we filter and order this content?

  • Will there be a single value for the field or multiple values?

List the various components of the content: title, author, ISBN, covers, genres, editions, reviews, interviews. Each of these will be a field.

Fields in Drupal can be single value (for example, each book has a single ISBN number) or multi-value (a book can have multiple reviews or authors). There are many other fields types that can store the content in a certain way that will affect how it can be displayed or used later (text, date, number, email, link, etc). A field that links one entity to another is a ‘reference’ field.

Information Architecture

So far we’ve talked about structuring your content using entities and bundles. But how do users actually access your content? When you’re building out your site map, you’ll probably picture top-level pages. These may link to dynamic lists of content, or they may have sub-pages that are added beneath them.

Linking to Content

In Drupal, we have three main ways to link to content: menus, views, and fields. In general, this is how we use them:

Menus are for static content: Menus are a static hierarchy of content. If you’re creating permanent content on the site that will be relevant for a long time, you’ll probably link to it through a menu.

Views are for dynamic content: Content that is ‘dynamic’ that will be added to frequently and is too abundant to add to a menu will probably be listed and linked to via views (the Drupal term for ‘list of content’).

Entity reference fields or link fields: You can also explicitly add a link from one content item to another using an entity reference field or a link field. For example, if you have a book and you want to have it link to three other hand-selected ‘related books’, you could create a ‘Content’ reference field for this.

You can go through your site map and figure out which pages are static (linked to by the menu) and dynamic content (linked via views). Landing pages tend to be connection pages. For example, a landing page might live in the menu, list a bunch of dynamic pages and also include explicit links to other pages via ‘calls to action’.  

Applying Menus and Views to Our Example

Using our example, you may have a static page for ‘About Us’, ‘Contact Information’, or ‘History of Publishing’. These would be created as pages and linked to via the menu.

You may also have a page that lists all the books and another that lists all the authors. Because your lists of books and authors are likely to change often, these lists should be created using views. When you add a new book or a new author, it automatically appears in the list.

Taxonomies make creating lists more interesting because we can create lists of content that are filtered by a particular taxonomy term. For example, if ‘prize winning’ is a book category, a taxonomy allows us to create a list of all the books that are ‘prize-winning’.

Finally, you might have a landing page for an upcoming book tour that includes details about the tour, a link to the book being promoted, and also links to other books by the author.

Conclusion

There are many more things to know to build a site with Drupal. But when you’re planning out your content, you simply need to be able to draw out the structure and communicate this with your team. Knowing the basic Drupal concepts will help you communicate clearly and think about the site’s architecture at a high level.

To read about a real-life project in which we built out book content in Drupal 8, read about our project for Princeton University Press.

+ more awesome articles by Evolving Web
Categories: Drupal

Fondy Payment Gateway for Commerce

New Drupal Modules - 4 April 2018 - 6:24am
About

Fondy Payment Gateway module allows the admin to set up the Fondy payment method on their store. The customer can select the Fondy Payment Gateway as the payment method and enter their payment details for payment purposes.
We support Visa, Visa Electron, Mastercard and Maestro bank cards from any country as well as several other payment methods such as Qiwi, Yandex, Privat24, cash payments, PayPal, SEPA, Swift, online banking with Ukrainian, Russian and European banks, partial payments, credit payments and Direct Debit.

Categories: Drupal

Outh v1 Guzzle service

New Drupal Modules - 4 April 2018 - 5:03am

If you need the Guzzle OAuth plugin, then run the following command from the root of your Drupal project:

composer require guzzlehttp/oauth-subscriber 0.3.*

Categories: Drupal

Flocon de toile | Freelance Drupal: Working with the Drupal Commerce 2 checkout flows

Planet Drupal - 4 April 2018 - 5:00am

Drupal Commerce 2 allows to define out of the box multiple checkout flows, allowing to customize according to the order, the product purchased, the customer profile this buying process and modify it accordingly. This is an extremely interesting feature, in that it can simplify as much as necessary this famous checkout flows. Do you sell physical (and therefore with associated delivery) and digital (without delivery) products? In a few clicks you can have two separate checkout flows that will take into account these specificities.

Categories: Drupal

Video Embed Twitch

New Drupal Modules - 4 April 2018 - 4:23am

Video Embed Twitch extends the Video Embed Field that allows you to embed Twitch Channels as an iframe simply by entering the channel url.

Categories: Drupal

Lullabot: Continuous Integration in Drupal 8 with Travis CI

Planet Drupal - 4 April 2018 - 3:07am

This article is the second in our series on Continuous Integration tools for Drupal 8, which started with CircleCI. This time, we explore Travis CI.

Travis CI is the most well known CI tool for open source projects. Its setup process is straightforward and it offers a lot of flexibility and resources to implement Continuous Integration for any kind of project. In this article we will implement the same set of jobs that we did with CircleCI and then compare both tools.

Resources

This article makes references to the following resources:

Browse the demo project to discover where the CI components are placed, then use the one-line installer to add these components automatically to your project.

The goal

We want to run the following jobs in a Drupal 8 project when someone creates a pull request:

To accomplish the above, we will use the following tools in Travis CI:

  • Drush, Drupal’s command line interface, to perform Drupal-related tasks like installing Drupal or updating the database.
  • Docker Compose, via docker4drupal, to build the environment where Behat tests run.
  • Robo, a PHP task runner, to define a set of tasks for each of the above jobs.

Here is a screenshot of the Travis CI dashboard with the above setup in place:

undefined

Now, let’s see how this has been set up. If you want to dive straight into the code, have a look at the demo Drupal 8 repository.

Setting up Travis CI

Travis CI requires the presence of a .travis.yml file at the root of the repository that dictates how it will build and test the project. I have used this installer that adds the following files:

Additionally, a few dependencies are added via Composer, which are required for the CI jobs.

After adding the above files to the repository, it’s time to give Travis CI access to it. Open https://travis-ci.org and authenticate there with your GitHub account. Next, add the repository at the Travis CI dashboard as shown below:

undefined

That’s it! After this, future changes to the repository should trigger builds at Travis CI. If you create a pull request, you will see a status message like the following one:

undefined Seeing the jobs at work

Here is an excerpt of the .travis.yml file. We are leveraging Travis’ build matrix for spinning up three jobs that run in parallel:

env: matrix: - JOB=job:check-coding-standards - JOB=job:run-unit-tests - JOB=job:run-behat-tests install: - composer --verbose install script: - vendor/bin/robo $JOB

The script section is called three times: one for each value assigned to the $JOB variable. It calls a different Robo task each time. We decided to write the implementation of each job as Robo tasks because:

  • It makes the .travis.yml file easier to read and maintain.
  • It makes the job implementations portable between CI tools.
  • It gives developers an opportunity to run the jobs locally.

If you are curious what a Robo task looks like, here is the implementation of the one that runs Behat tests:

/** * Command to run behat tests. * * @return \Robo\Result * The result of the collection of tasks. */ public function jobRunBehatTests() { $collection = $this->collectionBuilder(); $collection->addTaskList($this->downloadDatabase()); $collection->addTaskList($this->buildEnvironment()); $collection->addTask($this->waitForDrupal()); $collection->addTaskList($this->runUpdatePath()); $collection->addTaskList($this->runBehatTests()); return $collection->run(); } Building the environment with Docker Compose

The build environment task shown above, $this→buildEnvironment(), uses Docker Compose to build a Docker environment where the Drupal site will be configured, the database will be updated, and finally, Behat tests will run.

In contrast with CircleCI, where we define the mix of Docker images that the test environment will use to run the jobs, Travis CI offers two environments (Precise and Trusty) with common pre-installed services. Trusty has everything that we need for checking coding standards or running PHPUnit tests, but Behat tests require more setup which we find easier to manage via Docker Compose.

Here are the contents of the build environment task. For simplicity, we have removed a few unrelated lines:

/** * Builds the Docker environment. * * @return \Robo\Task\Base\Exec[] * An array of tasks. */ protected function buildEnvironment() { $force = true; $tasks = []; $tasks[] = $this->taskFilesystemStack() ->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force); $tasks[] = $this->taskExec('docker-compose pull --parallel'); $tasks[] = $this->taskExec('docker-compose up -d'); return $tasks; }

The above task uses this docker-compose.yml file to build the environment.

Generating and visualizing coverage reports

Travis CI does not support storing artifacts like CircleCI does. Therefore, we need to use a third-party service to host them. Travis documentation suggests either uploading them to an Amazon S3 bucket or using Coveralls, a hosted analysis tool. We chose the latter because it posts a summary in each pull request with a link to the full coverage report.

Setting up Coveralls is straightforward. Start by opening https://coveralls.io and then, after authenticating with your GitHub account, use their browser to find and connect to a repository, like this:

undefined

Next, it is recommended to review the repository settings so we can customize the developer experience:

undefined

With that in place, new pull requests will show a status message with a one-line summary of the coverage report, plus a link to the full details:

undefined

Finally, when we click on Details, we see the following coverage report:

undefined A comparison to CircleCI

CircleCI can do all that Travis CI does with less setup. For example, coverage reports and Behat screenshots can be stored as job artifacts and visualized at the CircleCI dashboard. Additionally, CircleCI’s Command Line Interface gives a chance to developers to debug jobs locally.

Travis CI shines on flexibility: for example, only the Behat job uses Docker Compose to build the environment while the rest of the jobs use the Trusty image. Additionally, there is a huge amount of articles and documentation, which you will surely find helpful when tweaking the jobs to fit your team's needs.

If you liked Travis CI, check out this installer to get started quickly in your Drupal 8 project.

What next?

We aren’t sure about which tool to pick for our next article in this series on CI tools for Drupal 8. Do you have a preference? Do you have feedback on what you’ve found relevant about this article? Please let us know by posting a comment.

Acknowledgements
Categories: Drupal

JSON-RPC

New Drupal Modules - 4 April 2018 - 2:14am

JSON-RPC is a stateless, light-weight remote procedure call (RPC) protocol.

This module implements a framework for creating non-RESTful services. It is intended to be the platform on which a decoupled Drupal administration and introspection interface can be built.

While JSON API module handles entity data and REST can be used to create custom REST resources, some Drupal actions can't be neatly handled with REST principles. Clearing cache is a perfect example.

Categories: Drupal

IPFS Backend

New Drupal Modules - 3 April 2018 - 11:13pm
Categories: Drupal

Kalamuna Blog: How-to: Using Drupal-Project to Craft Your Perfect Start State

Planet Drupal - 3 April 2018 - 11:05pm
How-to: Using Drupal-Project to Craft Your Perfect Start State Shannon O'Malley Tue, 04/03/2018 - 23:05

The drupal-project repository is quickly becoming the de facto starter for all Drupal 8 projects. So how can you quickly spin up a new site with Composer and drupal-project? How do you take drupal-project and customize it to suit your particular needs? And, how do you leverage post-install tasks to keep yourself DRY? This February I gave a talk at DrupalCamp Florida where I got into all of these questions.

Categories Articles Drupal
Categories: Drupal

OSTraining: A Further Look at the New Layout Builder in Drupal 8

Planet Drupal - 3 April 2018 - 10:48pm

Earlier in this blog, OSTraining's Steve Burge made an excellent introduction to the new Drupal Layout Builder.

Many users have been eagerly expecting this module and it was released in version 8.5.

In this tutorial, you will take a further look at how to work with this module. You will see how to use the Layout Builder to configure:

  • Content types.
  • Nodes.
Categories: Drupal

Twig Components

New Drupal Modules - 3 April 2018 - 9:08pm
About this module

This module lets you use Twig Components with Drupal.

What is a Twig Component?

A Twig Component is a Web Component that uses Twig.

This module expects that all Twig Components extend the base class provided by the twig-components NPM package, and are compiled to ES5 so that older browsers can still be supported.

Categories: Drupal

Team

New Drupal Modules - 3 April 2018 - 8:22pm

Provides an entity for user teams.

Works well with Board.

Available soon.

Categories: Drupal

Pages

Subscribe to As If Productions aggregator - Drupal