Feeds

Author

May 10 2019
May 10

The blend of usability and attractiveness exists — this is Media Library in Drupal 8.7 core. That’s what comes to mind when we see Drupal Media Library’s updated UI. Managing media on websites will now be easier and more enjoyable than before!

Drupal Media Library allows you to:

  • save photos, audios, tweets, local videos, remote videos from YouTube or Vimeo etc.
  • manage all items in the Library
  • easily add them to content at any time you wish
  • So welcome to take a closer look at how the new Media Library interface looks and works in Drupal 8.7.

Media Library’s new UI impresses the world

As soon as the demo video of the new Media Library UI was posted by Webchick yet in March, Drupal core contributor, it gathered many compliments from the Drupal community. “Brilliant,” “wonderful,” “amazing,” “totally huge” are just some of the feedback. It’s interesting to know what you will say, so welcome to leave comments!

A closer look at new Drupal Media Library interface in release 8.7

The Media Library works in pair with the Media module. To start using it, we enable both the Media and Media Library modules.

Drupal shows a warning about the experimental status of Media Library. The module is expected to be stable in Drupal 8.8 after a few fixes and adding WYSIWYG support.

Enabling Media and Media Library modules in Drupal 8.7

With these modules enabled, we can see that the site’s structure now has media types. There are five default and preconfigured ones (and it is also possible to add custom media types):

  • Audio
  • File
  • Image
  • Remote video
  • Video

5 media types in Drupal 8

It’s time to add some media of the available types. All media items will be stored in Media Library for further convenient use. You can add in two ways:

  • from the admin dashboard “Content — Add content — Media.”
  • directly from the “Media” tab in “Content” where you will see the entire Media Library with all media that you have added.

Media Library new UI in Drupal 8.7

The new Media Library interface can display your media in the Grid view and in the Table view:

Media Library Drupal 8.7 table view

It is easy to filter and sort the media by various criteria, as well as select particular items to do actions with them (delete, publish, save, unpublish).

Media Library Drupal 8 selecting items

Adding media from Media Library to content

Here comes the most interesting part of managing media with the Media Library story — embedding media into content. In fact, it is not only content, but all fieldable entities (for example, user profiles or media itself).

To get this working, the basic necessary thing is to add a “Media” field to the desired entity type. Let’s add it to user account settings and call it “My pet's photos.”

Adding Media field to Drupal contentAllowed number of values will define how many items can be embedded.

Number of values in Media field Drupal 8

You need to select the media type for the field. According to the official documentation, it is completely legal to have multiple media types in the same field.

Selecting Media type for Media field in Drupal 8

Now, every time a new user account is created, it has the “Add media” button that brings in the Media Library interface. Media can be added in two ways (and even at the same time!):

  • You can select Media in the Library:

Selecting uploaded media from Media Library in Drupal 8.7

  • And you can bulk upload media from PC:

Bulk uploading media to Media Library Drupal 8

You can choose “Save and insert”, or “Save and select” to insert them later.

Selecting media from Media Library Drupal 8.7

Once inserted, the media items are displayed on the user account as the user’s favorite pet’s photos. And the same can happen to all kinds of media in all kinds of content.

Media added to user account Drupal 8.7

Enjoy the new interface for Media Library in Drupal 8.7

Well, the new Drupal Media Library interface in release 8.7 is really user-friendly, stylish, and classy. Managing media with it will be fun for content editors.

Our Drupal team is ready to help in configuring the Media fields for your website’s content, creating a custom media type to fit your business needs, and, of course, updating you to Drupal 8.7. Enjoy the newest Drupal features!

May 01 2019
May 01

Online stores with decoupled architecture have all the chances to gain more happy customers. How does this work? Let’s see in this post. The “decoupled” or “headless” architecture is an increasingly popular trend in the Drupal world — especially now that the JSON:API module is in the core. So welcome to this review of the principles of decoupled Drupal Commerce and how it helps online stores engage users.

What is decoupled Drupal Commerce?

In decoupled, or headless Drupal Commerce, the presentation layer is separated from the e-commerce backend. Fast and reactive JavaScript interfaces communicate with powerful Drupal backends via a REST API. Decoupled, or headless architecture gives developers unlimited flexibility to create enhanced shopping experiences.

Decoupled approach as a priority for Drupal Commerce

Commerce Guys, the creators of Drupal Commerce, clearly focus on JavaScript-based solutions for online stores. They have a special team engaged in this area, including lead developers Bojan Živanović and Matt Glaman.

The team keeps polishing Drupal Commerce for headless setups and improves Drupal core in this process as well. They complete the documentation, help developers with their projects, and create an ecosystem of contributed projects in the “decoupled” sphere. Among them:

Commerce Demo project

Let’s see in more detail, with examples and quotes, what benefits make decoupled Drupal Commerce deserve so much attention.

The benefits of decoupled Drupal Commerce

Super high speed

“One thing we’ve all heard about it is it's fast and reactive. You get a quicker response time and the person is more engaged. Customers have an attention problem, so they get easily distracted on a website. So the faster you can give them what they want, the more likely they are to give you their credit card.”

Nothing to add to the words of Matt Glaman, the main creator of the Commerce Cart API and the Cart Flyout modules. He shared this in his speech “The road to a headless Drupal Commerce future” at Drupal Europe 2018.

It is already a known and undoubtable fact that JavaScript front-ends are very quick. In addition, this setup does not overload Drupal, which is reflected in performance.

Matt Glaman said his demo’s product page began to load faster from 130 milliseconds to 60 milliseconds with the decoupled cart. One of the reasons was Drupal no longer had to render a form. All actions with the cart are done on the client side and do not involve the Drupal rendering system.

“The pages are so much faster now because we don’t have to be concerned about Drupal rendering a form or the cart block and all this extra data,” said the developer.

It’s nice for performance that caching can be done without Drupal. According to Matt Glaman, “your product page can be behind the Page Cache module or behind Varnish, and you never have to hit the server to render the cart form, because the JavaScript will do it for you.”

Rich and interactive features

Decoupled Drupal Commerce allows developers to enrich the shopping interfaces with interactive features. Users who enjoy the shopping are more likely to make conversions.

Among these features are:

  • push notifications
  • real-time updates for the shopping cart and all the other forms
  • real-time previews with changed product attributes (like the clothing colors)
  • the ability for the customer to change the order details without the page reloading

and much more.

For example, on the Commerce Demo project, every time a user clicks “Add to cart” or clicks on the cart icon, the cart flies out and shows the contents. The price is updated dynamically as the user changes the product quantity. We see the Commerce Cart API and the Cart Flyout in action.

Commerce Cart Flyout

On the Eldum Rétt website, the price is dynamically updated when the user selects the package size, and cart sidebar also flies out. This project uses a React native app combined with decoupled Drupal Commerce.

Dynamic cart updates in decoupled Drupal Commerce

Freedom in front-end changes

With a decoupled approach, front-end developers are free to implement experiments and changes to improve user experience and application design.

While implementing them, they do not interfere with the backend setup and do not have to worry about it at all. There is no need to edit the database and the code, or redeploy the ecommerce platform.

So, in addition to the flexibility of customizations, decoupled or headless Drupal Commerce saves your time and money. Even small changes in traditional setups would often require the editing of several layers of code.

