Planet Drupal

Subscribe to Planet Drupal feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 14 hours 37 min ago

Four Kitchens: DrupalCon New Orleans 2016

5 May 2016 - 12:00pm

We’re packing up our green gear and heading to the Big Easy for DrupalCon 2016! …

Categories: Drupal

Palantir: It's here: Workbench for Drupal 8

5 May 2016 - 9:00am

In Dries’ latest blog post about the state of Drupal 8 adoption, he mentions the results of a survey of 1,800 people. The number one reason that people haven’t upgraded to Drupal 8 yet is availability of modules.

Feature readiness is a critical topic for agencies and clients alike. At Palantir, it particularly affects the Workbench series of modules. We developed Workbench for Drupal 7 to address a set of common editorial problems:

  • An editorial workspace customized for each editor, which shows what work needs to be done next.
  • A draft-revision-published workflow.
  • Review states that require permission to publish content.
  • The ability to create a new “forward revision” waiting for approval while retaining the published version.
  • An extensible, consistent workflow system.
  • Access controls that grant access to specific sections of a website using a hierarchy that maps to an organization chart.

The modules are a cornerstone of every site we build in Drupal 7 – and many that we don’t.

We're happy to report that Workbench is available for Drupal 8.

We receive emails and calls often inquiring about the state of Workbench in Drupal 8; folks in government, higher education, nonprofits, and media all use Workbench. It's a testament to the module suite, and how vital it has been to countless organizations over the years, regardless of industry. In fact, our own Director of Production Scott DiPerna used to run digital at our client Barnard College, and used Workbench extensively:

"Another difficult, though probably common, requirement dealt with access and permissions. With 40-plus academic departments and roughly 200 regular editors of the overall website, Barnard's permissions needs don't fall neatly along the lines of traditional Drupal publishing rights.

For this reason, we needed a system that could handle granular levels of access to particular pieces of content, such that an editor could have access to edit one sibling and its children, but not all siblings of the first.

The Workbench module developed by Palantir handles these needs well by using a hierarchical vocabulary to set levels of access for each piece of content."

Scott is right: the module addresses a common need. So common, in fact, that our partner Acquia has included Workbench as part of its new author-focused Lightning distribution for Drupal 8.

Want to learn more about Workbench for Drupal 8? We're hosting a free webinar on May 24th at 1:00pm CDT, and would love for you to join us. What is Workbench?

Workbench is made up of three essential modules, which provide the functionality listed above. Here’s is an update on the current status of each.

Workbench Moderation
Thanks to a grant from the Module Acceleration Program at Acquia, and the work of the content staging group, Workbench Moderation has a stable release. We’ll be talking about that process at DrupalCON, too. The work we’ve been doing in this space also factors in to Dries’ call for better content authoring tools, so expect to see more from us in this space.

Workbench Access
We’ve been working on access controls for a very long time. (Over 10 years.) Our priority for Drupal 8 has been on moderation, so access is a bit of a side project. You can download pre-alpha code from https://github.com/agentrickard/workbench_access and see the list of required features at https://github.com/agentrickard/workbench_access/issues. The good news, however, is that we’re actively testing the module on a client project, so we expect a stable release by midsummer.

Workbench
The core Workbench module is largely a collection of custom Views that create dashboards for content editors. With Views in core, this module is less critical now, and we’ve made sure that both Workbench Moderation and Workbench Access provide Views support. So you can roll your own dashboards for now while we decide on the architecture for how to provide these as a default module.

Ken Rickard is the product owner and one of the original architects of the Workbench module suite. He’ll be at DrupalCON next week, so drop us a line or come by booth 222 if you’d like to chat.

We're closer than ever on the remaining modules, so if you'd like to play an integral part in the development of these important modules as a funding partner, let's talk.
Categories: Drupal

ThinkShout: See You in the Big Easy

5 May 2016 - 8:00am

Next week, nine of us will ship out to New Orleans for DrupalCon. As excited as we are to finally enjoy an authentic beignet and explore the French Quarter, the real draw here is the opportunity to once again catch up with our friends and collaborators in the Drupal community.

We’ve been hard at work preparing our presentations and lining up BoF schedules, and putting those finishing touches on our booth. All that’s missing is you! We have five short days to see what all DrupalCon has to offer, and meet everyone we want to meet. Can we do it? Two words: Challenge accepted.

As always, if you’re reading this and you plan on attending DrupalCon, too, we want to meet you! Here’s what we’ve got lined up.

Exhibit Hall

This year, booth 216 is the ThinkShout headquarters! Rest assured, we brought the swag. Shirts, socks, and MailChimp hats await you, so be sure to stop by and grab one before they’re all gone! We’ll also be raffling off another BB-8. All you have to do is sign up for our newsletter by dropping off a business card. Painless, right?

