Drupal

MTech, LLC: Two Down, One to Go

Planet Drupal - 29 January 2018 - 8:02am
Two Down, One to Go

Today, the final blocker for Migrate Drupal UI was committed. That leaves only a series of complicated internationalization (i18n) issues to get resolved for Migrate Drupal before all of migrate in all of Drupal core can be considered stable. Lots of effort by lots of people have gone into the UI. Thanks to each one of them.

If you have been on the fence, waiting to upgrade, now is the time to do that. 80 percent of all Drupal 6 and Drupal 7 sites do not use i18n features. If you are in that large camp, just waiting to upgrade, then the upgrade path for you is fully stable NOW.

Lucas Hedding Mon, 01/29/2018 - 10:02
Categories: Drupal

Config Ignore Keys

New Drupal Modules - 29 January 2018 - 8:00am

Allows the developer to ignore particular keys in the configuration and not whole configuration files.

Categories: Drupal

Locale: Config import

New Drupal Modules - 29 January 2018 - 6:35am

This module provides a solution to the fact that by default, interface translations are overwritten by config imports if the imported config contains a translation (or misses a translation) of a given string in translate interface.

The following changes to this behaviour are supplied by this module:

Categories: Drupal

Chapter Three: Dreditor Refresh: A New User Style for Dreditor

Planet Drupal - 29 January 2018 - 6:26am

Dreditor is a beloved and indispensable tool, in the form of a browser extension, that enhances project issue pages on Drupal.org. When it comes to reviewing patches, it turns what would just be a plain text file into a feature rich interface for reviewing patches, allowing users to easily select and comment on lines of code, which then get pasted into the comment form, as properly formatted HTML.

I've been lucky to have some extra community time here at Chapter Three over the past couple of weeks. While perusing the core issue queue, I decided to resurrect an old User Style I created for Dreditor back in 2009, and give Dreditor a little refresh. You can install the Dreditor Refresh style with Stylish here. Make sure you also have Dreditor installed, and have logged into Drupal.org.

Categories: Drupal

Blizz Dynamic Entitylist

New Drupal Modules - 29 January 2018 - 4:57am
Summary

This module provides a way to define dynamic lists of entities using a simple interface. The list definition is stored in a custom field, which can be attached to any fieldable content entity.

The field widget allows editors to enrich their list definitions with filters based upon taxonomy terms and provides a live preview within the edit form on the list result. This result is not static, so every time content matching the list criteria gets entered in the system the output of the list adapts subsequently.

Categories: Drupal

DrupalEasy: DrupalEasy Podcast 204 - Tim Lehnen and Neil Drumm - Drupal.org tooling

Planet Drupal - 29 January 2018 - 4:41am

Direct .mp3 file download.