Front-end technologies of your choice

Your headless ecommerce store can send its data to a mobile app, web app, static site, and so on. You can also enjoy omni-channel commerce with the same store data presented in many ways. Hence the large choice of front-end technologies.

You will not be restricted with what is offered by only one platform. When combined, platforms multiply their benefits.

Your decoupled Drupal Commerce setup is here

If you are interested in decoupled Drupal Commerce tailored to your business needs, contact our Drupal team. We love to create ecommerce projects and work with the latest JavaScript technologies.

So entrust us with any kind of tasks in this area — from decoupling your commerce to creating a new decoupled website from scratch.
 

Apr 04 2019
Apr 04

Views added to Drupal core is one of the most frequently mentioned Drupal 8 benefits. Drupal Views gives us a UI for creating data collections based on any desired criteria. One of the ways to fine-tune the results is to use Drupal Views filters. A level higher from regular filters stand contextual filters that accept dynamic values. This helps us create flexible and interesting solutions. Let’s review Drupal 8 Views contextual filters in more detail.

Contextual filters & their difference from regular filters

  • Drupal 8 Views regular filters can only use one static value at a current moment. For example, we can filter all cars with the brand name “Renault.” We can also allow website users to choose this manually if we make the filter “exposed to visitors.”
  • Drupal 8 Views contextual filters are able to use the dynamic values that change with context. For example, each logged-in user can see “Renault”, “Volkswagen,” or/and “Nissan” cars based on the preferences they put in their user profile. So the same Drupal View will show different results to all at the same moment. 

Thanks to the Drupal Views UI, configuring the contextual filters requires no coding skills. They can be created and configured on the “Advanced” tab of the View. However, contextual filters demand a deep understanding of Drupal and should preferably be created by Drupal developers rather than by website administrators.

Contextual filters in Drupal 8 Views UI

An example of creating Drupal 8 Views contextual filters

We will now create a simple task tracker with Drupal 8 Views. On the “My tasks” page, each user will only see the ones assigned to them. This setup will take a few preparatory steps but they will be fun. Those who are impatient can jump directly to the “Contextual filters” part a few paragraphs below. 

1. Preparatory steps for this setup only

1.1. Creating test users

Let’s start with going to “People — Add new user” and creating test users Jack Sparrow and Frodo Baggins. 

Creating a Drupal userCreating a Drupal user (2)


1.2. Creating the “Task priority” taxonomy vocabulary

Every decent task tracker needs task priority options. Let’s go to “Structure — Taxonomy — Add vocabulary” and add these options as taxonomy terms: Blocker, Critical, and Minor.

Taxonomy in Drupal


1.3. Creating the “Task” content type

Let’s create the “Task” content type in “Structure — Content types — Add content type” and add fields to it. The “Title” field will be available by default. 

Here are the needed fields and the field type in brackets:

  • Assigned to (user)
  • Due date (date)
  • Task priority (taxonomy — with the specified vocabulary)
  • Task image
Fields for a content type in Drupal 8

1.4. Creating tasks

Let’s create a few tasks in “Content — Add content — Tasks”, select Jack Sparrow and Frodo Baggins in “Assigned to,” as well as fill in all the other fields. 

2. Creating our Drupal 8 Views contextual filter

2.1. Organizing all tasks into a Drupal 8 View

And we will not organize all tasks into a View in “Structure — Views — Add new view”:

  • View Settings: “Content” of type “Task”
  • Page Settings: Create a Page
  • Page Display Settings: Table of fields
Drupal 8 Views creation

Then we save the View. As it shows fields, we need to add all Task fields to it. And here is how our unfiltered task tracker looks. We only applied a simple sorting by task priority to show “blockers” above “critical” one. But still, our Views shows tasks for all users. 

Drupal 8 Views results

2.2. Creating and configuring a Drupal 8 contextual filter

Both Jack Sparrow and Frodo Baggins would appreciate a page with their own tasks, for which we will use a contextual filter. In “Advanced — Contextual Filters — Add”, we select the “Assigned to” filter argument and save the filter.

Adding a contextual filter in Drupal 8 Views

We are immediately taken to the contextual filter configuration page. 

1) For the “When the filter is not in the URL” option, we select “Provide default value”. There, we select “User ID from logged in user” from the dropdown menu. 

Drupal 8 Views contextual filter


2) For “When the filter is in the URL or default is provided”, we select “Specify validation criteria — User ID.” In the “Action to take if filter does not validate, we specify “Display contents of “No results found.”” 

Drupal 8 Views contextual fllter (2)

2.3. Testing the Drupal 8 contextual filter

Let’s check what all users see if they visit the “my-tasks” page. We visit it in an incognito window and log in as Jack Sparrow. Success — he can only see what’s assigned to him. He will need to save Elizabeth Swann and find the Fountain of Youth.

Contextual filter by user in Drupal 8 Views (2)


Let’s now log in as Frodo Baggins. Good, he knows he needs to take the ring to Mordor and destroy it in the fire of Mount Doom.

Contextual filter by user in Drupal 8 Views

Hopefully, the guys understand their epic missions, so that’s how a properly made contextual filter may save lives ;) A properly made Drupal contextual filter is what you will always have if you contact our Drupal team!

Get assistance with contextual filters

We have shared a simple example of using Drupal 8 Views contextual filters. Our Drupal experts ready to help you configure any kinds of contextual filters for your website and create interesting user experiences.
 

Mar 19 2019
Mar 19

Drupal 8.6 became one of the most interesting releases in Drupal 8’s history. It brought us the oEmbed feature, the Media Library, the Workspaces module, and more. But it’s time to move forward, and in May 2019 we expect Drupal 8.7. Its “alpha” version has just been released. Although an alpha version is not the final one, we will gladly take a look at it and discuss what to expect in Drupal 8.7.

Drupal 8.7: the alpha version

Drupal 8.7.0-alpha1 came out on March 14, 2019. Alpha versions are far from being ready for production sites. They are just preliminary releases that allow developers to do a good testing, receive feedback, make final preparations, and fix bugs.

After the “alpha,” we are supposed to see the “beta” version of Drupal 8.7 in the week of March 25. Next, the RC (release candidate) phase will begin in mid April.

When everything is tested thoroughly and polished to perfection, we will enjoy the stable version of Drupal 8.7 on May 1! Let’s see what to expect in Drupal 8.7 now that we are looking at Drupal 8.7.0-alpha1.

Expected features of Drupal 8.7

  • End of support for PHP 5.5 and 5.6

Websites are officially becoming lighter and faster due to the use of PHP 7.1+. Drupal 8.6 was the last release to support PHP 5.5 and PHP 5.6. Drupal 8.7 is definitely the time to say goodbye to these obsolete versions of the programming language.

According to Drupal 8.7 alpha 1 release notes, they will officially stop being supported in Drupal 8.7 beta. So those who are using PHP 5.5 and PHP 5.6 will need to upgrade to PHP 7.1 or higher, and our Drupal support team can help.

  • End of support for Internet Explorer 9

The support for Internet Explorer 9 and 10 was stopped back in Drupal 8.4. However, there was a workaround left in Drupal 8.5 and Drupal 8.6 that allowed 32+ stylesheets to be included.