We’ll also be on the lookout for folks interested in pursuing the senior engineer position we recently listed, so if you think you might be a good fit for the position and you’ll be at DrupalCon, then let’s chat! Drop us a line and we’ll set up a time to get to know each other a little better. Or just show up - that’s fine too.

ThinkShout Sessions

Content Strategy in Pop Culture” - Wednesday (5/11), 1:00pm - 2:00pm

Join Brett Meyer for an unconventional look at content strategy through a pop culture lens. Draw parallels between the information you consume every day and the sites you build, and have a little fun while doing it!

The Story of Successful Drupal Integrations in 3 Acts” - Thursday (5/12), 10:45am - 11:45am

Lev Tsypin will share the stories of the MailChimp, iATS Payments, and Salesforce Drupal integrations, and share some insight into how to be successful when setting out to integrate Drupal with other third party systems.

Birds of a Feather (BoF) Discussions

Our team has three birds of a feather discussions planned on the Tuesday of DrupalCon, so mark your calendars and join the conversation!

Fundraising in Drupal” - Tuesday (5/10), 11:00am - 12:00pm

Static Fanatic: Tips on Developing Static Sites” - Tuesday (5/10), 11:00am - 12:00pm

Event Registration in Drupal” - Tuesday (5/10), 3:45pm - 4:45pm

Of course, we also plan on checking out the many wonderful social events that DrupalCon has in store in the evenings, so there’s a good chance you’ll see us there as well! It’s going to be a jam-packed week, and we can’t wait. As always, we’re looking forward to catching lots of sessions, brushing up on trends, and learning new things. We hope to see you there!

Categories: Drupal

Acquia Developer Center Blog: Free Advanced Acquia Academy Courses on Lift: Personalization, User Interface, and Best Practices

5 May 2016 - 6:23am

Acquia Academy is filled with courses to help our community, customers, and partners build amazing digital experiences. Our goal is to advance learners for the next challenge, no matter if they are leading front-end developers, or want-to-be leading developers.

For instance, Acquia Lift enables developers to create dynamic and targeted site personalization campaigns. We have the tools to bring any audience up to speed.

Tags: acquia drupal planet
Categories: Drupal

Valuebound: How to Create Breadcrumb in Drupal 8

5 May 2016 - 3:57am

In this tutorial we will go through how to create breadcrumb in Drupal 8. In Drupal 7 we were using drupal_set_breadcrumb to get breadcrumb as pre requirement, but in Drupal 8 drupal_set_breadcrumb() is removed and breadcrumb is added as service.

In Drupal 8, service is introduced as new concept to decouple reusable functionality. Also to make these services pluggable and replaceable by registering them with a service container. For a developer, services are used to perform operations like accessing the database or sending an e-mail.

Let's try it now!

Let's add our own new builder which will make all "article" node, appear as breadcrumb children of a View. We need to implement the BreadcrumbBuilderInterface, We'll add a class to our module…

Categories: Drupal

KnackForge: How to delete an order if the order is in cart for N days

5 May 2016 - 2:45am
How to delete an order if the order is in cart for N days

In drupal commerce, the order will be created when a product is added to cart and the order will exist until the order is deleted or order status is changed to completed.

We have an e-commerce site in which most of the orders are idle in the shopping cart. So we decided to delete the order if the order is in the shopping cart for more than 'N' days or weeks. I have written a custom drush command for deleting the order.

The following code is used to delete an order if it is in the cart for more than 25 days.
 

Thu, 05/05/2016 - 15:15
Categories: Drupal

NEWMEDIA: DrupalCon Supports Women in Tech

5 May 2016 - 2:10am
DrupalCon Supports Women in Tech The Drupal Community allows developers and users to join forces to share and grow their Drupal skills during a three-times-a-year, weeklong conference. Fortunately, DrupalCon also is growing the presence of women at these meetups—not only as attendees but as leaders. Jennifer Forker Thu, 05/05/2016 - 09:10

DrupalCon New Orleans will do what every DrupalCon does: showcase improvements to the Drupal platform in a collaborative, social atmosphere. Drupal is made stronger this way, as those who develop, use and support the Drupal platform converge in one location to do what the Drupal community does best: share openly and creatively. As the Drupal Association, which organizes each DrupalCon, says, attendees “come for the software, stay for the community.” 

At least 21 percent of the more than 3,000 attendees expected to attend DrupalCon in May identify as women and 19 percent of speakers are female—a slight uptick from past conferences, according to Drupal Association Events Manager Rachel Friesen. 

Two of the women who’ll be at DrupalCon are from newmedia—thanks to the creation of the Project Managers track, a first for a North American DrupalCon. Associate Project Manager Naomi Wells is looking forward to learning more about Drupal-focused project management. 

