Planet Drupal

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

Lullabot: Making Drupal 8 API First with RESTful Web Services

22 December 2016 - 12:00pm
Matt and Mike sit down with the developers who are leading the REST initiatives in Drupal 8, and discuss the current landscape, and what's on the horizon. We discuss JSON API, GraphQL, changes to Drupal core, and more.
Categories: Drupal

Mediacurrent: Dropcast Episode 27: So Long 2016

22 December 2016 - 11:47am

Recorded December 14th, 2016.

In this, our final episode of 2016, we some time to reflect on the great things of the year, and take a look into 2017. We also expanded the Pro Project Pick into the Pro Project Pick of the Year. And as always we look at the latest Drupal news,  events and Ryan rides his sleigh in The Final Bell. Have a happy holiday, and we'll see you next year!

Categories: Drupal

Blair Wadman: Introduction to Annotations in Drupal 8

22 December 2016 - 9:52am

Annotations are another one of the new concepts in Drupal 8 to wrap your head around. Annotations are written as PHP code comments above a class or function and contain metadata about the function or class.

Annotations are used by other PHP projects. For example, Symfony2 uses annotations for routing rules and Doctrine uses them for ORM related meta data.

Categories: Drupal

Evolving Web: Things to know before moving from Drupal 6 or 7 to Drupal 8

22 December 2016 - 9:00am

Since the release of Drupal 8, Drupal 6 is no longer supported by the Drupal Community. Because of this, many sites need to be migrated to Drupal 7 or 8, and quickly!

That means that at Evolving Web we've been doing a lot of Drupal 8 migration projects lately, either D6 to D8 or D7 to D8. I would like to talk about the things we have to take into account when running these projects.

read more
Categories: Drupal

Third & Grove: Creating a CKEditor plugin with Drupal 7 using WYSIWYG

22 December 2016 - 8:32am
Creating a CKEditor plugin with Drupal 7 using WYSIWYG josh@thirdandg… Thu, 12/22/2016 - 11:32
Categories: Drupal

Acquia Developer Center Blog: How to Submit a Session Proposal to DrupalCon That Will be Accepted: Nine Steps to Success

22 December 2016 - 6:42am

DrupalCon Baltimore is coming up April 24 through April 28, 2017.

Why not make this the year that you present a session?

If the idea of submitting a session sounds appealing, focus for a few seconds on this date: February 1, 2017 at 23:59 EST (UTC -5). That’s the deadline for submitting a session proposal.

Okay, now let’s work backwards from that.

Tags: acquia drupal planet
Categories: Drupal

DrupalOnWindows: Drupal 7 update jQuery.once: jquery.once polyfill

22 December 2016 - 3:24am

In this post I will share a quick tip on how to upgrade the jquery.once plugin in Drupal 7 without breaking current code.

Drupal 7 ships with jquery.once plugin version 1.2 that dates from 2013. For a project we needed to make code targeting the old 1.x and the 2.x work at the same time. In our case this was core javascript written for 1.x working with some code of ours designed for jquery.once 2.x.

The solution is easy: upgrade the core jquery.once to 2.x and add a polyfill to make it backwards compatible.

Language English More articles...
Categories: Drupal

Unimity Solutions Drupal Blog: Building Chat Bots on Drupal

22 December 2016 - 3:01am

Building chat bots depends on number of factors like experience with programming language, understanding A.I, writing stellar bot conversations, understanding your company's requirement, purpose of deploying chat bot - Customer Service, Customer Engagement or Product design etc.

Categories: Drupal

DrupalCon News: Let’s hear your ideas, thoughts, feedback on core

21 December 2016 - 12:53pm

DrupalCon offers a Core Conversation track where people present on various topics ranging from what’s currently in core, how can we improve something, what should go in future releases, and sometimes what is not going so well in the core world.

Categories: Drupal

Chromatic: Drupal Code Standards: Twig in Drupal 8