Drupal 8.7 has now officially removed this workaround, so goodbye to Internet Explorer 9. Those who rely on it will need to enable CSS aggregation or install the IE9 Compatibility Drupal module.

  • No more automatic entity updates

As of Drupal 8.7, automatic entity updates are no longer supported by Drupal core. This is meant to avoid conflicts and preserve data integrity. For updating the entities, the Update API should be used. In addition, the drush entity-update (drush entup) command is also not supported anymore. 

  • New UI for the Media Library module

The Media Library module lets you save various multimedia and use them in your content to make it more engaging. It’s possible to embed multimedia directly into content types using the “media” field.

The Media Library works together with the Media module that is already stable. Stable Media Library was first scheduled for Drupal 8.7 but we are likely to see it in Drupal 8.8 after a number of fixes and WYSIWYG support added. 

However, we can enjoy a new and interesting Media Library admin interface in Drupal 8.7. Its features have mostly made it to Drupal 8.7.0 alpha 1 but the completed UI will be available soon in alpha 2 or beta 1.

New Media Library admin UI for Drupal 8.7New Media Library admin UI for Drupal 8.7
  • Adding JSON:API to Drupal 8 core

The JSON:API contributed module is meant for creating high-performance APIs to expose Drupal data in JSON. It immediately creates API endpoints and requires no configuration. The module instantly accesses all Drupal entities.

According to Drupal development roadmap, JSON:API is meant to join the core in Drupal 8.7. JSON:API will look great in Drupal core’s ecosystem of web services that are responsible for third-party integration.

Joining Drupal core is a serious step for any module, especially for a complex one like JSON:API. There has been a hard work done on fixing the last issues related to adding JSON:API to Drupal 8.7 core, and all are fixed now.

Although we don’t yet see the module in the Drupal 8.7 alpha 1 admin dashboard, we will probably see it in alpha 2 or beta. So congrats to JSON:API! Update for 21/03: JSON:API has just landed in Drupal core!

  • Improvements and stabilization for the Layout Builder 

The Layout Builder module in Drupal 8 core allows you to build layouts like Legos by using ready multi-column layouts and Drupal blocks. 

These can be layouts for content, users, contact forms, and other fieldable entities. You can have a specific layout for a content type (e.g. all articles), for an individual node (e.g. one article), or for a display mode (e.g. article’s teaser).

The module arrived in Drupal 8.5 core marked as “experimental.” For Drupal 8.7, it has received important bug fixes in the area of saving layouts for the default content layouts and individual nodes, saving layout overrides, using layouts for different display modes, and more. CSS classes have also been renamed to meet the BEM standards.

Drupal development roadmap has the Layout Builder moving from experimental to stable in Drupal 8.7. We don’t see this happening yet in Drupal 8.7 alpha 1, but we expect this in the near future. Update for 29/03: Layout Builder has reached stability in Drupal 8.7 core!

Layout Builder in Drupal 8
  • Updates to the Guzzle library

The Guzzle HTTP client library arrived in Drupal 8 to replace the drupal_http_request() function in Drupal 7. It makes the process of communicating with RESTful web services easier.

Guzzle offers a modern way of making HTTP requests. It is extensible with plugins, easy in use, and based on object-oriented architecture.

In Drupal 8.7, Guzzle has been updated from 6.3.0 to 6.3.3 and http_client service has begun to support empty headers. Additional updates are also planned in Drupal 8.7 beta.

  • Changes to the Stable and Classy themes

The Stable or Classy are among the Drupal core themes in addition to Bartik, Seven, and Stark. If your website’ theme has been created as a subtheme of the Stable or Classy themes, you will need to pay attention to their changes in Drupal 8.7.

They are related to JavaScript message template and pagination header CSS ID. Specifically, if your theme overrides the messaging or pagination templates, you will need some manual changes, and our Drupal experts are ready to provide them.

  • Better Symfony 4 and 5 compatibility

Drupal 8 includes Symfony components for more modern and fast web development. Drupal 9 will completely move to the new Symfony 5.

Drupal 8.7 is getting ready for it. It is providing better compatibility with both Symfony 5 and Symfony 4. This includes changes in the Container and TranslatorInterface Symfony components, as well as resolving critical compatibility issues.

Be ready for a smooth update to Drupal 8.7!

So we now know in a nutshell what to expect in Drupal 8.7 that is coming in May 2019. Of course, you can rely on our Drupal team for a smooth update. 

In the meantime, we can help your website prepare for it, if there is a need to:

  1. update to PHP 7.1+
  2. take care of Internet Explorer 9 issues
  3. apply changes to your Stable and Classy subthemes
  4. check the compatibility of any other website components 

Contact our Drupal team!
 

Feb 08 2019
Feb 08

Drupal 8 is known for the extensive third-party integration opportunities it gives to websites. One of the tools for this is the contributed Drupal module JSON:API. It helps developers build high-performance APIs for various purposes, including multi-channel content or decoupled Drupal and JSON API setups (which is one of our Drupal team’s areas of expertise). This winter has seen a new release — Drupal JSON:API 2.x. Let’s take a look at what the module does, what makes it useful, and how it has changed in the 2.x version.

JSON:API: principle and benefits

JSON API is a specification, or a set of rules, for REST APIs. It defines how data is exchanged between the server and the client in the JSON format. This includes how the client requests the resources, how they are fetched, which HTTP methods are used, and so on.

JSON (JavaScript Object Notation), in its turn, is the most popular format for APIs. It is very lightweight, consistent in structure, intuitively understandable, human-readable, and easily consumable by machines. At the root of all the requests is a JavaScript object.

The JSON API specification optimizes the HTTP requests and gives you better performance and productivity. JSON API eliminates unnecessary server requests and reduces the size of the data packages.

The specification supports the standard CRUD operations that let users create, read, update, or delete the resources. It is also accepted by all programming languages and frameworks.

crud operations

A glimpse at Drupal JSON:API module’s work

The Drupal JSON:API module offers Drupal’s implementation of the JSON API specification. The module provides an API in compliance with the JSON:API standards for accessing the content and configuration entities of Drupal websites.

The JSON:API module is part of Drupal 8’s ecosystem of web services, and also an alternative to Drupal’s core REST. JSON:API resolves some of the core REST limitations (for example, complex setup, confusing URLs, hard-to-configure collections of entities etc.). At the same time, it only works with entities.

Let’s note some important points about the benefits of the JSON:API work:

  • no configuration is needed (enabling the module is enough to get a full REST API)
  • instant access to all Drupal entities
  • URLs provided dynamically for entity types and bundles so they are accessible via standard HTTP methods (GET, POST, PATCH, DELETE etc.)
  • support for Drupal entity relationships
  • support for complex sorting and pagination
  • access configured in Drupal core role and permission system

As we see, the main philosophy of the module is to be production-ready out of the box. For configurations, there is a related contributed module JSON:API Extras module that lets developers set up every detail they need.

Drupal JSON:API 2.x: what’s new?

Drupal JSON:API 2.x module is getting ready to become part of Drupal 8 core in the near future. Thanks to this, the ecosystem of web services to build high-performance APIs in Drupal 8 core will soon be more complete and diverse. It is also great that Drupal will have a NIH (not invented here) API in its core that follows a very popular specification.