“You can learn project management from so many angles,” says Wells, “but this is Drupal specific, and that’s what’s exciting to me. This is the industry I’m in.”

Wells and Senior Project Manager Rachel Rosenblum will join Karyn Cassio, a Drupal software and DevOps engineer for the University of Colorado, Boulder, who regularly attends DrupalCon and is co-leading a session about diversity and inclusion at the upcoming conference. 

“Of course, I think there needs to be more women at these, but most tech conferences have female attendance numbers at around 7 percent,” says Cassio, “so our DrupalCon numbers are looking pretty good.” 

DrupalCon welcomes its female participants with a Women in Drupal event early in the conference that’s open to women, trans individuals, anyone who identifies outside of the “gender binary,” and allies. The social hour provides connections so attendees need not wander the conference halls lonely. “Our goal is to foster inclusivity and embrace the involvement of individuals across the gender spectrum,” says the DrupalCon website. 

Cassio looks forward to connecting with other women at DrupalCon—in part because there are so few female Drupal engineers in Colorado—but she’d like to see more women working in Drupal and in tech industries across the board.

“Women are good at this. We often think about a problem differently. And because it’s so male-dominated, women and our work are sometimes misunderstood,” says Cassio.

That’s where DrupalCon comes in. Fostering community and building lifelong connections is the DrupalCon mission for all those who attend. 

And newmedia supports that mission. 

We’ve been designing and developing websites for more than 20 years, growing to include a 47-person workforce that’s nearly equally male and female. 

“It comes down to the individual,” says newmedia Chief Technology Officer Kevin Bridges. “We hire people who want to work hard, are motivated and want to learn, then we help them grow to do that. A lot of our members grow beyond the jobs they were hired to do.” 

Bridges, a Drupal contributor since 2004, has been involved in the greater development community for more than 20 years—at Acquia and Bonnier Corp.—before joining newmedia three years ago. He helped craft DrupalCon content for years as a DevOps or coder track chair (these are the folks who make sure DrupalCon sessions are bleeding edge and engaging); he helped bring DrupalCon to Denver in 2012.

Bridges and newmedia know the industry is booming: At newmedia, we have more than a dozen jobs open, including for website developers, designers, site builders and engineers.  

There’s no end in sight to the tech boom in Denver or elsewhere in the United States. The U.S. Bureau of Labor Statistics predicts that computer and information technology jobs will grow by an additional 1.4 million positions from 2014 to 2024—due in part to cloud computing, big data storage and demand for mobile computing. Demand will be greatest for software developers, support technicians and systems analysts—jobs accompanied by decent wages. 

Already, filling our tech positions—from the big companies to small shops—is big news around the country. I know from my own perch at newmedia that C-level executives talk about how to attract the highly talented and skilled employees needed to get our burgeoning work done. I’ve received a handful of queries from newspaper reporters in the past month—all seeking input for a “tech hiring practices” story. 

With the tech industry booming and more jobs coming down the pipeline, we need to beseech more women to enter the computing and software development ranks. That means encouraging middle and high school girls to take computer classes. Get that Drupal drive started young. 

“We need to teach our kids, and especially our girls, that in computing, you’re learning something new every day,” says Cassio. “It’s figuring out the best way, the most efficient way, to do something ... I love that I’ll never stop growing; that to me is super exciting.” 

At newmedia, colleagues have equal participation in professional and personal growth opportunities. Individuals have initiated well-attended, after-work JavaScript tutorials, and we attend tech-oriented meetups such as those hosted by SheSays Denver. Several of us non-developer types are learning how to use Drupal. It harkens back to that newmedia drive to learn, innovate and grow: Staff are encouraged to stretch beyond our abilities into new terrain. 

“For some people, the non-stop learning is the hook,” Bridges says. “You’re never a total expert in your field. If anyone says ‘I know it all,’ they’re kidding themselves.” 

Look for continued talk about how the Drupal Community may become more inclusive—encouraging more minorities and women to enter the Drupal-sphere—during Cassio’s session and throughout DrupalCon when it convenes May 9. 

“Being an ally will make all of us better developers,” says Cassio. “Because we learn code from one another, but we also learn more about ourselves—we stretch ourselves—when we work side by side with those we think are different.” 

Categories: Drupal

alimac.io: Mentoring at DrupalCon

4 May 2016 - 10:00pm
Mentoring at DrupalCon New Orleans DrupalCon New Orleans is next week. There will be sessions, trainings, social events, hallway tracks and more. The work on Drupal never stops. Bookending DrupalCon, there will be extended sprints and each day of the week there will be a sprint space at the venue open to all contributors, culminating with the big Friday Sprint (Friday the 13th, what could go wrong?). But wait... what is a sprint anyway? A sprint is a get-together for focused work on a project. Sprints ...
Categories: Drupal

