Feeds

Author

Jan 15 2019
Jan 15

Every city has its ways — and we invite you to an imaginary city that follows the Drupal Way! ;) Just with the names of real Drupal modules, themes, and distributions, we at WishDesk team created the Drupal City map. Today that we celebrate Drupal’s 18th birthday, it’s a great chance 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 this 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, a special purpose of Drupal City is to let anyone learn Drupal modules in a cheery and engaging way. By clicking on the module images, you can see their brief descriptions and visit their pages on drupal.org. Here and there, we also left little hints 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 were fitting 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. But this 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 torments of choice, we chose the modules whose names just better fitted the map concept.

If you would like to see other Drupal modules, themes, or distributions on the Drupal City map, 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 also appeared the Workspaces module in Drupal 8.6, which we want to give an overview 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 piece-by-piece moderation processes 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 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 mind that you will not be able to do all usual actions while in the environment other than the default one. For example, it will not possible to create content types, generate dummy content with the Devel module, and more. 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 see no 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 check the visibility of our articles in the Incognito window. The articles show 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