The creators of the JSON API module have had a busy time preparing the 2.x module version for Drupal 8 websites. Overall, 63 contributors took part in that. And there is still a big roadmap ahead.

They issued two beta versions in August and September, then three release candidates from October to December of 2018.

Finally, the stable 2.x version came — JSON:API 2.0 in January 7, 2019, bringing big changes. Websites will benefit from:

  • serious performance improvements (including sparse fieldsets)
  • better compatibility with JSON:API clients
  • more comprehensive test case coverage (including edge cases)
  • backwards compatibility with JSON:API 1.x
Drupal JSON API 2.x improvements

As well as:

  • the ability to see labels of the inaccessible entities
  • information about the user available via “meta.links.me”
  • error response cacheability
  • the config entity mutation feature moved to the JSON:API Extras module
  • a final farewell to the _format parameter in the URL
  • custom "URL" field to no longer added to file entities
  • filter paths closely match JSON:API output structure
  • URLs become objects with `href` keys

and more

Drupal JSON:API 2.0 was soon followed by a new one — JSON:API 8.x-2.1 in January 21, 2019. This is now the latest stable version. Drupal JSON:API 2.1 added two new features:

  1. support for file entity creation from binary data
  2. support for fetching non-default entity revisions.

We should also note that Drupal JSON:API 2.x module is part of the Contenta CMS decoupled distribution that uses best practices of decoupled architecture. JSON:API is immediately available with all new installs of the Contenta.

The related module JSON API Extras for customizing APIs is also fresh and updated. It has had a new 8.x-3.3 release on January 21.

Let’s build the optimal JSON:API setup

As we see, there are plenty of means and tools to build high-performance APIs. Our Drupal developers are keen in this area, and will select the optimal ones for your website. It can be the Drupal JSON:API 2.x module, core RESTful web services, GraphQL, and more. Contact our Drupal team!

Jan 15 2019
Jan 15

Let us invite you to an imaginary city that follows the Drupal Way! ;) Using the names of real Drupal modules, themes, and distributions, we at WishDesk team created the Drupal City map. Today we celebrate Drupal’s 18th birthday, so it’s a great opportunity to invite you there!

The idea and mission of Drupal City map

The world of Drupal modules is incredibly interesting, and we decided to show it to everyone. Our Drupal Map is much more than entertainment. It is meant to promote Drupal and give inspiration to developers, users, and customers.

And, of course, Drupal City will let anyone learn Drupal modules in a cheery and engaging way. You can click on the module images, see their brief descriptions, and visit their pages on​​​​​​​ drupal.org (then click again to close). Here and there, we also left little hints as to how these modules work. So the Drupal City map contributes to Drupal education.

Drupal City map

Welcome to Drupal City!

Just look around the​​​​​​​ Drupal City — it has everything you can imagine. You could walk along the Commerce CCAvenue, turn to the Beale Street, pass the Simple Columns and reach the Beach and the Sea, from which flows a mighty River of Tweets leading to the Waterfall Views.

It is possible to have a chat at the sociable Sticky Sharrre Bar, take a ride on the Owl Carousel, get some calories for Drupal ideas at the local Restaurant or Bakery, and lose extra calories in YG Fitness Gym.

You could also admire the Christmas Lights at the Commerce Square, visit the Open Church, and replenish your skills at the Library. And this is just the beginning!

The choice of modules for Drupal City

It was amazing to see how all these modules, themes, and distributions fit into the Drupal map like in a puzzle.

Some module names matched their map objects exactly, while for others we used a little wordplay. For example, the Commerce Square module does integration with the Square payment service — and it is a beautiful city square on the Drupal map. It makes the map even more interesting!

Drupal has so many fabulous modules that at some moments it was hard to choose between them. There were multiple awesome modules for particular objects — for example, carousels or fields. With real hard decisions to make, we chose the modules whose names better fit the map concept.

If you would like to see other Drupal modules, themes, or distributions on the Drupal City map, you are welcome to share your ideas, and we will consider adding them. Drupal City is truly welcoming, and it belongs to the Drupal world.

See you in Drupal City! It’s just an awesome little place on the Drupal Planet ;)

Created with love for Drupal by WishDesk team.

Jan 04 2019
Jan 04

Websites can be incredibly convenient and time-saving for administrators, and thus efficient for businesses, especially when it comes to websites on Drupal 8! Its latest release, 8.6, has become a true sensation in terms of editorial experiences. In addition to such new features as the oEmbed feature, Media Library, Layout Builder improvements, there is also the Workspaces module in Drupal 8.6, which we want to give an overview of right now. Get ready to read and enjoy! Of course, you can also upgrade to Drupal 8 or update to Drupal 8.6 with the help of our Drupal support team — and enjoy Workspaces and other new modules in action!

The purpose of the Workspaces module in Drupal 8.6

Workspaces is a new experimental module built into the Drupal 8.6 core. It lets website administrators review and edit the content and then publish unlimited amounts of it all at once.

They can switch between so-called environments, or parallel website versions. The built-in environments are “Live” and “Stage,” with “Live” as the default one. Other workspaces can also be created.

Editors can work with as many content pieces as needed while staying on the “Stage” environment. When all the content is reviewed and ready, it can be deployed to “Live” with just one magic button.

It is very convenient to see all the content just the way it will appear to visitors, instead of reviewing the pieces one by one. The staged content is not visible to others until the “Deploy to Live” button brings it to “Live.”

Workspaces vs Workflows: two Drupal 8 core modules to never confuse

Workspaces module in Drupal 8 core is sometimes confused with another one for content reviewing experiences. After all, Workspaces sounds very similar to Workflows — the module introduced in Drupal 8.5. Workflows provides content approval functionality in a duet with the core Content Moderation module.

So how do Workspaces and Workflows differ?

  • Workflows in pair with Content Moderation allows editors to move the content between such states as Draft, Archived, and Published, or custom ones. It provides a piece-by-piece moderation process based on roles.
  • Workspaces, on the contrary, provides bulk moderation processes. All content is reviewed and edited in one environment and then deployed to another. This is especially efficient for content-heavy websites.

Workspaces and Workflows are not only different, but also incompatible at the moment. Only one of them can be enabled in your Drupal 8 core. Otherwise, they may create collisions due to the fact they have the same entities pending approval.

An example of how the Workspaces module in Drupal 8 works

Examples are worth a thousand words, so let’s see Workspaces in action. First of all, we enable the module on the Extend page. The module is experimental, and we will see a warning about it when enabling.

how the Workspaces module in Drupal 8 works

Ok, we immediately notice the green “Live” button in the right hand corner of the site. After we click it, the stylish black Workspaces interface unfolds. It also has the “Manage workspaces” and “Edit” links under “Live.” The “Stage” button is in the left hand corner.

 Managing workspaces in Drupal 8

If we click the “Stage” button, we are offered a chance to activate the Stage workspace, so let’s click “Confirm.” That’s the usual way to switch between the environments. The active environment is always in the right hand corner, we click on it and can call another environment in the left hand corner.

Switching between worspaces in Drupal 8