Drupal Bits at Web-Dev: Deploy or Import Drupal Redirects with Hook Update Deploy Tools

4 May 2016 - 6:42pm

The Hook Update Deploy Tools module  can now programatically import a list of redirects in a hook_update_N().  The redirect list comes from a csv text file that lists old-path, new-path on each line.  Running the import in an update hook is as simple as something like this:

<?php
 
/**
 * Import Redirects for section A.
 */
function abc_migration_update_7004() {
  $message = HookUpdateDeployTools\Redirects::import('section-a');
  return $message;
}
?>

 

As with all the other things that Hook Update Deploy Tools can import, there is a focus on feedback, so you get a report of each line of the import as to which redirects were created, which were skipped due to being an infinite loop, a redirect of the home page, or already existing.  It also watchdogs a summary of the imports.   The import file containing the list of redirects can be saved in:

  • a Feature that controls redirects
  • a custom deploy module
  • a custom migrate module

As a bonus, the same redirect import logic that can be run in a hook_update_N can also be run through an import UI that Hook Update Deploy Tools makes available.

The logic of the redirects import correctly accounts for fragments (#) and queries (?) as well as some faulty URLs.

If you are using hook_update_N's to deploy your site changes and you aren't using Hook Update Deploy Tools, you should be.

Categories: Drupal

alimac.io: Mentoring at DrupalCon

4 May 2016 - 5:00pm
Mentoring at DrupalCon New Orleans DrupalCon New Orleans is next week. There will be sessions, trainings, social events, hallway tracks and more. The work on Drupal never stops. Bookending DrupalCon, there will be extended sprints and each day of the week there will be a sprint space at the venue open to all contributors, culminating with the big Friday Sprint (Friday the 13th, what could go wrong?). But wait... what is a sprint anyway? A sprint is a get-together for focused work on a project. Sprints ...
Categories: Drupal

Evolving Web: Speed up Drupal 8 block rendering with Blackfire.io

4 May 2016 - 2:02pm

We noticed Evolving Web's shiny new Drupal 8-powered blog was loading slower than in D7, and using the blackfire.io PHP profiler we were able to narrow down the bottleneck to Drupal 8's block visibility approach.

read more
Categories: Drupal

Commercial Progression: Drupal + Grunt + Browsersync: Part 2

4 May 2016 - 11:26am

This is part 2 of this blog series. Part 1 covers setting up Grunt and Browsersync, this part will focus on expanding what we created in part 1. It will focus on adding image compression to our Grunt setup. The methods used for image compression aren’t super important but setting up a watcher and using the newer Grunt plugin can be useful for many other things.

Compressing images

One of the things I often forget to do or don’t have the time to do manually, is compress images. By adding this to Grunt we don’t have to remember, it will do the work for us.

Imagemin

Let’s add this in:

npm install grunt-contrib-imagemin --save-dev

You can read more about what imagemin does here:

https://github.com/gruntjs/grunt-contrib-imagemin


We’ll need to add this to our Gruntfile.js to load the plugin:

grunt.loadNpmTasks('grunt-contrib-imagemin');

Next we’ll add an entry to be able to run the image compression:

  1. imagemin: {
  2. dist: {
  3. files: [{
  4. expand: true,
  5. cwd: 'images/source/',
  6. src: ['**/*.{png,jpg,gif,svg}'],
  7. dest: 'images/optimized/'
  8. }]
  9. }
  10. }

This will find any images found in the images/source directory and output a compressed version to the images/optimized. Make sure these directories are created and have appropriate file permissions so Grunt can read and write to them.

We need to tell Grunt to run our imagemin entry. In the terminal enter:

grunt imagemin

This should do what we wanted and compress all the images in images/source. This is nice, but it isn’t that automatic. It would be great if Grunt could just watch that directory and compress any image we place there without us telling it to.

Watcher

We’ll add a watcher to do that:

npm install grunt-contrib-watch --save-dev

We can set the watcher to watch anything we want. In this case we’ll have it watch the images/source directory for any new files and run our imagemin entry when it detects a change.

Let’s add our watch entry into our Gruntfile.js:

  1. watch: {
  2. images: {
  3. files: ['images/source/*.{png,jpg,gif,svg}'],
  4. tasks: ['imagemin']
  5. }
  6. },

Don’t forget to load the task by adding this:

grunt.loadNpmTasks('grunt-contrib-watch');

If you are following along from part 1 you will need to adjust your Browsersync entry a bit, the following line just above the injectChanges: false line in your Browsersync entry:

watchTask: true,

You’ll also need to adjust the grunt.registerTask at the bottom of the file to:

grunt.registerTask('default', ['browserSync', 'watch']);

This way both our watcher and browsersync can properly do their jobs.

Now when we simply run:

grunt

Our watcher and browsersync both fire up ready to work! Adding an image into images/source will trigger our imagemin job and compress all the images. This is much better, but there is still a problem. It is compressing every image in the folder! It would be preferred if it only compressed newly detected images to save time. Why compress every image every time we add a new one?

Newer

We’ll use a plugin called newer to solve this issue. The image compression is a good way to showcase this, but it can be used in all type of situations.

Let’s install the newer plugin:

npm install grunt-newer --save-dev

Let’s register the plugin in our Gruntfile.js:

grunt.loadNpmTasks('grunt-newer');

It’s very simple to use newer with our image watcher, simply adjust this in our watcher:

tasks: ['newer:imagemin']

Restart Grunt and try it out, it should only compress new files and leave the existing ones alone saving a lot of time.

This will conclude part 2 of the series. I plan on making more, we’ll cover SASS, a cool Drush plugin that can auto clear the caches for you when you change a template file, and testing mobile devices with Browsersync.

Categories: Drupal

Appnovation Technologies: Creating Tree Data Structure in Drupal

4 May 2016 - 11:07am

Sometimes you don’t want to use taxonomy for a building node structures of a tree, as it creates huge problems when you're trying to export them as features and involves things like UUID which is not perfect yet.

Categories: Drupal

Hook 42: Hook 42's Sessions, BoFs, and Events at DrupalCon New Orleans

4 May 2016 - 9:56am
Wednesday, May 4, 2016   Look out New Orleans, here we come!

We will be focused on a lot of topics in New Orleans including multilingual, SEO, project management, and teaching. If you are interested in all the multilingual happenings, check out the schedule of events. We hope to see you at a session, sprint, BoF, or after party!

BoFs

Teaching Drupal to Kids & Teens

Tuesday May 10th from 1pm to 2pm Kristen Pol  |  Room 292

We'll be sharing resources and ideas on how to approach teaching the next generation Drupal. This BoF will be on Google Hangouts for remote participation.

Drupal & SEO

Tuesday May 10th from 2:15pm to 3:15pm  |  Aimee Degnan  |  Room 286

We'll be sharing tips and tricks and best practices on search engine optimization including module usage and content strategy.

Sessions

The Multilingual Makeover: A side-by-side comparison of Drupal 7 and Drupal 8

Wednesday May 11th from 5pm to 6pm  |  Aimee Degnan & Kristen Pol  |  Room 260-261

If you create multilingual websites or are interested in what's all the hub-bub on how Drupal 8 is so much better than Drupal 7 for language support and translation, come check out this beginner-friendly session. If you find us after the talk, we'll give you some multilingual Drupal stickers. :)