21 December 2016 - 10:24am

This is the seventh post in a series about coding standards. In this post we’ll talk about how to adhere to standards while implementing Twig templating in Drupal 8.

Categories: Drupal

Chromatic: Drush SQL Sync Alternative: SQL Sync Pipe

21 December 2016 - 10:24am

Using Drush to sync databses (drush sql-sync) is a valuable tool, but it is not always an efficient choice when dealing with large databases (think over 1GB).

Categories: Drupal

Chromatic: Create a Custom Views Sort Plugin with Drupal 8

21 December 2016 - 10:24am

Tap into the power of Views with a custom sort plugin in Drupal 8. Code samples included.

Categories: Drupal

Chromatic: The Road to Speaking at DrupalCon

21 December 2016 - 10:24am

Earlier this year I was fortunate to speak at DrupalCon New Orleans. I'd been working towards speaking at DrupalCon for a few years and it wasn’t until after I spoke that I reflected on just how much effort went into it. I had underestimated the process. Because I’m likely not alone in doing so, I’d like to share what I have learned along the way.

Categories: Drupal

Drupal.org blog: Drupal.org's Composer endpoints are out of beta

21 December 2016 - 9:03am

Drupal.org's Composer endpoints have been available in beta for some time now, and in that time we've begun to see many, many people use Composer to manage Drupal modules and themes. We first launched these repositories before DrupalCon New Orleans as an alpha release, and move into beta a few months later. After receiving your feedback and bug reports we've made updates, and are ready to call this service stable.

What is Composer?

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

… Composer is strongly inspired by node's npm and ruby's bundler." - Source

In a nutshell, Composer allows you to declare the dependencies of your project in a composer.json file in the root of your PHP project. Those dependencies, which you then install through Composer, can have their own composer.json files and their own dependencies—all of which will be automatically managed and installed by Composer. When you need specific control over the versions of dependencies, you can use a composer.lock file.

You can read more about Composer at GetComposer.org.

How do Drupal.org's composer repositories work?

Drupal.org offers two Composer repositories—one for Drupal 7, and one for Drupal 8. Composer requires that packages adhere to semantic versioning, which Drupal 8 core does, but Drupal 8 contrib, and Drupal 7 core and contrib, don’t. To solve this problem, we've created a Composer façade, which takes all of the metadata about projects on Drupal.org and translates them into a format Composer can understand—including translating the Drupal-specific versioning for Drupal 7 and contrib into semantic versioning.

By creating this façade, we've made sure that Drupal.org is still the canonical source for metadata about Drupal.org projects, and that we can update this translation layer as the versioning schema changes. (Learn more about the effort to move Contrib projects to semantic versioning).

In addition to providing endpoints for building projects, Drupal's automated testing suite— DrupalCI—now uses Composer to test Drupal core and contributed projects. This allows developers to test any external dependencies.

How do I use Drupal.org's Composer repositories?

To begin using Drupal.org's Composer repositories, you'll need to update your composer.json file to include the appropriate Composer repository for the version of Drupal. To use Composer with Drupal 7, use the repository url:

https://packages.drupal.org/7

. To use Composer with Drupal 8, use the repository url:

https://packages.drupal.org/8

, as in this example.

After setting up composer, simply run the command:

$ composer config repositories.drupal composer https://packages.drupal.org/8

And your project's composer.json should be updated to look like the following:

{ "repositories": { "drupal": { "type": "composer", "url": "https://packages.drupal.org/8" } } }

Once you've made that change, you should be able to use Composer for Drupal modules and themes as you would for any other PHP package, using the drupal/ namespace:

$ composer require drupal/<modulename>

There is one caveat about the pattern: there are some namespace collisions among modules, and so it is on our roadmap to update Drupal.org project pages to specify the exact namespace to use to require a given project.

To learn more about how to use Drupal.org's Composer repositories, and for some troubleshooting tips, read the Project Composer documentation.