So we are now on the “Stage” workspace. Let’s create some content that no one else will see. Please keep in mind that you will not be able to do the usual actions while in the environment other than the default one. For example, it will not be possible to create content types, generate dummy content with the Devel module, and so on — you will need to go to the default workspace for that. The default one is defined in workspace.services.yml as a parameter.

However, it is possible to manually create nodes of an existing content type right in the “Stage” environment, which we will do right now. We create 5 articles and edit something in them just for a test.

The Stage workspace in Drupal 8

We can’t see any articles when we visit our site’s main page in the Incognito window, because they are not yet deployed to “Live.” Let’s click “Deploy to Live,” and we will see a summary of the items to be deployed.

Deploying content from Stage to Live in Drupal 8

We click to confirm the deployment, and then we see the “Successful deployment” message. Looks nice!

Drupal 8 workspaces listed

Let’s now switch to check the visibility of our articles in the Incognito window. The articles show up already, which means they have been moved to “Live.” Our experiment with the experimental Workspaces module in Drupal 8.6 has been completed successfully!

Content deployed via Workspaces

Enjoy the new features in Drupal 8.6!

So it’s time to take everything “the great eight” has to offer — the Workspaces module in Drupal 8.6 and many other features.

For any help in upgrading to Drupal 8, updating to its latest minor version 8.6, configuring the new modules, or creating custom ones to precisely meet your needs, contact our Drupal agency!

Dec 10 2018
Dec 10

If you’re still using PHP 5.6 it is time to upgrade to a newer version. As of December 31, 2018, PHP 5.6 will officially become no longer supported.

For users of this soon-to-be obsolete version, time is running out quickly. Websites that are running PHP 5 will not only lack critical security benefits, they will also miss out on the significant performance improvements that are available within the newer versions. Contact a web development team for migration services as soon as possible and definitely before the year’s end.

PHP 5.6 End of Life

Let’s discover what should be done before PHP 5.6 end of life.

What Will Happen When PHP 5.6 End of Life Comes?

The software will continue to work, however bug and security fixes for PHP 5.6 will be no longer released. If any vulnerability is found, it will have no chance of getting remedied. Older version of PHP signal the green light for hackers to target unsupported websites.

To keep your website secure, we recommend that you upgrade to PHP 7 by the end of December 2018. Why not upgrade to PHP 6? This version didn’t work the way it was envisioned to and was completely scrapped. The deficiencies with PHP 6 were all taken into consideration while creating the 7th version, which works flawlessly.

What Should You Do Before PHP 5.6 End of Life?

For Drupal 7 website owners who work with PHP 5.6, a new Drupal version 7.61 was released. It entirely supports PHP 7.2. This will make upgrades from PHP 5 easier.

Drupal 8 support for PHP 5 will be dropped on March 6, 2019. You should contact a web development team for updating to PHP 7.1 or, better yet, PHP 7.2, which is supported as of Drupal 8.5 (which was released March, 2018). Drupal 8.7, with a release date of May, 2019, will support PHP 7.3.

How Can WishDesk Help?

It’s our task to stay on top of new and evolving technologies. That way we can always provide the highest quality services for your digital platforms. Contact WishDesk for your site’s code review and we’ll make sure your platform is PHP 7 ready. We can easily convert all your data to meet the demands of the upcoming new era before PHP 5.6 end of life.

Nov 27 2018
Nov 27

Our team loves exploring and using hot trends in development, one of which is decoupled Drupal architecture. Our previous post was devoted to using decoupled Drupal with JSON.API, and our today’s story hero will be “the Great Gatsby”. Does it sound like the famous book hero? No, Gatsby.JS is a new and hot JavaScript tool, but it promises to be equally famous and deserve a hundred books! In this post, we will discuss its principle of work and the benefits of using decoupled Drupal 8 and Gatsby.JS. And, of course, you always can rely on our Drupal experts in implementing it all.

Gatsby.JS: what it is and how it works

Gatsby.JS is defined a static site generator, but it is approaching a front-end framework in its capacities. Gatsby is built on very hot front-end tools, some of which are:

  • React.JS — the amazingly popular JavaScript library for building complex interfaces
  • GraphQL — the super efficient query language
  • Webpack — the great JavaScript module bundler 

Gatsby.JS is meant for building blazing fast static sites. It fetches the data to them from absolutely any sources and generates static content using GraphQL. Right now, there are 500+ source plugins to establish the connection between particular data sources and Gatsby. The sources include YouTube, Twitter, Hubspot, Shopify, Trello, Vimeo, Google Sheets, content management systems like Drupal, WordPress, and so on. 

Gatsby uses source plugins and GraphQL

 

Decoupled Drupal 8 and Gatsby.JS: the great duet and its benefits

One of the hottest and most beneficial combinations for today is Gatsby and Drupal 8. According to the the decoupled, or headless Drupal architecture, Drupal serves as the backend only, while Gatsby.JS handles the presentation layer. 

Drupal 8 and Gatsby.JS are both open-source, have a large and active community and a huge ecosystem of add-on modules or plugins. And Drupal 8 has built-in web services to make integration a breeze. 

What makes this combination so beneficial? The simplicity and speed of a static site combines perfectly with the power and flexibility of the backend provided by the Drupal 8 CMS. Here are at least some of the features that we get in the end:

  • Unmatched speed. Gatsby.JS pre-fetches all pages of the website instead of querying the database every time on demand, which makes navigation enjoyable and amazingly fast. Gatsby is a static PWA (progressive web app) generator. It efficiently fetches only the critical HTML, CSS, and JS files. 
  • Easy setup. No cumbersome deploy and setup processes will be needed with Gatsby. It builds your site as static files that can be quickly deployed anywhere.
  • Great personalization features. Drupal-and-Gatsby combinations can feature awesome user personalization and authentication capabilities.
  • Awesome content editing. Usually, static site generators need writing content in Markdown, which could be cumbersome for content editors. But the problem is solved with Drupal 8 as a backend! Drupal 8 content creation features are a joy for any content editor. 

One of examples of using decoupled Drupal 8 and Gatsby.JS is the demo site Umami Food Magazine. The site is built on headless Drupal distribution Contenta CMS with Gatsby.JS. 

Umami Food Magazine uses Gatsby 2Umami Food Magazine uses Gatsby

If this looks appetizing enough, contact our Drupal team right now to combine decoupled Drupal 8 with Gatsby.JS for you! Or continue reading about some implementation details. 

Some specifics of using Drupal 8 and Gatsby.JS

In the decoupled setup, both Drupal 8 and Gatsby sites need to be prepared to work together. They will be connected by means of the special Gatsby’s source plugin for Drupal that fetches data, including images, from Drupal 8 websites with JSON API installed. 

So it is necessary to install and enable the JSON API and JSON API extras contributed Drupal modules, as well as enable the core Serialization module on our Drupal website.

Enable JSON API module

Our next destination is Configuration — Web Services — JSON API Overwrites.

Configure JSON API

In Settings, we need to make sure the path prefix for JSON API is /jsonapi. This is what the Gatsby site will need to know.

Configure JSON API

In People — Roles — Permissions we give access to the JSON API list of resources to users with all roles, including anonymous.

Permissions for JSON API

Our Drupal site is ready for Gatsby integration, and we now need to prepare our Gatsby site. It begins with installing Gatsby’s CLI:

npm install --global gatsby-cli