I'm a Scrumberjack and I'm OK! Prioritizing Your Scrum Product Backlog for Drupal Work

Thursday May 12th from 10:45am to 11:45am  |  Aimee Degnan  |  Room 265-266

Drupal projects need to be managed sanely like all other software development projects. This session with give you some well-seasoned advice on using Scrum and business prioritization techniques to chop your backlog into manageable pieces.

Where's the fire? AKA: My site is down... now what?

Thursday May 12th from 2:15pm to 3:15pm Kristen Pol  |  Room 274

If you are on the hook when your site goes down or has an "emergency", you'll want to come to this session for tools, tips, and firefighting techniques that will make you sleep better at night.

Events

We are very happy to be sponsoring the Women in Drupal event again this year!

Tuesday May 10th from 6:30pm to 8:30pm at Gravier Street Social

This is a fun, casual, and supportive place to hang out with new and old Drupal friends. We hope to see you there!

  Swag

We'll have a number of our fun Drupal doodles stickers on hand: some tried and true like the multilingual "hello" Druplicon, as well as some fun new ones created especially for DrupalCon like the Drupal party-gator and spooooooooooky Drupal cemetery. Get a sneak peek at the new designs and read what we are excited about for New Orleans.

If you see one of us in the halls, let us know if you'd like some sticker swag. We'll also give them out at the Women in Drupal event and leave some at Booth 501 in the exhibit hall.

Laissez les bon temps rouler! Aimee Degnan Kristen Pol Topics: Services:
Categories: Drupal

FFW Agency: Simplify local development with Drude

4 May 2016 - 8:16am
Simplify local development with Drude David Hernandez Wed, 05/04/2016 - 15:16

As one of the largest Drupal agencies in the world FFW is no stranger to problems of scale. With large numbers of technical staff, clients, and concurrent projects, workflow management is vitally important to our work. And to deliver projects on time, while managing resources with agility, consistency and simplicity in the tools we choose plays a huge part.

