Planet Drupal

Subscribe to Planet Drupal feed - aggregated feeds in category Planet Drupal
Updated: 9 hours 3 min ago

InternetDevels: Views in Drupal 8: how is the most popular module doing?

4 October 2016 - 7:14am

Since Drupal is a content management framework, so it’s worth mentioning a module which reflects the very essence of content management — the Views, of course. Simple but powerful, the Views is the most popular module, installed on over two-thirds of Drupal sites.

Read more
Categories: Drupal

Acquia Developer Center Blog: Retrieving and Manipulating Content with Waterwheel.js

4 October 2016 - 6:57am

In my previous blog post in this Waterwheel series, I detailed the basics of Waterwheel.js: how to set it up in server-side or client-side JavaScript, and how resource discovery can bring Drupal-backed applications and traditional Drupal implementations closer together in unprecedented ways. In this post, I explore how to manipulate content with Waterwheel.js.

Tags: acquia drupal planet
Categories: Drupal Drupal 8 Views: How to formulate the route name

4 October 2016 - 4:35am

This article will explain how to formulate the route name for a view because there are very few sources for the information online.

Categories: Drupal Blog: AGILEDROP: Drupal and the internet of things

3 October 2016 - 11:32pm
What is Internet of Things (IoT)? A good and straightforward description can be found on Wikipedia “The internet of things (IoT) is the network of physical devices, vehicles, buildings and other items—embedded with electronics, software, sensors, actuators, and network connectivity that enable these objects to collect and exchange data.” In a little simpler words the IoT is a way that everyday objects have the connection to the Internet, allowing them to receive and send data. Those things can actually be almost everything and we can already find them in many branches, like healthcare,… READ MORE
Categories: Drupal Blog: AGILEDROP: Drupal and the internet of things

3 October 2016 - 11:32pm
What is Internet of Things (IoT)? A good and straightforward description can be found on Wikipedia “The internet of things (IoT) is the network of physical devices, vehicles, buildings and other items—embedded with electronics, software, sensors, actuators, and network connectivity that enable these objects to collect and exchange data.” In a little simpler words the IoT is a way that everyday objects have the connection to the Internet, allowing them to receive and send data. Those things can actually be almost everything and we can already find them in many branches, like healthcare,… READ MORE
Categories: Drupal If you're still on Drupal 6, you should switch to Pressflow ... ASAP!

3 October 2016 - 12:33pm

If you have a site that's still on Drupal 6, you're not alone. As of about a week ago, there's still over 88,000 Drupal 6 sites out there!

While support from the community ended on February 24th, the Drupal 6 Long-Term Support vendors have been hard at work, releasing over 20 security fixes for various contrib so far, including very popular modules like Views and Panels!

While the D6LTS vendors haven't released any security fixes for Drupal 6 core yet - it's only a matter of time!

If you want to be ready for it when they do, we recommend that you update to Pressflow. But that's not the only reason!

Read more to find out why and how!

Categories: Drupal

Palantir:'s Guide to Digital Governance: Properties and Platforms

3 October 2016 - 11:58am's Guide to Digital Governance: Properties and Platforms's Guide to Digital Governance brandt Mon, 10/03/2016 - 13:58 Scott DiPerna Oct 3, 2016

This is the second installment of’s Guide to Digital Governance, a comprehensive guide intended to help get you started when developing a governance plan for your institution’s digital communications.

In this post we will cover...
  • What's next after the 10,000ft view
  • What properties you need to think about
  • Applications and integrations you also need to consider 

Stay connected with the latest news on web strategy, design, and development.

Sign up for our newsletter.

Having started at the 10,000ft view to assess the digital ecosystem for our governance planning, part two of the Guide to Digital Governance begins to identify the specific properties and platforms you will need to consider within that ecosystem.

Taking the top level categories you listed for your governance plan in part one, you now will want to think of the properties and platforms within each of them. The following questions are intended to help you think through each piece carefully.

Public Websites

  • What are the websites we own that are visible to anyone on the Web?
  • Do we have any public subdomain Websites, such as
  • Do we have any micro-sites, or Websites with a URL that is different from our main site?
  • Do we have any blogs that may be hosted elsewhere, but would be considered part of our public Web presence?

Private Websites

  • What are the Websites we own that are visible to only those with access we control?
  • What are the Websites we own that are visible to only those who have access through machines running on our organization’s network?
  • Do we have any subdomain Websites, such as that require logging in?
  • Do we have any Websites for only a specific set of constituents?

Intranets and Portals

  • Do we have a network of internal-use Websites (a.k.a an Intranet), accessible only by password or by logging on to the organization’s network, or otherwise hidden (even by obscurity)?
  • Do we use any portal sites or pages as a means of aggregating links of importance for specific groups of users?