Then we follow all the site creation steps in the “Get started” documentation. Gatsby also offers pre-configured starters for site creation.

Gatsby starters

Then we run Gatsby with the command, after which the Gatsby site should become available at localhost:8000:

gatsby develop

The above mentioned source plugin for Drupal then needs to be installed on the Gatsby site. Next, we add the piece of code from the plugin’s documentation to the gatsby-config.js file. The URL should changed to the one of our Drupal site.

plugins: [
 {
 resolve: `gatsby-source-drupal`,
 options: {
 baseUrl: `https://our-site-name.com/`,
 apiBase: `api`, // optional, defaults to `jsonapi`
 },
 },
]

We then configure our Gatsby site to fetch exactly the content we need from Drupal. We need to create the appropriate pages in /src/pages on the Gatsby site and add the code for React import to the JS file. 

And we configure GraphQL at http://localhost:8000/___graphql to query the Drupal site exactly how we want. 

It all crowns up with the last command to publish our Gatsby site with the Drupal data:

gatsby build

This is just a very brief description of getting Drupal 8 work with Gatsby. Our experts are ready to do the setup exactly in accordance with your wishes.

Enjoy the combination of decoupled Drupal 8 and Gatsby.JS!

If you are interested in using decoupled Drupal 8 and Gatsby.JS, either on an existing project or on a new one, contact our Drupal developers. Our Drupal 8 team has great experience in third-party integration. We will advise you the best decoupled setup and, of course, smoothly implement it. Let’s enjoy the latest and greatest technologies!

Aug 30 2018
Aug 30

There is a long-expected feature in Drupal 8 to make website users engaged and editors happy. It lets you easily embed third-party videos from an URL into your site’s content, and it’s called the oEmbed feature for Drupal 8’s Media module. It will be fully ready for production sites as of September 5, 2018, with the official release of Drupal 8.6.0. Of course, no one will be able to resist updating to this feature-rich version as soon as possible! You can always rely on our Drupal team for a smooth update to Drupal 8.6.0 or upgrade to Drupal 8. In the meantime, while the new Drupal subversion is “preening its feathers,” we will raise the veil on its new and magic oEmbed and see how it works.

What is oEmbed technology?

In a nutshell, oEmbed is a format that allows you to create embedded representations of URLs from third-party resources on your website. The oEmbed format is supported by the most popular resources with multimedia content — Facebook, Twitter, YouTube, Instagram, Flickr, Vimeo, and more.

The new oEmbed feature in Drupal 8 

The fact that the oEmbed support has been added to Drupal Media module is awesome. It makes Drupal 8 a great choice not only for news and media websites, but for sites in all other industries that know the power of interesting video content.

This helps you capture your users’ attention with your product, service, or brand videos, as well as engage them with scenarios where they can share videos themselves. In addition, you can set up how exactly the videos will look when embedded into your content.

Drupal 8 has an out-of-box support for embedding YouTube and Vimeo videos by means of the oEmbed technology. However, Drupal 8’s basic API makes it possible to also set up this “cooperation” with any other oEmbed providers.

How oEmbed works in Drupal 8 

In Drupal 8.6.0 with its oEmbed, we will immediately notice its novelty as compared to Drupal 8.5.6. First of all, an experimental module “Media Library” is in its core, which allows you to save and reuse media. Together with the Media module, the Media Library module should be enabled.

We have previously mentioned that the Media module introduced Media Types for Drupal 8 websites. So another great novelty of Drupal 8.6.0 is that, in addition to the already “traditional” Media Types in Drupal 8.5.x, there is a new one called “Remote Video.” See the difference:

Drupal 8.5.6:

How oEmbed works in Drupal 8

Drupal 8.6.0:

oEmbed in Drupal 8.6.0

When opening the “Remote Video” configuration tab, we see that this media type is already perfectly preconfigured. However, it also has options for us. We can configure the allowed providers and the video thumbnail location, as well as for field mapping.

oEmbed feature in Drupal 8 oEmbed feature in Drupal 8

OK, let’s see how any content editor or user — according to your website’s permissions and content creation scenarios — can embed a video from YouTube.

They can do it by going to Content — Add Media — Remote Video. And you see that the form is incredibly easy. Adding a URL is all they need!

oEmbed feature in Drupal 8


 So the newly added video is already saved in the website’s Media Library. What we now need is to display it in our content.

Here the options are unlimited! Site builders and administrators can decide which content types should have the video embedding feature (news, blog posts, products, bios, and so on). All they need is to add the “Media” field to particular content types.

In our example, we have added the “Media” field to the article content type and called it “OEmbed video.”

oEmbed in Drupal 8

Let’s rearrange the fields a little to place the oEmbed video immediately after the article body.

oEmbed in Drupal 8

From now on videos are embeddable into any article. For this, the article creation form now has an “OEMBED VIDEO” option where we will click “Browse media,” immediately see all the videos we have saved, and select the needed ones.

oEmbed in Drupal 8

So here goes our article with the video embedded into it!

Drupal 8 oEmbed feature

To recap

You can admit it — the new oEmbed feature in Drupal 8 looks really good! We have shown its basic settings, but there are more to play with.

If you need help with that, or if you want to customize the embedding functionality to your needs, you are welcome to contact our Drupal 8 development team

And, of course, if you are not with the amazing Drupal 8 yet, reach out to us for an upgrade.

If you already are with Drupal 8, ask us and we will update you to Drupal 8.6.0 in the first days of September, as soon as it appears — bringing the oEmbed feature and plenty of others!

For any of these tasks, contact our Drupal experts, and let Drupal 8 work its magic on your site!

Aug 20 2018
Aug 20

When you combine different technologies, you multiply their powers, and the results are stunning! That’s what happens, for example, when Drupal cooperates with JavaScript tools. Drupal 8’s brand-new architecture with API-first improvements gave it especially impressive integration capabilities. However, to make things even better, enthusiasts created Drupal Waterwheel. Plenty of interesting details about it are coming right now. So let’s set the wheels turning — or, better to say, the waterwheels!

Drupal and JS: the rise of decoupled architecture

To explain the importance of Drupal Waterwheel, we need to mention the decoupling “boom”. In recent years, it is increasingly popular to use a CMS as a data source, while exposing this data to another front-end, or even a whole ecosystem of devices. 

In case with Drupal, the front-end “fiddle” is played by React, Angular, Vue, Ember, Backbone, and many other lightning-fast JavaScript frameworks. This approach is known as decoupled, or headless Drupal

With the strong “back” provided by the most powerful CMS such as Drupal, the newly-made sites and apps impress users with a sky-high level of interactivity and speed. They are able to create unique users experiences and significantly increase your audience.

It’s not only that Drupal developers choose JavaScript frameworks for decoupling. The creators of various JS applications also choose Drupal as a backend CMS. However, some of them are not acquainted with it. That’s where Waterwheel comes for help!

Drupal Waterwheel, its mission and work

Waterwheel is meant to make Drupal more understandable to non-Drupal and non-PHP developers. For customers, this means a wider choice of developers who can implement their wished. 

Basically, Waterwheel is an ecosystem of SDKs (software development kits) that help developers obtain data from Drupal and manipulate it in various ways. 