When there are no standards for the tools a team uses (OS, editor, server, php version, etc.) dealing with the toolset adds unnecessary overhead that can eat away development time. You'll quickly find that setting up projects, on-boarding developers, troubleshooting, and even training all become more difficult as you deal with larger projects, larger teams, and more complex requirements.

To help solve these problems FFW created Drude.

What is Drude?

Drude (Drupal Development Environment) is a management tool for defining and managing development environments. It brings together common development tools, minimizes configuration, and ensures environment consistancy everywhere in your continuous integration worlflow. It automatically configures each project's environment to ensure team members are using the same tools, and versions, regardless of the individual requirements for each project. Most importantly, it makes the entire process easy.

With Drude you get fully containerized environments with Docker, cross-platform support (MacOS, Windows, and Linux,) built-in tools like drush, Drupal Console, composer, and PHP Code Sniffer, plug and play services like Apache Solr, Varnish, and Memcache, and even built-in testing support using Behat and Selenium. Drude will even automatically configure virtual hosts for you, so no more editing host files and server configurations.

With all of this you also get a management tool, which is the heart of Drude. dsh is a command line tool for controlling all aspects of your project's environment. You can use it to stop and start containers, interact with the host virtual machine, use drush and console to execute commands directly against your Drupal sites, and manage the installation and updating of projects.

Let's see how this works

Download the Drude shell command

​sudo curl -L https://raw.githubusercontent.com/blinkreaction/drude/master/bin/dsh -o /usr/local/bin/dsh sudo chmod +x /usr/local/bin/dsh

You can now use the dsh command.  Use it to install prerequisites, which includes Docker, Vagrant, and VirtualBox.

dsh install prerequisites
dsh install boot2docker

These are all one-time steps for setting up Drude. Now that's done, you only need to set up individual projects. To demonstrate how this works we have Drupal 7 and 8 test projects available. Check their GitHub pages for additional setup instructions, in case the below instructions don’t work for you.

https://github.com/blinkreaction/drude-d7-testing
https://github.com/blinkreaction/drude-d8-testing

Setting up a project.

Clone the Drupal 8 test project.

git clone https://github.com/blinkreaction/drude-d8-testing.git
cd drude-d8-testing

Use the init command to initialize local settings and install the Drupal site via Drush.

dsh init

Starting containers...
Creating druded8testing_db_1
Creating druded8testing_cli_1
Creating druded8testing_web_1
...
Installing site...
Installation complete.
User name: admin User password: 5r58daY2vZ [ok]
Congratulations, you installed Drupal!
[status]
real 1m18.139s
user 0m0.300s
sys 0m0.174s
...
Open http://drupal8.drude in your browser to verify the setup.

The init script automates provisioning, which can be modified per project. It can initialize settings for provisioned services, import databases, install sites, compile Sass, revert features, enable or disable modules, run Behat tests, and many other things.

Now, simply point your browser to http://drupal8.drude

That’s it! Any time a team member wants to participate in a project all they have to do is download the project repo and run the init command. And with the environments containerized, they can be deployed anywhere.

Why publicize all this?

Clearly, we've put in a lot of work building a great tool. One that we could easily keep to ourselves. Well, at FFW we are huge supporters of open-source. As one of the main supporters of the Drupal Console project, and a major supporter of Drupal, we believe that benefiting the community as a whole benefits us exponentially in return. We encourage anyone to use this tool, provide feedback, and even contribute to the project.

Tagged with Comments
Categories: Drupal

Acquia Developer Center Blog: Both Sides Now: What I Learned When I Jumped from the Supplier Side to the Client Side on the Same Project

4 May 2016 - 7:51am

Shortly after graduating, I found myself an internship with miggle, a UK-based Web development specialist that uses Drupal exclusively.

As a web production assistant, my primary role required me to look after the latter stages of a new website rebuild for an organization in the education sector.

Tags: acquia drupal planet
Categories: Drupal

Drop Guard: Amazee.io goes Drop Guard: for developers, for security

4 May 2016 - 5:30am
Amazee.io goes Drop Guard: for developers, for security Johanna Anthes Wed, 04.05.2016 - 14:30

2nd May 2016: amazee.io  just launched their Drupal hosting platform built for develeopers, which has a full integration into Drop Guard. And that’s when our common story started.

The Amazee team just dedicate themselves to the Drupal world: “We’re a secure, high-performance, cloud-based hosting solution built for folks who love their Drupal sites as much as we do”.

Drupal Planet Drupal Success Story Amazee Security Hosting
Categories: Drupal

OSTraining: Restricting Access to Content in Drupal 8

4 May 2016 - 3:03am

One of our OSTraining members wanted to restrict access to certain content on his Drupal 8 site.