Web-Based Applications

  • Are there any web-based applications we use to perform specialized tasks, such as generating reports from data in a database or retrieving digital assets from a database?
  • Are there any online tools that we use (whether built internally or purchased from a third-party vendor as software-as-a-service (SaaS)?


  • What platforms, systems, and/or services do we use for collecting payments online?
  • What platforms, systems, and/or services do we use for selling products online?
  • Where are these located relative to our other Websites?

Social Networks

  • What are the social media networks we use to communicate to the outside world?

Digital Media

  • What are the platforms we use to create digital media, such as video, audio, and photography?
  • What are the platforms we use to distribute digital media, such as video, audio, and photography

Broadcast Email

  • What are the systems we use to send broadcast email to all or large segments of our internal group, members, staff, community, etc.?
  • What are the systems we use to send broadcast email to all or large segments of our external community, clients, constituents, etc. for the purposed of marketing and promotion?

Digital Communications Governance

  • What are the pieces that will constitute our official governance system?
  • NOTE: You may not know the answer to this one yet, so leave it empty for now.


This post is part of a larger series of posts, which make up a Guide to Digital Governance Planning. The sections follow a specific order intended to help you start at a high-level of thinking and then focus on greater and greater levels of detail. The sections of the guide are as follows:

  1. Starting at the 10,000ft View – Define the digital ecosystem your governance planning will encompass.
  2. Properties and Platforms – Define all the sites, applications and tools that live in your digital ecosystem.
  3. Ownership – Consider who ultimately owns and is responsible for each site, application and tool.
  4. Intended Use – Establish the fundamental purpose for the use of each site, application and tool.
  5. Roles and Permissions – Define who should be able to do what in each system.
  6. Content – Understand how ownership and permissions should apply to content.
  7. Organization – Establish how the content in your digital properties should be organized and structured.
  8. URLs – Define how URL patterns should be structured in your websites.
  9. Design – Determine who owns and is responsible for the many aspects design plays in digital communications and properties.
  10. Personal Websites – Consider the relationship your organization should have with personal websites of members of your organization.
  11. Private Websites, Intranets and Portals – Determine the policies that should govern site which are not available to the public.
  12. Web-Based Applications – Consider use and ownership of web-based tools and applications.
  13. E-Commerce – Determine the role of e-commerce in your website.
  14. Broadcast Email – Establish guidelines for the use of broadcast email to constituents and customers.
  15. Social Media – Set standards for the establishment and use of social media tools within the organization.
  16. Digital Communications Governance – Keep the guidelines you create updated and relevant.

We want to make your project a success.

Let's Chat.
Categories: Drupal

Dries Buytaert: Drupal's collective purpose

3 October 2016 - 7:46am

When I was on vacation in Italy this summer, I had no internet, which gave me a lot of time to think. Some of that time was spent reflecting on why I do what I do. I have been working on Drupal for over 15 years and on Acquia for almost 10 years. The question of what gives me meaning and purpose has changed drastically over that time.

Evolving purpose

I started Drupal because I wanted to build a website for myself and a few friends — an internet message board to exchange messages. In the early days of Drupal, I was obsessed with the code and architecture of Drupal.

As I wrote in 2006: "I focused completely and utterly on creating fewer and fewer lines of more elegant code.". I wanted Drupal to be pure. I wanted the code to be perfect. For Drupal to be architected in the right way, I had to rewrite it multiple times and strip away anything that wasn't necessary – I couldn't imagine preserving backwards compatibility as it meant we had to drag along a lot of historical baggage. My mission in the early days was to keep the platform fast, clean and on the leading edge of technology.

As time passed and Drupal started growing, my role evolved. More people became involved with Drupal, and I thought more about scaling the community, including our tools, processes and culture. I started to focus on building the Drupal Association, promoting Drupal, handling trademark issues, and last but not least, setting the overall direction of the project. In the process, I started to worry less about achieving that perfect vision and more about the health of the community and collaborating on a shared vision.

While I miss programming, I have come to accept that I can't do everything. Every day when I wake up, I decide where I want to focus my energy. My guiding principle at this time in my life is to optimize for impact. That means enabling others versus doing much programming myself.

Meaningful moments: part I

While in Italy I decided to make a list of the moments in Drupal's history that stand out as particularly meaningful or purposeful. I started to discover some patterns in these moments, and ended up sorting them into two groups. Here is the first set:

  • When people find Drupal, and it gives them a better career path and ultimately changes their life. I got goosebumps when almost 3,000 people stood up at DrupalCon San Francisco when I asked "Please stand up if Drupal changed your life". I often talk to people that went on to make a full-time living with Drupal – or even start a Drupal business – to provide better lives for their families. Some of these stories, such as Vijaya Chandran Mani's, are deeply impactful.
  • Seeing how Drupal is used for aid relief, like in the aftermath of the 2013 tornado in Moore, Oklahoma. Members of the Drupal community worked throughout the night to create a website for victims to help each other.
  • Seeing how Drupal has made a meaningful impact on the Open Web movement. Over the last 10 years, millions of people have created Drupal sites that express their creative freedom and individuality. In recent years, I've become concerned about the Open Web's future and have spoken out on how the Drupal community is uniquely positioned to help preserve the open web. I believe it's an important mission that we should all embrace, so the original integrity and freedom of the Open Web remains intact for our children and grandchildren.

All of these moments suggest that my purpose is self-transcendent – I get meaning when my work matters more to others than it does to myself. Organized into radiating circles, the impact on each of these groups gives me purpose: individual Drupalists, the Drupal community, Drupal end users, and the open web. This is why I've become so passionate about things like usability, internationalization and accessibility over the years.

I know it's not just me; my team interviewed many other people that have the same feelings of finding meaning when their work results in life-changing outcomes. One great example is "Franck" Seferiba Salif Soulama, who hopes that training more young people in Drupal can lift people from Burkina Faso, Africa out of poverty. He wants to provide them job opportunities so they don't have to leave their country. Other examples are Drew Gorton or Ronan Dowling. There are many people like Franck, Drew or Ronan around the world that have a positive domino effect on others.

Meaningful moments: part II

The second group of moments I wrote down weren't necessarily self-transcendent, but still gave me purpose. Here are a few examples:

  • Fundraising after the great server meltdown. In 2005, we had to raise money to buy new infrastructure for We nearly had to shut down and could have lost everything. While it was a difficult time, this moment was especially meaningful as it helped us come together as a community.
  • Having to ask individuals to leave the project or change their behavior because their values weren't aligned with the project. While providing critique or removing someone from the project has never been never easy, I'm proud of the times we stand up for our values.
  • Getting Drupal 8 over the finish line after 4.5 years of hard work. At times, many people doubted our progress, questioned whether we were making the right decisions, and even left our project. While the development process wasn't always fun in the moment, when we did release parties around the world, we all felt a real sense of accomplishment. In the long run, we built something that will keep Drupal relevant for many years to come.

Many of us find meaning when the hard and uncomfortable work results in life-changing outcomes for others. Not only does this type of work provide purpose, some people believe it is the recipe for success. For example, Angela Lee Duckworth's TED talk on grit applies directly to the work that is done by Drupal's maintainers.

How do we scale purpose?

Hearing all of these inspirational stories makes me think: How we can attract more people to the project, but do so in a way that ensures we share our core values (like giving back)? While there are no straightforward answers to this question, there are many organizations that are doing great things in this area.

One example is the Drupal Campus Ambassador Program which hopes to appoint ambassadors in every university in India to introduce more students to Drupal and help them with their job search. While at Drupalcon India earlier this year, I met Rakesh James, who has personally trained 600 people on Drupal!

Another example is the Drupal apprenticeship program in the UK, which focuses on recruiting new talent to the Drupal community. Participants get an extensive Drupal bootcamp to help them with their job search. Many of these apprentices are disadvantaged young people who have great talent and aptitude, but might be lacking the traditional route or access to a meaningful career path.

I'd love to take programs like these global – they instill our values, culture and a sense of purpose to many new people. If you know of similar initiatives, or have ideas to share, please do so in the comments section.

Based on my own introspection, and hearing from amazing Drupalists from around the world, I truly believe that Drupal is fueled by a collective sense of purpose that sets us apart from other open source software communities and organizations. We need to keep this purpose in mind when we make decisions, especially when the going gets tough. What is your sense of purpose? And how can we scale it around the world?

Categories: Drupal

Gábor Hojtsy: Checking on Drupal 8's rapid innovation promises

3 October 2016 - 6:44am

Starting with Drupal 8, we decided to make more rapid innovation possible by releasing minor versions every 6 months that may come with new features and backwards compatible changes. Now that we released Drupal 8.1.0 and almost 8.2.0 as well, how did we do? Also what else is possible and what is blocking us to make those moves? What do all the changes mean for how might Drupal 9 unfold?

Dries Buytaert posted last Wednesday The transformation of Drupal 8 for continuous innovation and on the same day I presented Checking on Drupal 8's rapid innovation promises at DrupalCon Dublin. Here is a video recording of my session, which should be good for those looking to get to know Drupal's release process and schedule, as well as how we made it possible to experiment within Drupal core directly with Drupal 8. While I did hope for more discussion on the possibilities within Drupal 8 with the participants, somehow the discussion pretty much ended up focusing on Drupal 9, when it should be released and how much change should it come with.

Categories: Drupal

DrupalEasy: Book review: Drupal 8 Development Cookbook

3 October 2016 - 5:51am
Really good content in the wrong format.

Drupal 8 Development Cookbook, written by Matt Glaman is full of useful information about Drupal 8 site building and development - and a worthy addition to anyone's Drupal library. Unfortunately, the "cookbook" format of the book seems to subtract, rather than add, to the usually well-explained concepts throughout.

The book covers an impressive array of topics: Everything from setting up a local environment to many of the technical details of the Entity API. No matter what your skill level with Drupal, there is likely to be something in this book of interest. Having been a Drupal professional for over ten years, I found the chapters on plugins, configuration management, the Entity API and web services especially interesting and educational.

Each chapter (there are 13) includes an often-too-brief introduction, followed by several "recipes." Each recipe includes several sections, including "Getting ready," "How to do it…," "How it works…," "There's more…," and "See also." While the How to do it… sections usually contained the bulk of the narrative, I often found myself wanting more details in the How it works… section. Additionally, I felt that each recipe often didn't have an adequate introduction. The crazy part is that the information I was looking for was often in the How it works… section - presented after the How to do it… section. I think this will lead to some initial confusion by readers asking themselves "why am I doing this?" until they read the How it works… portion. Usually, all of the information was there, just not in the right order (for me at least.) This is especially apparent in the "Plug and Play with Plugins" chapter where I found the How it works… sections more valuable than the How to do it… sections. They really would have been better leading off each recipe.

The author clearly has a firm grasp of the material. This usually shines through in most of the recipes, but there are times in the book where I think the author assumes the reader has a similar level of knowledge - which leads to some disconnects in the narrative. One example of this is the "Creating a custom content type" recipe. There is very little introduction, and I feel that it assumes the reader has a firm grasp of the power of content types (and fieldable entities, for that matter.) This, and several other recipes would benefit greatly from beefed-up introductions (including Features, text formats, some of the Front-end recipes and plugins [especially explaining why we use annotations.])

The recipes also vary widely in their complexity. I'm not sure this if this is a good or bad thing, but perhaps some sort of "complexity level" rating should have been applied to each one to give the reader a heads-up. This is illustrated well with the fact that the plugins chapter assumes the reader has a firm understanding of object-oriented PHP. Granted, I don't expect the author to write a primer on the topic, but a warning in the introduction, or aforementioned complexity level, would have helped smooth the transition into this chapter.

As one example of the format forcing things to be out-of-order, the book begins with the assumption that the reader has a local development stack installed, which is not an unreasonable assumption. But for readers who are new to local development environments, after the recipe to install Drupal 8, in the There's more… section, the author presents valuable information about how to create a database and a database user. There is no mention of this material prior to the How to do it… section. I can easily imagine a scenario where a reader is attempting the recipes in the order they are presented without reading ahead, and being extremely frustrated until they find the There's more… section. A mention of it earlier in the chapter would go a long way here.

The book does a really nice job covering topics I didn't expect to see - including DrupalVM, Entity Reference Views displays, a thorough explanation of a module's .info.yml file and routing files (who knew you could validate a route name with RegEx right in the .routing.yml file!) There is a really nice chapter on configuration management (although more of an introduction on content vs. configuration would have been extremely useful) and Entity API.

For Drupal 7 developers moving to Drupal 8, "The Entity API" chapter is worth the cost of the book. This chapter solidified and extended the knowledge I already had. Its introduction is solid and the chapter includes examples for both content and configuration entities. While it suffers from some of issues I've already mentioned (great content, wrong format,) for the most part it overcomes these challenges and goes much deeper into the topic than I had hoped. Well done!

At the same time, the book also covers a few topics in places where I thought it was a little too aggressive - having a "Running simpletest and PHPUnit" recipe in chapter 1 is a good example. In addition, I believe I spotted a few bugs in the book - both in the narrative and in the code samples - I've forwarded them to the author. Also, in some chapters, the author is writing about a moving target. There are more than a few places where he is forced to reference active issues. As these issues are resolved, recipes may spoil (food pun!)

There were more than a few recipes that involved custom module development; all of which are well-written, technically on-point, and will be extremely useful for Drupal 7 developers moving to Drupal 8. Since this is a book review, I have to pick on one point - all of the recipes were presented as if the developer is writing them from scratch. In reality, I've found the vast majority of Drupal 8 developers building custom modules for clients take full advantage of Drupal Console's "generate" command. While the author does formally introduce this in the last chapter of the book, it feels like it's not in the right place. By introducing it earlier many of the recipes could be written to take advantage of it.

Who would I recommend this book to? If you're a Drupal 7 developer looking to learn Drupal 8 development, this book is a great resource. While there are several introductory and site-building chapters that won't be very useful to you, the more advanced chapters provide (usually) adequate background information along with practical examples (ahem, recipes) to get you going. Would I recommend this book for beginners? If you have a solid PHP background, then yes. In my opinion, the author is more than capable of writing an intermediate-to-advanced Drupal 8 development book - leave the introductory stuff to someone else.

Categories: Drupal

Drupal core announcements: Drupal 8 and 7 core release window on Wednesday, October 05, 2016

3 October 2016 - 4:16am
Start:  2016-10-04 12:00 - 2016-10-06 12:00 UTC Organizers:  xjm stefan.r catch David_Rothstein Event type:  User group meeting

The monthly core patch (bug fix) release window is this Wednesday, October 05. Drupal 7.51 will be released with fixes for Drupal 7. This is also the release window for Drupal 8.2.0, the next scheduled minor release of Drupal 8. (Read the release candidate announcement for more information on the minor release.)

To ensure a reliable release window for the patch and minor releases, there will be a Drupal 8.2.x commit freeze from 12:00 UTC Tuesday to 12:00 UTC Thursday. The final patches for 7.51 have been committed and the 7.x code is currently frozen (excluding documentation fixes and fixes for any regressions that may be found prior to the 7.51 release). So, now is a good time to update your development/staging servers to the latest 8.2.x-dev or 7.x-dev code and help us catch any regressions in advance.

If you do find any regressions, please report them in the issue queue. Thanks!

To see all of the latest changes that will be included in the releases, see the 8.2.x commit log and 7.x commit log.

Other upcoming core release windows after this week include:

  • Wednesday, October 19 (security release window)
  • Wednesday, November 02 (patch release window)

Drupal 6 is end-of-life and will not receive further releases.

For more information on Drupal core release windows, see the documentation on release timing and security releases, as well as the Drupal core release cycle overview.

Categories: Drupal

Drupal governance announcements: Is Drupal the right tool for and the project itself?

2 October 2016 - 7:04pm

Just started a discussion about it here:

Hope you join the discussion and share your thoughts.


Reply here

Categories: Drupal

Enzolutions: My DrupalCon Dublin experience

2 October 2016 - 5:00pm

Last week I had the opportunity of participate in my 6th DrupalCon and my second European DrupalCon.

But, to be honest, this one is the most important DrupalCon for me until now, I know the first one it's always especial, but in this case, represent a lot for me, because the relevance as speaker in this event.

I have been in a roller coaster of emotions since I was notified that my proposal to present as Community Keynote was accepted; Since that moment I have been working a lot to try to provide the best material I could do to try to share with the community my view and perception of global Drupal Community.

During my keynote, I talk about the tour Around the Drupal world in 140+ days and I present some proposals I think that could be implemented improve the engagement with the global community because right now I think we are an international community, but we need to be global.

Keynote resources:


Tour video: Chinese version

But, before the keynote, I participate as co-presenter with Jesus Manuel Olivas my business partner at weKnow.

Our first session was Drupal Console: An overview of the new Drupal CLI.

The second session was Learn the new things in Drupal 8 via debugging

The cherry on the cake were the B.OF.s Writing Moder CLI commands for Drupal 8 and Improving your Drupal 9 development workflow with Composer that Jesus and I lead during Drupal Con.

Last, but not least; I had the opportunity to participate in Code Sprints to try to advance in our goal to have the first release 1.0.0 stable for Drupal Console project.

In general, I am very satisfied with the comments and feedbacks from the Drupal community; Now I could say I have a lot of ideas to contribute via code and community hacks to try to improve as a product as well as a community.

Airplane Distance (Kilometers) San Jose , Costa Rica → Dubline , Ireland 9564 Previously 87,040 Total 96,604 Walking Distance (steps) Dublin 102.470 Previously 1.678.485 Total 1.780.955 Train Distance (Kilometers) Today 0 Previously 528 Total 528 Bus/Car Distance (Kilometers) Today 0 Previously 2.944 Total 2.944
Categories: Drupal

Dcycle: When not to use Drupal

1 October 2016 - 5:00pm

Unless you work exclusively with Drupal developers, you might be hearing some criticism of the Drupal community, among them:

  • We are almost cult-like in our devotion to Drupal;
  • maintenance and hosting are expensive;
  • Drupal is really complicated;
  • we tend to be biased toward Drupal as a solution to any problem (the law of the instrument).

It is true that Drupal is a great solution in many cases; and I love Drupal and the Drupal community.

But we can only grow by getting off the Drupal island, and being open to objectively assess whether or not Drupal is right solution for a given use case and a given client.

“if you love something, set it free” —Unknown origin.

Case study: the Dcycle blog

I have built my entire career on Drupal, and I have been accused (with reason) several times of being biased toward Drupal; in 2016 I am making a conscious effort to be open to other technologies and assess my commitment to Drupal more objectively.

The result has been that I now tend to use Drupal for what it’s good at, data-heavy web applications with user-supplied content. However, I have integrated other technologies to my toolbox: among them node.js for real-time websocket communication, and Jekyll for sites that don’t need to be dynamic on the server-side. In fact, these technologies can be used alongside Drupal to create a great ecosystem.

My blog has looked like this for quite some time:

It seemed to be time to refresh it. My goals were:

  • Keeping the same paths and path aliases to all posts, for example blog/96/catching-watchdog-errors-your-simpletests and blog/96 and node/96 should all redirect to the same page;
  • Keep comment functionality;
  • Apply an open-source theme with minimal changes;
  • It should be easy for myself to add articles using the markdown syntax;
  • There should be a contact form.

My knee-jerk reaction would have been to build a Drupal 8 site, but looking at my requirements objectively, I realized that:

  • Comments can easily be exported to Disqus using the Disqus Migrate module;
  • For my contact form I can use;
  • Other than the above, there is no user-generated content;
  • Upgrading my blog between major versions every few years is a problem with Drupal;
  • Security updates and hosting require a lot of resources;
  • Backups of the database and files need to be tested every so often, which also requires resources.

I eventually settled on moving this blog away from Drupal toward Jekyll, a static website generator which has the following advantages over Drupal for my use case:

  • What is actually publicly available is static HTML, ergo no security updates;
  • Because of its simplicity, testing backups is super easy;
  • My site can be hosted on GitHub using GitHub pages for free (although HTTPS is not supported yet for custom domain names);
  • All content and structure is stored in my git repo, so adding a blog post is as simple as adding a file to my git repo;
  • No PHP, no MySQL, just plain HTML and CSS: my blog now feels lightning fast;
  • Existing free and open-source templates are more plentiful for Jekyll than for Drupal, and if I can’t find what I want, it is easier to convert an HTML template to Jekyll than it is to convert it to Drupal (for me anyway).
  • Jekyll offers plugins for all of my project’s needs, including the Jekyll Redirect Form gem to define several paths for a single piece of content, including a canonical URL (permalink).

In a nutshell, Jekyll works by regenerating an entirely new static website every time a change is made to underlying structured data, and putting the result in a subdirectory called _site. All content and layout is structured in the directory hierarchy, and no database is used.

Exporting content from Drupal to Jekyll

Depending on the complexity of your content, this will likely be the longest part of your migration, and will necessitate some trial and error. For the technical details of my own migration, see my blog post Migrating content from Drupal to Jekyll.

What I learned

I set out with the goal of performing the entire migration in less than a few days, and I managed to do so, all the while learning more about Jekyll. I decided to spend as little time as possible on the design, instead reusing brianmaierjr’s open-source Long Haul Jekyll theme. I estimate that I have managed to perform the migration to Jekyll in about 1/5th the time it would have taken me to migrate to Drupal 8, and I’m saving on hosting and maintenance as well. Some of my clients are interested in this approach as well, and are willing to trade an administrative backend for a large reduction in risk and cost.

So how do users enter content?

Being the only person who updates this blog, I am confortable adding my content (text and images) as files in Github, but most non-technical users will prefer a backend. A few notes on this:

  • First, I have noticed that even though it is possible for clients to modify their Drupal site, many actually do not;
  • Many editors consider the Drupal backend to be very user-unfriendly to begin with, and may be willing instead of it to accept the technical Github interface and a little training if it saves them development time.
  • I see a big future for Jekyll frontends such as which provide a neat editing interface (including image insertion) for editors of Jekyll sites hosted on GitHub.

I am not advocating replacing your Drupal sites with Jekyll, but in some cases we may benefit as a community by adding tools other than the proverbial hammer to our toolbox.

Static site generators such as Jekyll are one example of this, and with the interconnected web, making use of Drupal for what it’s good at will be, in the long term, good for Drupal, our community, our clients, and ourselves as developers

Unless you work exclusively with Drupal developers, you might be hearing some criticism of the Drupal community, among them:

Categories: Drupal

Jeff Geerling's Blog: Drupal VM supports MySQL, MariaDB, and PostgreSQL

1 October 2016 - 11:52am

The PostgreSQL logo. Same family as PHP's mascot!

For the past few years, I've been intending to kick the tires of PostgreSQL, an open source RDBMS (Relational DataBase Management System) that's often used in place of MySQL, MariaDB, Oracle, MS SQL, or other SQL-compliant servers. Drupal 7 worked with PostgreSQL, but official support was a bit lacking. For Drupal 8, daily automated test builds are finally being run on MySQL, SQLite, and PostgreSQL, so many of the more annoying bugs that caused non-MySQL database engines to fail have finally been fixed!

Categories: Drupal

Amazee Labs: A day at DrupalCon with Inky

1 October 2016 - 2:33am
A day at DrupalCon with Inky

Now that all the talking is over, it's time to get down to some real work!

Ingrid Talbot Sat, 10/01/2016 - 11:33

The last big party was held last night at the Annual Trivia Night. It is apparently always hosted by the Irish contingent, so expectations were high, and were seemingly exceeded. For me being a first-timer at Trivia Night, I was quickly snapped up onto a team as I came with newbie bonus points. It was a hysterical evening, which few people outside of the Drupal community would ever be able to appreciate.

Friday is a day for all remaining delegates to get together and sprint. While there are sprints happening throughout the week, as there are no other presentations, this is the day for focused and mentored sprinting, to help get new people involved and allow teams to gather to work together.

A "sprint", in Drupal terms, is when developers and interested parties get together to work on further building and developing the core Drupal project. While it's not the only way to contribute back to Drupal, it is the most significant and direct.

I joined the First-Time Sprinters Workshop where we were guided through the installation of a local environment and other supporting tools. I got to use IRC for the first time since 2003, which was a bit of a flashback, and for me enforced what -enzo- had talked about yesterday. It also gave me the opportunity to explore Drupal 8.3.0 which is due to be released next week.

While all the guys around me were getting dug into code, I struggled to find a non-coding issue to help out on. Until Shannon Vettes of Acquia got hold of me, and some other Project Managers, to discuss how we can help, without needing to write a line of code.

I was then introduced to a variety of Core Contributors and ended up being added, in some loose way, to the team behind the Migration Initiative. The intention is, that as a PM, I can help them sort through the issue queue and maybe provide a bit of focus at times.

Various other Amazee's were already stuck into their issues at hand and helping out as Mentors.

When lunch came out there was great fascination at the gorgeous, wooden lunchboxes that appeared. Filled with fresh and tasty food.

By the afternoon, people were spread out all over the place, finding any gap to gather around to hold discussions.

All good things must eventually come to an end. And while the Sprints will continue over the weekend, I eventually had to leave to catch my plane out. It has been quite a fabulous week, with many thanks to everyone who contributed in any way.

But wait, there's more!

As I got onto the bus, another delegate was sadly taking off his accreditation lanyard and tucked it away. But then he noticed me and shuffled over. He had seen my presentation with Josef on Tuesday and had a few questions. So my conference extended all the way to the airport.

Go dtí an bhliain seo chugainn!

Categories: Drupal

ActiveLAMP: Drupal as an Integration Point: DrupalCamp LA 2016 Table Talk - pt. 3/5

30 September 2016 - 6:01pm

Part three of our table talk! This week the agency owners of Achieve Internet, Stauffer, ActiveLAMP and Facet Interactive discuss the power of Drupal as an integration point.

Categories: Drupal

Dries Buytaert: Acquia a leader in 2016 Gartner Magic Quadrant for Web Content Management

30 September 2016 - 11:43am

This week Acquia was named a leader in the Gartner Magic Quadrant for Web Content Management. We're quite excited about it at Acquia as it's the third year in a row that we received this recognition from Gartner.

Organizations planning large WCM deployments rely on reports such as the Gartner Magic Quadrant for Web Content Management to give them a comprehensive view of the competitive landscape. Acquia's strong placement will cause many organizations to give Drupal a closer look for their content management projects. Acquia is the only open source company included among the six leaders, and as CMSWire's Dom Nicastro reported, "Acquia made the biggest positive move" of all the solutions ranked in Gartner's report.

What I found especially interesting in this year's report was their observation that the WCM market is beginning to split in two subcategories: the first subcategory treats the web as an ever more important channel for marketing and communications; the second subcategory is focused on more profound digital transformations, where WCM is a strategic technology to create new business models and build new digital experiences.

Drupal is used for both. Johnson & Johnson, MillerCoors and Motorola are examples of brands that are creating digital experiences to support their marketing and communications. Look to the City of Boston's work to reimagine citizen engagement, or the innovation at Hubert Burda Media to transform the publishing industry for the next digital age as examples of the latter.

Categories: Drupal

Acquia Developer Center Blog: Getting Started with Waterwheel.js and Resource Discovery

30 September 2016 - 10:47am

For developers of Drupal-backed JavaScript applications, simply having an HTTP client which can make requests against Drupal 8’s core REST API is often not enough. JavaScript developers are sometimes stymied by nuances unique to Drupal which leak out when consuming Drupal’s REST API, such as Drupal-specific paths for resources and confusing data structures in responses. Waterwheel.js alleviates these barriers to JavaScript developers by providing an additional API atop Drupal REST which allows you to retrieve and manipulate content entities in Drupal 8 without needing to deeply understand Drupal’s internals.

Tags: acquia drupal planet
Categories: Drupal Routing and controllers in Drupal 8

30 September 2016 - 10:25am

The routing system of Drupal 8 is a complete rewrite of Drupal 7 and its previous versions' hook_menu. A Drupal route is a URL path with a specific return content. This return content is usually specified as a method of a controller class which returns a render array.

The routing system is powered by Symfony's HTTP Kernel component, which we will revisit later. It is not necessary to understand this in order to work with routes.

Let's dive straight away and create a new route.

First, we shall create a module to hold all the code in this chapter. You can checkout the code:

$ git clone $ cd myroute $ git checkout -f simple-route

or walk along with me by typing the code or using drupal console to generate it.

$ drupal generate:module Enter the new module name: > myroute Enter the module machine name [myroute]: > Enter the module Path [/modules/custom]: > Enter module description [My Awesome Module]: > Routing and controllers Enter package name [Custom]: > D8MD Enter Drupal Core version [8.x]: > Do you want to generate a .module file (yes/no) [yes]: > no Define module as feature (yes/no) [no]: > Do you want to add a composer.json file to your module (yes/no) [yes]: > no Would you like to add module dependencies (yes/no) [no]: > Do you confirm generation? (yes/no) [yes]: > Generated or updated files Site path: /var/www/html 1 - modules/custom/myroute/

Let's write a simple controller which prints "hello world" when we hit the path /hello.

$ drupal generate:controller Enter the module name [email_management]: > myroute Enter the Controller class name [DefaultController]: > HelloWorldController Enter the Controller method title (to stop adding more methods, leave this empty) [ ]: > Hello World Enter the action method name [hello]: > Enter the route path [/myroute/hello/{name}]: > hello Enter the Controller method title (to stop adding more methods, leave this empty) [ ]: > Do you want to generate a unit test class (yes/no) [yes]: > no Do you want to load services from the container (yes/no) [no]: > no Do you confirm generation? (yes/no) [yes]: > Generated or updated files Site path: /var/www/html 1 - modules/custom/myroute/src/Controller/HelloWorldController.php 2 - modules/custom/myroute/myroute.routing.yml // router:rebuild Rebuilding routes, wait a moment please [OK] Done rebuilding route(s).

Make sure you enable the module.

$ drush en myroute -y

Open modules/custom/myroute/src/Controller/HelloWorldController.php and change the markup text to "Hello World".

public function hello() { return [ '#type' => 'markup', '#markup' => $this->t('Hello World') ]; }

you might need to rebuild cache.

$ drush cr

Hit /hello.

The equivalent Drupal 7 code for this would be something on the lines of

// inside myroute.module... function myroute_menu() { $items = array(); $items['main'] = array( 'title' => Hello World', 'page callback' => myroute_hello', 'access arguments' => array('access content'), 'type' => MENU_NORMAL_ITEM, 'file' => '' ); return $items; } // inside function myroute_hello() { return t(‘Hello World’); } Routes with parameters

This is great, but how to add URL parameters?

Let's add a new route with a URL parameter.

$ cd myroute $ git checkout -f route-with-params

or if you choose to use drupal console,

drupal generate:controller Enter the module name [email_management]: > myroute Enter the Controller class name [DefaultController]: > GreetingController Enter the Controller method title (to stop adding more methods, leave this empty) [ ]: > Greeting Enter the action method name [hello]: > greeting Enter the route path [/myroute/hello/{name}]: > hello/{name} Enter the Controller method title (to stop adding more methods, leave this empty) [ ]: > Do you want to generate a unit test class (yes/no) [yes]: > no Do you want to load services from the container (yes/no) [no]: > Do you confirm generation? (yes/no) [yes]: > Generated or updated files Site path: /var/www/html 1 - modules/custom/myroute/src/Controller/GreetingController.php 2 - modules/custom/myroute/myroute.routing.yml // router:rebuild Rebuilding routes, wait a moment please [OK] Done rebuilding route(s).

Edit the greeting controller function to print the name.

public function greeting($name) { return [ '#type' => 'markup', '#markup' => $this->t('Hello, @name!', ['@name' => $name]), ]; }

Try /hello/Joe.

/hello/123-456 works too. Let's tone it down a little and add a validation criteria for the parameter.

Names can only have alphabets and spaces.

myroute.greeting_controller_greeting: path: 'hello/{name}' defaults: _controller: '\Drupal\myroute\Controller\GreetingController::greeting' _title: 'Greeting' requirements: _permission: 'access content' name: '[a-zA-z ]+'

Rebuild the cache for this to take effect.

$ drush cr

/hello/123-456 will now give a 404. Try /hello/Joe%20Pesci.

Custom permissions

How about adding custom permissions? What if we want to show the /hello page only to users who can administer content.

$ cd myroute $ git checkout -f custom-access-check

We first indicate that the route uses custom permissions.

myroute.hello_world_controller_hello: path: 'hello' defaults: _controller: '\Drupal\myroute\Controller\HelloWorldController::hello' _title: 'Hello World' requirements: _custom_access: '\Drupal\myroute\Controller\HelloWorldController::custom_access_check'

Note that the _permission parameter has been replaced by _custom_access parameter.

Lets implement this custom access method inside the HelloWorldController.

// add the required namespaces at the top. use Drupal\Core\Session\AccountInterface; use Drupal\Core\Access\AccessResult; /** * Custom access check * * @param \Drupal\Core\Session\AccountInterface $account * access checking done against this account. */ public function custom_access_check(AccountInterface $account) { return AccessResult::allowedIf($account->hasPermission('access content') && $account->hasPermission('administer content')); }

Rebuild cache and try hitting /hello as an anon user, you should get an "Access denied" page. Of note here is the AccessResult class, which was introduced to make access check related data cacheable.

Dynamic routes

Defining routes via a YAML file applies to static paths. If we want to route programmatically, we have to define and return a \Symfony\Component\Routing\Route object.

$ cd myroute $ git checkout -f dynamic-routes

To illustrate the concept of dynamic routes, let's take an imaginary requirement where we have a custom path, /content_types/{content_type}, which will display all the fields of a content type {content_type}. In order to create a dynamic route for the same, we have to create our own Routing class inside the src/Routing directory and override the routes() method. This is equivalent to its YAML cousin, the myroute.routing.yml file, but written in PHP.

<?php /** * @file * Contains \Drupal\myroute\Routing\CTRoutes. */ namespace Drupal\myroute\Routing; use Symfony\Component\Routing\Route; /** * Dynamic routes for content types. */ class CTRoutes { /** * {@inheritdoc} */ public function routes() { $routes = []; $content_types = \Drupal::service('entity.manager')->getStorage('node_type')->loadMultiple(); foreach ($content_types as $content_type) { $routes['myroute.content_type_controller.' . $content_type->id() ] = new Route( '/content_types/' . $content_type->id(), array( '_controller' => '\Drupal\myroute\Controller\CTController::fields', '_title' => 'Field info for ' . $content_type->label(), 'content_type' => $content_type->id(), ), array( '_permission' => 'access content', ) ); } return $routes; } }

The custom router above creates an array of routes for every content type in the system and returns it. For instance, if there are 3 content types in the system, like page, foo and bar, there will be 3 routes with paths /content_types/page, /content_types/foo and /content_types/bar respectively.

Let's flesh out the CTController as well.

<?php namespace Drupal\myroute\Controller; use Drupal\Core\Controller\ControllerBase; /** * Class CTController. * * @package Drupal\myroute\Controller */ class CTController extends ControllerBase { /** * List fields info of a content type. * * @return string * Return field list. */ public function fields($content_type) { $render = '<table><tr><th>' . $this->t('Field type') . '</th><th>' . $this->t('Label') . '</th></tr>'; $field_definitions = \Drupal::entityManager()->getFieldDefinitions('node', $content_type); foreach ($field_definitions as $field_name => $field_definition) { if (!empty($field_definition->getTargetBundle())) { $render .= '<tr><td>' . $field_definition->getType() . '</td><td>' . $field_definition->getLabel() . '</td></tr>'; } } $render .= '</table>'; return [ '#type' => 'markup', '#markup' => $render, ]; } }

The field() method looks up the field definitions of the contenttype argument and renders it as a HTML table.

Finally, we have to indicate Drupal to pick up the custom Routing class we've added. This can be done by adding a _route_callbacks item to the routing YAML file.

route_callbacks: - '\Drupal\myroute\Routing\CTRoutes::routes'

Rebuild the cache and you are all set. Hit the content_types/article page, you should see something like this(provided you have the article CT in your system).

Categories: Drupal