Drupal Waterwheel frees them all from the need to know the ins and outs of Drupal’s core REST. This inspires them to choose Drupal as the backend CMS, as well as speeds up the development processes.

When we talk about the Waterwheel ecosystem, we should first of all mention the Waterwheel.js — a generic JS library, which helps handle Drupal 8 data via Drupal REST and JSON API. It is a great fit both for progressively decoupled and fully decoupled scenarios.

There also are framework-specific tools like the following: 

  • React Waterwheel App — a sample application based on Drupal 8 and Waterwheel.js to demonstrate integration with React.js
  • Ember Whatewheel App — a sample application to demonstrate the integration of Drupal and Ember.js via JSON API
  • Ember Drupal Waterwheel — a helpful add-on for the developers of Ember apps that consume Drupal data.

A special Drupal module called Waterwheel is meant for those who want to have resource discovery in their application for the sake of client-side validation. However, the module has become obsolete is no longer needed. Instead, you can rely on the OpenAPI module to obtain the resource information from Drupal.

Final thoughts

With the help of such great assistants as Drupal Waterwheel, it’s high time to fulfil the most ambitious ideas about combining Drupal with JavaScript tools.

Our Drupal developers also have great skills with JavaScript technologies. They can help you create the perfect decoupled setup or other integration scenario. And, of course, if you have a Drupal 7 or 6 website, our experts can migrate you to Drupal 8 with its awesome integration perspectives.

Contact our Drupal development team — and you will amazed at what your site or application can do in the right combinations!

Jul 26 2018
Jul 26

News and media websites appreciate sensations. OK, here is a real sensation for them! No other word is big enough to describe Drupal 8 — the latest version of the famous site-building platform. Drupal 8’s benefits are awesome for all kinds of sites. But today we have a special journalistic investigation — we’ll discover how Drupal 8 can be useful particularly to news and media websites.

Drupal 8’s benefits for news and media websites

  • Easy media handling as a priority for Drupal 8

News and media website editors regularly create, upload, or edit various kinds of multimedia. Making these processes convenient was a priority in Drupal 8. And the goal has been successfully achieved!

The new media handling system is superb. It lets editors manage audios, videos, images, and files exactly in accordance with their preferences. This includes working with both locally stored media and those from third-party sources (YouTube, Instagram, Pinterest, SlideShare, and every other site imaginable). Editors can save media in the library for further use, create custom media types, use the drag-and-drop and the oEmbed features, and much more.

This is achieved thanks to the awesome Media module that came to the Drupal 8 core as of Drupal 8.5.x. It remains the focus of developers’ attention with new features added frequently. The Media module is also extensible with many useful contributed modules that touch every aspect of media handling.

  • Super convenient content editing

Tons of content every day — that is often the reality of news and media websites. Luckily, working with content is a joy in Drupal 8.

Inline editing without leaving the page lets your content managers quickly fix any possible typos with no need to visit the admin dashboard.

quick edit on drupal 8

Other benefits include the drag-and-drop features, copying directly from Word, super easy image adding, the clean and modern HTML5 markup, the possibility to shape your toolbar as you wish, handy content previews, and much more.

Among the freshest novelties are the Content Moderation and Workflows modules in Drupal 8 core that help you create fine-tuned content moderation processes with different content states.

This works perfectly with Drupal’s flexible system of user roles and permissions. For example, your news publication workflows can involve a copywriter, an editor, a moderator, and anyone else you want with any permissions you decide.

  • Drupal 8’s exceptional multi language features

Especially for international news and media websites, multiple languages are important. However, even local resources find this feature very useful. It helps them bring their message across to more audiences.

Drupal 8 has absolutely fabulous multi language possibilities. The four built-in modules let you add languages to your websites. You have a choice of over 100 languages,  and their interfaces are already translated by the community.

You can also decide exactly what will be translatable on your site. In addition to interface, Drupal 8 lets you translate website configuration (account settings, users roles, comment types, and more).

And, of course, you can translate content.

adding translations

Editors will appreciate how easy it is to add translations to their pieces of news.

adding a translation
  • Third-party integration is in full bloom

Thanks to Drupal 8 unmatched integration capabilities, your news and media website will easily interact with external systems.

RSS feeds, social media integration, monetization tools, content sharing to iOs or Android applications are just a few examples of this.

Drupal 8 is API-first — it has special core modules for outputting any content via a REST API. Non-RESTful approaches are also possible.

While outputting your content, the magic Drupal 8 modules converts it to the necessary format (JSON, HAL, and so on).

  • High speed and special caching techniques

Drupal 8 will take care of your website speed, even during very high loads. It has great built-in caching modules.

One of them, the BigPipe module, offers a very special technique that raises the perceived loading speed. It instantly delivers the unchanged parts of your website to users (your header, news categories etc.). The dynamic elements, like your newly added pieces of news, “arrive” next. Thanks to this, your readers are not bored — they do not wait for the whole page to load.

  • Mobile responsiveness as a key

Users consume news website content from all possible devices, often on the fly. Is your website ready? Drupal 8 has a mobile-first approach and is perfect for creating mobile responsiveness.

All website elements will adapt themselves to various device screens (shrink, grow, hide) to create a great user experiences with minimum zooming and scrolling.

To recap

We have only raised the veil a little bit — Drupal 8 has plenty of other treasures. If you wish to order the creation of an amazing Drupal 8 news and media website, or migrate to Drupal 8 — you are welcome to contact our Drupal expert team.

You, your audience, and your editors will be delighted with Drupal 8!

Jul 02 2018
Jul 02

One of the sure ways of engaging your visitors is using various multimedia on your website. In Drupal 8, great attention has been paid to creating a perfect media management system. Congrats! A novelty of 2017-2018, the brilliant Media module in Drupal core is now one of Drupal 8’s greatest benefits. Let’s do a little overview of what the Media module gives you, how it works, and which Drupal 8 minor versions already have it available.

The Media module in Drupal 8

Drupal 8’s Media module is a lucky “blend” that inherits the functionality and API from the Media Entity module, as well as the Media Entity Image and Media Entity Document.

It is a whole framework for uploading and managing various media (audio, videos, and images), as well as files. This applies both to locally stored media and those from third-party sources (various social media, services, and so on).

The Media module is extensible with add-on contributed modules. They provide additional integration and other features related to Audio, Remote video, Slideshow, Twitter, Facebook, Instagram, Flickr, Spotify, Pinterest, Slideshare, DropzoneJS, GoogleDocs, and many more.

Together with them, the Media module lets your create any desired media handling scenarios.

This includes displaying media in your content exactly the way you want (as plain text, as thumbnail, with image, with author, and so on), uploading media with a drag-and-drop feature, integrating slideshows, cropping images, and much more.

The Media module: media types, fields, and sources

All the above mentioned things are possible thanks to important Drupal 8’s media handling concepts, one of which is media types. Like Drupal content types, media types are part of the site’s structure. Media types are represented by individual media entities (for example, a particular tweet).

It is possible to add fields to media types and manage their display. There is a special Media field available to add to content types so that media can be attached to content.

Field mapping is a truly remarkable feature of the new media system. It lets you pull various types of data from the third-party media and store them as “classic” Drupal fields. For example, you can choose to show the tweet’s author in your content, date of publication, and so on.