To do this in Drupal 8, we are going to use the Content Access module.

To follow along with this tutorial, download and install Content Access. I found no errors while using this module, but please note that currently it is a dev release.

Categories: Drupal

Dries Buytaert: An overview of web service solutions in Drupal 8

4 May 2016 - 2:48am

Today's third-party applications increasingly depend on web services to retrieve and manipulate data, and Drupal offers a range of web services options for API-first content delivery. For example, a robust first-class web services layer is now available out-of-the-box with Drupal 8. But there are also new approaches to expose Drupal data, including Services and newer entrants like RELAXed Web Services and GraphQL.

The goal of this blog post is to enable Drupal developers in need of web services to make an educated decision about the right web services solution for their project. This blog post also sets the stage for a future blog post, where I plan to share my thoughts about how I believe we should move Drupal core's web services API forward. Getting aligned on our strengths and weaknesses is an essential first step before we can brainstorm about the future.

The Drupal community now has a range of web services modules available in core and as contributed modules sharing overlapping missions but leveraging disparate mechanisms and architectural styles to achieve them. Here is a comparison table of the most notable web services modules in Drupal 8:

Feature Core REST RELAXed Services Content entity CRUD Yes Yes Yes Configuration entity CRUD Create resource plugin (issue) Create resource plugin Yes Custom resources Create resource plugin Create resource plugin Create Services plugin Custom routes Create resource plugin or Views REST export (GET) Create resource plugin Configurable route prefixes Renderable objects Not applicable Not applicable Yes (no contextual blocks or views) Translations Not yet (issue) Yes Create Services plugin Revisions Create resource plugin Yes Create Services plugin File attachments Create resource plugin Yes Create Services plugin Shareable UUIDs (GET) Yes Yes Yes Authenticated user resources (log in/out, password reset) Not yet (issue) No User login and logout Core RESTful Web Services