What about licensing?

All the projects hosted on Drupal.org are licensed GPLv2 or later or have an entry in the packaging whitelist. This means that you can rely on Drupal Core and contributed modules and themes to be licensed under the GPL or compatible. And if you need to redistribute your code created with Drupal projects, it must be redistributed as GPLv2 or later.

However, because Composer is a tool that can manage packages in the wider PHP ecosystem, you might find that you want to require a non-GPL package in your project. Using GPL-licensed Drupal projects with external packages that are GPL compatible is fine. Just be aware that if you redistribute that code, you will have to redistribute under a GPL license.

We cannot provide legal advice for your use of open source software. If you use Composer to install packages that are not compatible with the GPL alongside GPL-licensed projects like Drupal, you may use that software together, but per the terms of the GPL you may not copy, distribute, or modify that software.

"Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted…" GPL 2.0 Section 0.

For more questions about Drupal and the GPL you can read the Licensing FAQ.

What's next?

At this point, the Drupal.org Composer service is stable and you can use it to manage modules and themes in your production websites. That said, we do have a roadmap of additional features that we'd like to add. And your contributions are welcome!

As development on Drupal.org's Composer service continues, we want to focus on the following features:
Supporting Composer-based workflows for distributions and install profiles
Providing sub-tree splits of Drupal Core
Updating project pages to provide information about using Composer with any given Drupal.org hosted project
Adding features to the updates service, to collect statistics about projects installed with Composer, and to explore providing update alerts about external dependencies
We also hope to work with core maintainers to add the Drupal.org Composer repositories to Drupal Core's composer.json file

If you're interested in learning more about our roadmap for Composer, or contributing to this service on Drupal.org, you can learn more in the Composer plan issue.

How you can help

If you’re interested in helping to improve Drupal.org's support for Composer workflows, please take a look at the issue above, find us on irc in #drupal-infrastructure, or send us a volunteer proposal.

Thanks to our Community Initiative contributors

We'd like to thank the individuals who worked with us as part of this Community Initiative.
In particular, we'd like to thank:

We'd also like to thank Appnovation, who sponsored the initial development of Drupal.org's composer endpoints.

To these volunteers and sponsoring organizations—it is your expertise, your insight, and your affirmation of our work that make these Community Initiatives successful. Thank you!

Categories: Drupal

Acquia Developer Center Blog: Decoupled Drupal with JSON API and Ember: Consuming Drupal with Ember Adapters and Models

21 December 2016 - 6:14am

Among the most crucial steps in architecting decoupled Drupal-backed applications is to bridge the gap between Drupal and the designated front end so that the latter can receive and manipulate data on the Drupal data repository via API calls. For some frameworks, this can be a rather tedious exercise in navigating the server-side APIs and crafting the correct requests on the client side. Luckily, with JSON API now proposed as a core experimental module for Drupal 8, the tightrope walk between Drupal and Ember is about to become more of a cinch.

Tags: acquia drupal planet
Categories: Drupal

Justin Winter: Drupal 8 : twig_xdebug module tutorial

20 December 2016 - 4:00pm
I recently started digging into some TWIG Drupal 8 development and needed to see what variables were available to me from within the twig template. You can sometimes use KINT or print the variables to the screen but this can be really slow and doesn’t really give you the full picture. The twig_xdebug module lets you use your php debugger to inspect the variables you have access to, which can be really helpful.
Categories: Drupal

Jeff Geerling's Blog: Upgrading Drupal VM in a BLT-powered project

20 December 2016 - 12:28pm

Limiting the amount of surprises you get when developing a large-scale Drupal project is always a good thing. And to that end, Acquia's BLT (Build and Launch Tools) wisely chooses to leave Drupal VM alone when updating BLT itself. Updates to Drupal VM can and should be done independently of install profile and development and deployment tooling.