When enabled, the Media module immediately offers four built-in media types:

  • Audio
  • File
  • Image
  • Video

Content editors and site administrators are also free to create their own media types. Each custom media type will be based on a particular “media source” that should be selected once and for all.

The media source adds some special logic to your media type. They include field mapping opportunities, using the provider’s API, generating thumbnails, and many more, according to the media source.

Media sources include the built-in audio, file, image, and video, and there are many others provided by the relevant contributed modules.

The fast-changing Media and Drupal 8 versions

In addition to being an important security practice, regular website updates let you enjoy new features. This has never been as true as when it comes to the Media module in Drupal 8.

The Media is so hot on the Drupal community agenda that its capabilities change incredibly fast. To catch up with them, you need to regularly update your Drupal 8 website to the latest minor version.

The Media module “jumped” into the Drupal 8 core in Drupal 8.4.x. So, Drupal 8.4.x became the first version where the Media module could be seen. Well, not literally — the module itself was hidden from the dashboard. In the meantime, the Media API was ready for developers so they could polish their related contributed modules.

In Drupal 8.4.x, one of the of the ways to “call” the Media module into action was to enable some contributed module responsible for specific areas of media handling (Twitter, Facebook, Instagram etc.). Drupal then asked you to enable the Media module as a dependency.

Despite these difficulties, the functionality was already quite usable and similar in many ways to that in Drupal 8.5.x.

Drupal 8.5.x, the newest stable version of Drupal 8, gave the official start to the Media module as part of the core.

Polished and improved, available on the “Extend” dashboard, the Media module was finally ready to impress content editors and inspire website owners to update to Drupal 8.5.

More great news: the oEmbed feature

There is one more feature actively discussed and expected with impatience. Enthusiastic drupalers have finally added the oEmbed support to the Media module.

OEmbed is an open format that allows you to display content from a third-party provider, when a user inserts an URL. The oEmbed format is supported by Facebook, YouTube, Vimeo, and most other famous providers.

Drupal 8’s got an API for working with oEmbed services. It also now has plugin to support YouTube and Vimeo out-of-box.

The oEmbed feature will be officially available with the release of Drupal 8.6.x. Right now, Drupal 8.6.x is being tested and improved, and is expected to come out in early September.

To recap

That’s a just a very brief overview of the Media miracle of Drupal 8 core — the Media module. In connection with this, we have some more great news:

  • Our Drupal team is always ready to assist you in creating media entities and fine-tuning the media management processes.
  • Of course, regularly updating your site to every new minor Drupal 8 version (Drupal 8.5, Drupal 8.6) is a breeze for us.
  • Finally, if you are not yet using Drupal 8, a smooth upgrade is one of our areas of expertise.

If you have any questions, you are welcome to apply. Let your Drupal website be incredibly engaging thanks to the perfect use of multimedia!

Jun 11 2018
Jun 11

A million words are not enough to describe Drupal 8’s benefits for websites. Its amazing third-party integration opportunities, multilingual superpowers, mobile-first approach, easy content editing, and many other features convince website owners that it’s time to upgrade to Drupal 8 or build a D8 site from scratch. But especially impressive are Drupal 8 website architecture changes. With them, website development processes are far more efficient, and every website is much easier to create, deploy, maintain, update, or extend. We will now look behind the curtain and see a little more.

The need for big architectural changes

Drupal’s founder Dries Buytaert explained some of the reasons why Drupal needed big architectural changes. Forward-looking changes are always necessary for a CMS to stay on top. With Drupal 8 changes, the community wanted to resolve certain limitations of Drupal 7, modernize Drupal as much as possible, and make it universally understandable so that companies of all sizes could easily find developer talent.

To achieve this, Drupal adopted Symfony components, modern PHP concepts, OOP, Twig template engine, and more. It rebuilt its core, APIs, configuration management system, and so on. The results are stunning — Drupal 8 architecture is truly brand-new compared to that of Drupal 7. Let’s take a closer look at some of these changes.

Drupal 8 and its new website architecture

Drupal 8 and OOP

Here is something that makes website code better structured, highly reusable, very maintainable and extensible, and also easy to read by non-Drupal developers. This is the adoption of OOP (object-oriented programming) in Drupal 8.

As opposed to traditional, or procedural programming, OOP has most of the code presented as classes and objects of these classes. Objects have certain properties and use certain methods.

The three major principles of OOP include encapsulation, inheritance, and polymorphism. Developers deal with namespaces, indenting and whitespace, naming conventions, and so on.

Sounds complicated? Well, OOP PHP does present a learning curve for developers, which is made up for by numerous benefits.

Drupal 8: “Symfony inside”

The new version of Drupal contains the components of Symfony 2 — the modern, object-oriented, PHP-based framework.

It is not necessary for Drupal developers to learn Symfony as a framework — they just need to get acquainted with Symfony components, and the reward is amazing.

With Symfony 2, Drupal development becomes even more flexible and in line with trending technologies.

And, of course, this significantly saves development time. With no need to “reinvent the wheel” and build everything from scratch, Drupal developers can use plenty of ready solutions for various projects.

Among all the inherited Symfony 2 components, the strongest impact on D8 core has probably been made by DependencyInjection, EventDispatcher, and Routing.

Twig template engine in Drupal 8

A true “jewel” of Drupal 8 front-end architecture is the Twig template engine that replaces Drupal 7’s PHPTemplate.

Twig gives you clean templates with consistent code. Thanks to its inheritance in Twig files, duplicate code is avoided. The logic and presentation are properly separated. And, overall, Twig is more secure, easier to work with, and richer in options.

“You don’t need extra modules for features like slideshows or widgets on your page. You can do it in the theme,” said Mark Ferree and Matt Cheney in their webinar about best practice architecture in Drupal 8.

Drupal 8 and Composer

Composer has been called the best thing that has happened to the world of PHP, and Drupal 8 is now using the best.

This command-line tool manages your website dependencies — all the necessary libraries and packages you need. Composer lists all your website’s dependencies in the special composer.json file.

Saying “dependency manager” cannot fully describe Composer’s powers. The tool is helpful on every step of Drupal 8 development.

A good tone, and a very convenient practice in Drupal 8 allows you to use Composer for installing and updating Drupal core, modules, and themes, applying patches, and more. Commands like “composer create-project” and “composer update drupal/core” are just a couple of examples of numerous commands that can do magic in the terminal.

Powerful Drupal 8 core

The heart of Drupal, its core, has become more powerful than it has ever been before. So you no longer need extra modules for many of your needs — a lot of things can be done with D8 core capabilities.

Drupal 8 also introduces lots of new APIs that deal with everything, be it caching, migration, third-party integration or anything else.

The admin dashboard alone is like a flight control console.The Views module is now in the core, and gives you almost unlimited opportunities in structuring and presenting your content in accordance with to all imaginable settings. Intriguing novelties like the Layout Builder module help create layouts for content items and lets anyone feel the architect of their site with no coding as well. And that’s just the beginning.

Final thoughts

Let some awesome story begin right now — upgrade to Drupal 8 or order a new website creation. Our developers love Drupal 8, create modules and patches for it, and teach D8 classes to newbies. They know how to use the benefits of new Drupal 8 website architecture for you. Drop them a line!

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