Thanks to the Web Services and Context Core Initiative (WSCCI), Drupal 8 is now an out-of-the-box REST server with operations to create, read, update, and delete (CRUD) content entities such as nodes, users, taxonomy terms, and comments. The four primary REST modules in core are:

  • Serialization is able to perform serialization by providing normalizers and encoders. First, it normalizes Drupal data (entities and their fields) into arrays with a particular structure. Any normalization can then be sent to an encoder, which transforms those arrays into data formats such as JSON or XML.
  • RESTful Web Services allows for HTTP methods to be performed on existing resources including but not limited to content entities and views (the latter facilitated through the “REST export" display in Views) and custom resources added through REST plugins.
  • HAL builds on top of the Serialization module and adds the Hypertext Application Language normalization, a format that enables you to design an API geared toward clients moving between distinct resources through hyperlinks.
  • Basic Auth allows you to include a username and password with request headers for operations requiring permissions beyond that of an anonymous user. It should only be used with HTTPS.

Core REST adheres strictly to REST principles in that resources directly match their URIs (accessible via a query parameter, e.g. ?_format=json for JSON) and in the ability to serialize non-content into JSON or XML representations. By default, core REST also includes two authentication mechanisms: basic authentication and cookie-based authentication.

While core REST provides a range of features with only a few steps of configuration there are several reasons why other options, available as contributed modules, may be a better choice. Limitations of core REST include the lack of support for configuration entities as well as the inability to include file attachments and revisions in response payloads. With your help, we can continue to improve and expand core's REST support.

RELAXed Web Services

As I highlighted in my recent blog post about improving Drupal's content workflow, RELAXed Web Services, is part of a larger suite of modules handling content staging and deployment across environments. It is explicitly tied to the CouchDB API specification, and when enabled, will yield a REST API that operates like the CouchDB REST API. This means that CouchDB integration with client-side libraries such as PouchDB and Hood.ie makes possible offline-enabled Drupal, which synchronizes content once the client regains connectivity. Moreover, people new to Drupal with exposure to CouchDB will immediately understand the API, since there is robust documentation for the endpoints.

RELAXed Web Services depends on core's REST modules and extends its functionality by adding support for translations, parent revisions (through the Multiversion module), file attachments, and especially cross-environment UUID references, which make it possible to replicate content to Drupal sites or other CouchDB compatible services. UUID references and revisions are essential to resolving merge conflicts during the content staging process. I believe it would be great to support translations, parent revisions, file attachments, and UUID references in core's RESTful web services — we simply didn't get around to them in time for Drupal 8.0.0.

Services

Since RESTful Web Services are now incorporated into Drupal 8 core, relevant contributed modules have either been superseded or have gained new missions in the interest of extending existing core REST functionality. In the case of Services, a popular Drupal 7 module for providing Drupal data to external applications, the module has evolved considerably for its upcoming Drupal 8 release.

With Services in Drupal 8 you can assign a custom name to your endpoint to distinguish your resources from those provisioned by core and also provision custom resources similar to core's RESTful Web Services. In addition to content entities, Services supports configuration entities such as blocks and menus — this can be important when you want to build a decoupled application that leverages Drupal's menu and blocks system. Moreover, Services is capable of returning renderable objects encoded in JSON, which allows you to use Drupal's server-side rendering of blocks and menus in an entirely distinct application.

At the time of this writing, the Drupal 8 version of Services module is not yet feature-complete: there is no test coverage, no content entity validation (when creating or modifying), no field access checking, and no CSRF protection, so caution is important when using Services in its current state, and contributions are greatly appreciated.

GraphQL

GraphQL, originally created by Facebook to power its data fetching, is a query language that enables fewer queries and limits response bloat. Rather than tightly coupling responses with a predefined schema, GraphQL overturns this common practice by allowing for the client's request to explicitly tailor a response so that the client only receives what it needs: no more and no less. To accomplish this, client requests and server responses have a shared shape. It doesn't fall into the same category as the web services modules that expose a REST API and as such is absent from the table above.

GraphQL shifts responsibility from the server to the client: the server publishes its possibilities, and the client publishes its requirements instead of receiving a response dictated solely by the server. In addition, information from related entities (e.g. both a node's body and its author's e-mail address) can be retrieved in a single request rather than successive ones.

Typical REST APIs tend to be static (or versioned, in many cases, e.g. /api/v1) in order to facilitate backwards compatibility for applications. However, in Drupal's case, when the underlying content model is inevitably augmented or otherwise changed, schema compatibility is no longer guaranteed. For instance, when you remove a field from a content type or modify it, Drupal's core REST API is no longer compatible with those applications expecting that field to be present. With GraphQL's native schema introspection and client-specified queries, the API is much less opaque from the client's perspective in that the client is aware of what response will result according to its own requirements.

I'm very bullish on the potential for GraphQL, which I believe makes a lot of sense in core in the long term. I featured the project in my Barcelona keynote (demo video), and Acquia also sponsored development of the GraphQL module (Drupal 8 only) following DrupalCon Barcelona. The GraphQL module, created by Sebastian Siemssen, now supports read queries, implements the GraphiQL query testing interface, and can be integrated with Relay (with some limitations).

Conclusion

For most simple REST API use cases, core REST is adequate, but core REST can be insufficient for more complex use cases. Depending on your use case, you may need more off-the-shelf functionality without the need to write a resource plugin or custom code, such as support for configuration entity CRUD (Services); for revisions, file attachments, translations, and cross-environment UUIDs (RELAXed); or for client-driven queries (GraphQL).

Special thanks to Preston So for contributions to this blog post and to Moshe Weitzman, Kyle Browning, Kris Vanderwater, Wim Leers, Sebastian Siemssen, Tim Millwood and Ted Bowman for their feedback during its writing.

Categories: Drupal

Drupal Watchdog: Drupal Watchdog Joins the Linux New Media Family

3 May 2016 - 11:04pm
Drupal Watchdog 6.01 is the first issue published by Linux New Media. Come see the Drupal Watchdog team at DrupalCon 2016!

Drupal Watchdog was founded in 2011 by Tag1 Consulting as a resource for the Drupal community to share news and information. Now in its sixth year, Drupal Watchdog is ready to expand to meet the needs of this growing community.

Drupal Watchdog will now be published by Linux New Media, aptly described as the Pulse of Open Source.

“It’s very clear that the folks at Linux New Media know what they’re doing, and that they truly value the open source culture,” said Jeremy Andrews, CEO/Founding Partner, Tag1 Consulting. “I’m ecstatic that the magazine will not just live on, but it will thrive as a quarterly publication … this is a wonderful step forward that benefits everyone who reads and contributes to Drupal Watchdog.”

The magazine will continue to be offered in print and digital formats, and Linux New Media’s international structure provides better service to subscribers worldwide, with local offices in North America and Europe and ordering options in various local currencies.

“We don’t want to change what has brought Drupal Watchdog this far, but we do want to see it grow and expand to the next level, which mainly means – extending the reach of the magazine,” said Brian Osborn, CEO and Publisher, Linux New Media. “As our first step, Drupal Watchdog will now be published quarterly, helping us stay even more current in our coverage and in more frequent contact with our readership.”

Drupal Watchdog is written for the Drupal community and will only thrive through community participation.

Here is what you can do to help:

The first issue of Drupal Watchdog published by Linux New Media will be available May 9th! All DrupalCon attendees will receive a copy at the event. Come meet the new team, and learn more about the future of Drupal Watchdog!

Images: 
Categories: Drupal

Pages