Tim Lehnen, (hestenet), Director of Engineering for the Drupal Association and Neil Drumm (Drumm, Senior Technologist at the Drupal Association join Mike Anello to take a bit of a deep dive into the continuing evolution of Drupal.org tooling - specifically the modernization of the issue queue, patch process, code reviews, and more. Along the way, we try to figure out where (when?) the phrase "feather in your cap" comes from, exactly what Neil does in his free time, and why Mike isn't nearly as cool as he thinks.

Interview DrupalEasy News Sponsors
  • Drupal Aid - Drupal support and maintenance services. Get unlimited support, monthly maintenance, and unlimited small jobs starting at $99/mo.
  • WebEnabled.com - devPanel.
Follow us on Twitter Subscribe

Subscribe to our podcast on iTunes, Google Play or Miro. Listen to our podcast on Stitcher.

If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.

Categories: Drupal

Isotope Bootstrap Grid

New Drupal Modules - 29 January 2018 - 4:23am

This module is an extension for Isotope Views module (part of Isotope module) and provides new Isotope Bootstrap Grid' format that allows to have bootstrap-native grid instead of 'item list' grid (ul li) that is provided by default 'Isotope Grid' format.

Dependencies

Isotope (Isotope and Isotope Views)

Categories: Drupal

Amazee Labs: GraphQL for Drupalers - part 4 - fetching the entities

Planet Drupal - 29 January 2018 - 1:47am
GraphQL for Drupalers - part 4 - fetching the entities

GraphQL is becoming more and more popular every day. Now that we have a beta release of the GraphQL module (mainly sponsored and developed by Amazee Labs) it's easy to turn Drupal into a first-class GraphQL server. In this series, we'll try to provide an overview of its features and see how they translate to Drupal.

Blazej Owczarczyk Mon, 01/29/2018 - 10:47

In the last post we talked about the basic building blocks of every GraphQL query - the fields. We've discussed their types and traits as well as described the rules according to which Drupal fields turn into GraphQL fields. This week we were going to expand the topic further and cover field creation, but Daniel Noyola asked an interesting question in the comment below one of the recent articles:

How can I filter the results in a nodeQuery? Like I would in a normal View or with the "where" clause in a SQL Statement. I noticed that it receives a NodeQueryFilterInput but I don't see how to use it.

Fetching entities based on a filter or a set of filters is a common use case, so let's focus on that first.

TL;DR

There are two ways to query the entity repository. First one would be through the entityQuery fields which are shipped with the core module but are limited in functionality. They only allow us to filter by base fields and there's no way to use an operator other than equals to. The other approach is much more powerful, as it's based on Views. It requires an additional module - graphql_views - to be installed though. Let's start with the built-in way.

The nodeQuery

Each entity type in the system gets its own query field. Let's see in the explorer how it looks like for nodes:

So it's a field (blue) with 3 arguments: offset, limit and filter (purple) which returns a value of type EntityQueryResult (all types are in yellow).

The first two arguments, offset and limit, are for paging and they work the same way as in SQL. Both are integers and both have default values of 0 and 10 respectively (green). Arguments that have default values can be omitted. We'll use this feature in a while.

The last argument - filter - is of a complex type NodeQueryFilterInput. Let's click it:

So it comprises all the base fields of the entity type that is being queried. It's not enough to issue arbitrary queries but it will suffice for a simple use case. This is how we could fetch a list of articles created by a given user:

We haven't specified the offset nor the limit, so they'll get their default values. It means that the output will contain at most 10 results, starting from the result number 0.

That's cool, but what if we wanted to order the articles by node id (nid) to only show the latest articles? Or filter by tags? Or fetch the title text of an image that is attached to a media entity that is connected with the first event that starts after the article's release date?

Use The Views

The answer is: we can do it like we'd normally do it in Drupal - with a view. Views integration has been moved to a separate project, so it has to be downloaded with composer (composer require drupal/graphql_views), from drupal.org or from github.

With graphql_views enabled we can add a GraphQL display to any view in the system.

Now we can sort the results, filter based on content fields and add relationships. We also have the option to return either the full entities, just a selection of fields, or even search results taken straight from a search server.

Contextual filters set in the view will automatically turn into the arguments of the GraphQL field. Let's see an example:

This field represents a simple view showing nodes. It has one contextual filter - Content: Authored by - so the corresponding input type consists of just one field:

and its row type is set to Entity (as pictured on the screenshot above), so the result will be of type NodeArticle:

We can use the filed like this:

Views integration is a pretty broad topic, so in the next post we might try to cover it in more detail. There are quite a few more interesting aspects like sorting, exposed filters, and attaching views to entities, so we'll focus on that in an attempt to fully answer Daniel's question. For those interested in the back-end side of things I'd recommend the great Extending GraphQL series by Philipp Melab. The first post that explains how to create fields is here: Extending GraphQL: Part 1 - Fields.

P.S. GraphQL Views is not stable yet. In fact, two issues were spotted and fixed in the process of writing this article. If you spot a bug please report it on github  or let us know in the #graphql channel at Drupal slack.

Other posts in the series
Categories: Drupal

Promet Source: How to Setup and Run Automated Accessibility Testing using Windows 10 OS

Planet Drupal - 29 January 2018 - 1:36am
Tools Needed: Step 1: Install Python then setup in Environment Variables
Categories: Drupal

UberCart Klaviyo Integration

New Drupal Modules - 29 January 2018 - 1:23am

Overview:

Integrating UberCart with Klaviyo. Here's the data we sync from UberCart after checkout completion.

Events:

  • Customer information: First name, Last name, Email
  • Viewed products
  • Add to Cart
  • Started Checkout
  • Purchased Products

Requirements:

Categories: Drupal

Gizra.com: We Don't Need an Intro Tune

Planet Drupal - 28 January 2018 - 10:00pm

Amitai and Adam discuss a 1.6 million dollar stamp sale, skill set mastery and technological decision making, and the value of slowing down. Along the way Amitai explains his indifference to Drupal 8 and why Gizra’s Drupal-Elm Starter Kit uses Drupal 7 and Restful 1.x.

Continue reading…

Categories: Drupal

JS Disclaimer

New Drupal Modules - 28 January 2018 - 9:21pm
Categories: Drupal

OSTraining: Give Your Drupal Articles More Visual Appeal with Boxout

Planet Drupal - 28 January 2018 - 9:10pm

A boxout is a design element used mainly in magazines to enclose related information to the main article while retaining some type of connection. You can use it to add extra links related to your content or a small bio.

The "Boxout" contrib module helps you add this design element to your content directly in CKEditor. In this tutorial, you will learn how to do just that. Let’s start!

Categories: Drupal

SAML 2.0 Authentication

New Drupal Modules - 28 January 2018 - 7:48pm

Coming soon.

Categories: Drupal

Cloudmersive Anti-virus Scanner

New Drupal Modules - 28 January 2018 - 3:30pm

This module integrates with the anti-virus scanner Cloudmersive Antivirus API.

Uploaded files are forwarded to the Cloudmersive Antivirus service and checked.

Infected files
are blocked in the validation routine, so they cannot be saved.

Categories: Drupal

Views Row Insert

New Drupal Modules - 28 January 2018 - 12:21pm
Description

This module provides a view style plugin, which is capable to insert custom row into a views row results after every nth row or once per page.

The inserted row can contain a standard Drupal block or custom content. The row can use the custom class name along with the default row classes like views-row-1 and standard striping (odd/even), first/last row classes or it can go without them.

This module can be used for placing Google Ads or any other code snippets/content into your views blocks/pages.

Categories: Drupal

Commerce QuickPay gateway

New Drupal Modules - 28 January 2018 - 3:38am
Introduction

This project integrates Drupal Commerce to the payment provider QuickPay, making it possible to use QuickPay as payment provider on your Drupal Commerce platform.

QuickPay supports three methods of payment; Link, Form and Embedded, but currently this module only supports the Form method, making a full redirect to QuickPay to handle the payments.

Categories: Drupal

Wechat OpenID Connect

New Drupal Modules - 27 January 2018 - 11:07pm

微信公众号网页授权模块,请查看微信官方文档

Supported Drupal 8, no plan for v7 support.

Categories: Drupal

Mozart

New Drupal Modules - 27 January 2018 - 7:49pm

About Mozart

Mozart is a visual content composer for Drupal. Administratiors can create complex grid based pages on the fly through a reactive user interface.

Project Status

The Mozart module is still in the alpha stage. Monthly to bi-monthly releases are planned as we move towards a stable release.

Categories: Drupal

DrupalEasy: Setting up Xdebug with Lando and PhpStorm

Planet Drupal - 27 January 2018 - 10:05am

Over the past few months, I've been test-driving various Docker-based local development environments with two goals in mind. First, as my "daily driver" for consulting work - I've been a long-time MAMP Pro user and I've been feeling for a long time that I need to modernize my local development tools. Second, I'm trying to figure out what is the most ideal local development environment for students of both our 12-week Drupal Career Online class (starts March 19) and our 6-week Mastering Professional Drupal Development Workflows with Pantheon (starts February 26) courses. 

One of the necessary skills for a professional Drupal developer (one who codes either modules or themes) is to be able run a solid debugging tool. As part of my evaluation of Lando, I decided to figure out how to set up local PHP debugging with Xdebug and PhpStorm on Mac OS X.

This process described below is largely based on a comment in an issue thread in the Lando issue queue by David Hunt - thanks, David!

My local setup includes:

  • Mac OS X Sierra 10.12.6  
  • Lando v3.0.0-beta.21  
  • Google Chrome with the Xdebug helper extension 
  • PhpStorm 2016.1.1  
Starting point

This tutorial assumes that you have a local Drupal site up-and-running in Lando and set up as a project in PhpStorm. In this example, my local site is using the Lando "Pantheon" recipe, but as you'll see in a bit, any recipe can be used. Also - my local site is based on the standard Drupal project composer template (with a nested docroot).

Enable Xdebug in Lando

The first step is to enable Xdebug in Lando - this is easily done by modifying the local site's .lando.yml file. In my case, I added the following:
 

 

If your .lando.yml file is defining a custom appserver service, then you should be able to just add the "xdebug: true" bit to the appserver definition. 

Once added, you'll need to perform a "lando rebuild" - this will rebuild your environment based on your .lando.yml, including adding Xdebug. The documentation page for the "rebuild" command includes a caution about how there's no guarantee that data will persist between rebuilds. In my experience, I haven't had any issues with losing my database. If you're concerned, then you may want to perform a "lando db-export" prior to rebuilding.  

Configuring PhpStorm

Here's where some magic comes in. Admittedly, I don't fully understand the details of some of the configuration necessary in PhpStorm to get debugging working, but I can confirm that following these steps, it has worked every time for me so far.

The first step is to add the Lando recipe folder as an "Include path" in your PhpStorm project. Open Preferences > Languages & Frameworks > PHP, click the "+" button at the bottom of the list, and manually type in the name of the folder of the Lando recipe you're using. On my machine it is: /Users/michael/.lando/services/config/pantheon. If you're using the standard "Drupal8" recipe, then it would be: /Users/michael/.lando/services/config/drupal8. Unless your username is also "michael", you'll want to update the path.
 

 

Then, go to Preferences > Languages & Frameworks > PHP > Servers

If no server for your project exists (it might be called “appserver”), then enable PhpStorm to listen for Xdebug connections, load a page from your local site in your browser and PhpStorm will prompt you to accept the incoming connection. In my case, it didn’t matter if the Xdebug helper is set to debugging or disabled at this point.
 

 

 

Then, once a server for your local site exists (remember, it might be called "appserver”), select it and ensure that "Use path mappings" is checked, and ensure that your project folder is mapped to "/app" for the "Absolute path on server". Also ensure that the "Absolute path for the server" for the “include path” is "/srv/includes".

 

Give it a try!

At this point, we should be ready for debugging! As a test, open up the site's index.php in PhpStorm and place a breakpoint.

Then, using the Xdebug Helper extension, enable debugging. Also ensure that PhpStorm is still set to listen to incoming Xdebug connections. 

Finally, load your local site's home and watch how PhpStorm will pause code execution at your breakpoint in the index.php file.
 

Warning - performance will suffer

While Xdebug is a powerful tool and will absolutely save you loads of time, there's a dark side. Performance will suffer. I recommend disabling Xdebug in your .lando.yml - by setting "xdebug: false" - (and rebuilding) when you're not using it. You can leave it enabled and gain back some (but not all) performance by disabling PhpStorm's listener as well. 

Final thoughts

In case you're wondering where some of the configuration settings come from, here's what I've figured out so far:

  • "appserver" is the name of the Lando service that contains the codebase. 
  • "/app" is the absolute path of the codebase in the "appserver" Docker container. 
  • "/srv/includes" is the absolute path to a Lando-provided "prepend.php" file in the "appserver" Docker container. As far as I can tell, this file defines and sets a bunch of environment variables depending on the recipe used.
     
Categories: Drupal

Pages

Subscribe to As If Productions aggregator - Drupal