But this creates a conundrum: how do you upgrade Drupal VM within a project that uses BLT and has Drupal VM as one of it's composer dependencies? It's actually quite simple—and since I just did it for one of my projects, I thought I'd document the process here for future reference:

Categories: Drupal

Drupal core announcements: Provisionally approved coding standards proposals December 20, 2016

20 December 2016 - 12:04pm

The TWG coding standards committee has provisionally approved 3 coding standards change proposals. These will need to be finally approved and implemented by core before being fully ratified.

The process for proposing and ratifying changes is documented on the coding standards project page. Please note, a change to this process is being proposed to streamline the interaction between the coding standards body, Drupal Core, and the Coder project, please provide any feedback on that issue.

Provisionally approved proposals awaiting core approval and implementation: Interested in helping out?

You can get started quickly by helping us to update an issue summary or two or dive in and check out the full list of open proposals and see if there's anything you'd like to champion?

These proposals will be re-evaluated during the next coding standards meeting currently scheduled for December 20th. At that point the discussion may be extended, or if clear consensus has been reached one or more policies may be dismissed or ratified and moved to the next step in the process.

Categories: Drupal

Red Route: Adding a class to default images in Drupal 8

20 December 2016 - 9:42am

As with many sites, images are an important part of the design for my art gallery listings site, The Gallery Guide. The tricky part is that the site is full of user-generated content, so not all of the listings have images attached.

Where there isn't an image, we use a placeholder - partly for our 'tiles' design pattern, but also because the image is an integral part of the design for an individual listing on large screens. On a small screen, this placeholder image takes up a lot of space, and doesn't add much, so I wanted to hide it at a certain breakpoint.

It took me a while to get my head around how to get into the right place to be able to do this in Drupal 8, following my old standby of sprinkling my code with dpm statements (replaced in D8 with kint). I should really have cracked out XDebug, but it does slow things down quite a bit, and I was too lazy to uncomment a few lines in php.ini. In this case it would have definitely made sense, because the kint output was so large that it slowed my browser down to a crawl - probably because I hadn't previously read this DrupalEasy article.

Having looked at the variables in scope inside template_preprocess_field, I saw that the relevant object was an instance of the class FileFieldItemList, which extends EntityReferenceFieldItemList. This is a good example of where a good IDE like PHPStorm can really help - having found the class, I could quickly navigate to its parent, and see its methods - in this case the relevant one was referencedEntities():

/** * Implements hook_preprocess_field(). */ function mytheme_preprocess_field(&$variables, $hook) { switch ($variables['element']['#field_name']) { // Machine name of the field case 'field_image': // If this is the default image, add a class. $images = $variables['element']['#items']->referencedEntities(); if (empty($images)) { $variables['attributes']['class'][] = 'image__default'; } break; } }

Once that class has been added, we can apply CSS to it - in my case it's in a SASS mixin that gets applied to a few different elements:

@mixin image-main { &.image__default img { @include breakpoint($mobile-only) { display: none; } } }

Here's an example on the live site of a listing with no image uploaded, and by comparison, a listing with an image - as you can see, the design wouldn't work on large screens if the placeholder image wasn't there, but on small screens the placeholder just takes up space without giving the user anything worth looking at.

The solution isn't perfect, because the browser will still download the image, even if it's set to display: none, as Tim Kadlec wrote about a while ago. But it'll do for a side project...

Tags:  Drupal Drupal 8 The Gallery Guide theming All tags
Categories: Drupal

a-fro.com: Multiple MailChimp Accounts with Drupal

20 December 2016 - 9:33am
Multiple MailChimp Accounts with Drupal

A couple of months ago, team ThinkShout quietly introduced a feature to the MailChimp module that some of us have really wanted for a long time—the ability to support multiple MailChimp accounts from a single Drupal installation. This happened, in part, after I reached out to them on behalf of the stakeholders at Cornell University's ILR School, where I work.

aaron Tue, 12/20/2016 - 11:33
Categories: Drupal

Pages