Planet Drupal

Subscribe to flux Planet Drupal
Drupal.org - aggregated feeds in category Planet Drupal
Mis à jour : il y a 28 min 37 sec

Acquia Developer Center Blog: How to Ensure That Your Website is Launch-Ready

mar, 21/06/2016 - 17:08

Launching a new application can be a scary event. Many potential bottlenecks, although not readily apparent, can cause problems on the go-live day, or the first time there’s a surge in site traffic.

At Acquia, we conduct a site audit to ensure that a new site is not subject to unnecessary delays. We do this by identifying potential problems, and proposing clear and specific remediation and optimization measures during development.

That’s the big picture. Here’s a close-up view on how we do it.

Tags: acquia drupal planet
Catégories: Elsewhere

ImageX Media: When Responsive Websites May Not Be Enough: Why You Need a Mobile Business App

mar, 21/06/2016 - 16:07

Mobile usage shows no signs of slowing down. Many web design and development agencies encourage clients to deploy websites using a responsive design in place. For those in need a refresher, a responsive website is a design approach based on fluid grids and CSS3 media queries. A responsive site's layout will change based on the size (height x width) of a device.

Catégories: Elsewhere

Drupal Commerce: Commerce 2.x: Unit, Kernel, and Functional Tests Oh My!

mar, 21/06/2016 - 16:01

At the end of May, I made an initiative to move all of the Drupal Commerce tests away from Simpletest and to use the available test classes built off of PHPUnit. Why? Simpletest is a test framework within Drupal and not used by the PHP community at large.

With the KernelTestBaseTNG™ issue, Drupal core officially moved to being based on top of PHPUnit for Kernel and Unit tests. Soon more test types were to follow, such as browser tests and JavaScript testing.

Death to Simpletest, Long Live PHPUnit, Mink, and PhantomJS

We now have PHPUnit as our test framework, the choice of the greater PHP community. The browser tests use the Mink browser emulator, which anyone working with Behat should be somewhat familiar. Testing JavaScript is done by pointing PhantomJS configuration to Mink. No longer are we limited to the functionalities of Simpletest and our community to develop it.

Catégories: Elsewhere

ComputerMinds.co.uk: How to write a PHPUnit test for Drupal 8

mar, 21/06/2016 - 14:00

This article will talk you through the steps to follow to write a simple PHPUnit test for Drupal 8.

I have been doing a lot of work on Drupal 8 migrations for the past few months so that will be the focus of the test.

Step 1: Create a Fixture

To quote the PHPUnit manual:

Catégories: Elsewhere

Web Wash: Debug Site Performance Using Web Profiler in Drupal 8

mar, 21/06/2016 - 13:50

In the beginning of any Drupal project the site loads very quickly because there aren't many modules installed. But as you add modules, the performance of the site will become slower and slower.

There's always a certain point in the project where you realize it's time to look at the problem and see if it's a rogue module or some dodgy code, we've all seen this.

Trying to debug a performance issue can be tedious work. But often, it comes down to having too many queries loaded on a page.

If you're on Drupal 7, just enable query logging using the Devel module. This will show all the queries generated at the bottom of the page.

But for Drupal 8 we have something better: Web Profiler.

Web Profiler is a Drupal 8 port of the Symfony WebProfiler bundle. The port is possible because Drupal 8 uses Symfony components.

Web Profiler adds a toolbar at the bottom of every page and shows you all sorts of stats such as the amount of database queries loaded on the page, which services are used and much more.

Catégories: Elsewhere

Into my Galaxy: GSoC’ 16: Port Search Configuration module; coding week #4

mar, 21/06/2016 - 13:45

 

Google Summer of Code (GSoC), has entered into the mid-Term evaluation stage. This is a 1 week period from 21- 27 June, were students and mentors present the progress of their projects. Based on the reports submitted, students are made pass/ fail.

I have been working on porting Search Configuration to Drupal 8 in the past few weeks. If you would like to have a quick glimpse of my past activities on this port process, please go through these posts.

last week, I could learn some Drupal concepts which were really helpful for my project. In the previous versions of Drupal, the role permissions were stored in a role_permissions table in the Database. But now, in Drupal 8, the role permissions are directly stored in the role configuration entity.

So, as described above, in D7 and its preceding versions, role permissions were stored in a role_permissions database which had the role Id and the corresponding permissions. The permissions distributed to a role was retrieved in D7 using:

$permissions = role->getPermissions();

But, in D8, this is done by the

$permissions = role->getPermissions();

Another instance is that, to grant certain permissions to roles.

In D7 it was controlled by,

user_role_grant_permissions($rid, array(‘ access content’));

The role configuration entity remodels this functionality in D8 to:

$role->grantPermission(‘ access content’);

In connection with the term permissions, the most important aspect in Drupal is a hook: hook_permissions(). This hook, obviously as you might have guessed, distributes the permissions to various users; decides whether a particular user should be allowed to access a page or a content, granting and restricting the access.

This hook has been replaced in Drupal 8 by a module.permissions.yml file. This file contains the permissions and its specifications. We can write a driver function in a php file to add the dynamic permissions. This can be achieved by making a driver class in the php file and adding the behaviour of the permission we need in the member functions of the class. We also have to link this PHP file with our yml file to keep it active. This is done by adding a callback function in the yml file which references this php file.

To display special characters in a plain text string for display as HTML format, Drupal earlier versions used the function check_plain.  This had the general syntax:

check_plain($text); // where $text was the string to be processed.

This function has got deprecated in Drupal 8. This has been replaced by the \Drupal\Compoent\Utility\Html::escape($text).

 


Catégories: Elsewhere

Miloš Bovan: Detecting a footer of an email

mar, 21/06/2016 - 13:22
Detecting a footer of an email

This is the 5th blog post of the Google Summer of Code 2016 project - Mailhandler.

Implementing authentication and authorization for a mail sender provided an additional layer of security for Mailhandler project. The module was extended to support both PGP signed and unsigned messages.

The goal for the last week was to create a mail Footer analyzer and to add support for node (content) type detection via mail subject. The pull request has been created and it is in the review status. This analyzer has a purpose of stripping the message footer/signature from the message body. As of now, 2 types of signature/footer separators are supported:

  • -- \n as the separator line between the body and the signature of a message recommended by RFC 3676
  • On {day}, {month} {date}, {year} at {hour}:{minute} {AM|PM} pattern which is trickier and currently used by Gmail to separate replied message from the response.

First of all, we had to create inmail.analyzer.footer config entity and the corresponding analyzer plugin - FooterAnalyzer. Since footer, subject and content type properties are relevant for all types of mail messages supported by Mailhandler, these properties were put in MailhandlerAnalyzerResultBase class.

FooterAnalyzer currently depends on the analyzed result provided by MailhandlerAnalyzer. The reason why one plugin depends on another is to support PGP signed messages. MailhandlerAnalyzer will try to analyze the message body of signed (and unsigned) messages and extract the actual mail body. Next, FooterAnalyzer will parse the processed body stored in MailhandlerAnalyzerResult. As mentioned above, the footer analyzer currently supports footers separated by -- \n and On {day}, {month} {date}, {year} at {hour}:{minute} {AM|PM} lines. The content after these lines is put into the footer property of the analyzer result. In case the body message has one of the supported separators, detected footer is stripped out from the actual message body.

Furthermore, the content type detection via message subject has been implemented. As we are going to support creating comments via email in the following weeks, we had to create a “protocol” that will allow us to differentiate between nodes and comments. We agreed to add [{entity_type}][{bundle}] before the actual message subject. For now, only node entity type and its bundle (content/node type) are parsed and extracted. All the assertions of the analyzed message are happening in the handler plugin (MailhandlerNode). The handler plugin will check if the configured content type is set to “Detect” mode and if so, it will get the parsed content type and create an entity of the parsed node type.

This week, students and their mentors are requested to submit mid-term evaluations. The evaluation represents a sum of the project after 5 weeks of the work. By finishing FooterAnalyzer, Mailhandler is now capable of processing signed (and unsigned) emails, extracting the actual body and creating a node of the detected node type for an authorized user.

The plan for the next week is to extend the project with validation support. We will use entity (node) validation and extend content type to bundle validation too. Also, I will work on splitting the Mailhandler analyzer to the smaller analyzers and adapting the handler to the changes.

 

 

Milos Tue, 06/21/2016 - 13:22 Tags Drupal Open source Google Summer of Code Drupal Planet Add new comment
Catégories: Elsewhere

TheodorosPloumis blog: DrupalCamp Greece is 3B!

mar, 21/06/2016 - 13:19

DrupalCamp Greece is "3B". Back, Bigger, Better!

The Greek community orginizes the 3rd (or 4th I can't remember) Drupal Camp Athens, 1 - 3 July 2016.

3 days with our "true one love" Drupal with social events straight in the heart of Athens and so many interesting sessions for Drupal and the new ecosystem around it (yes we are out of the island now and so are our DrupalCamps :-)

Schedule is ready.

MortenDK is going to open the event with a special keynote and a session about - what else - "DrupalTwig". There will be several sessions about Drupal 8.x Plugin system, migration, CKEditor, frontend, backend, REST API, content strategy, Aegir, security and my - temporary - favourite topic: Docker!

Oh, I forgot to mention the workshops. An introduction to Drupal 8.x and a special workshop about 8.x Commerce Kickstart. There will also be a sprint.

Are you a Drupal <whatever> traveling to Greece, why not join us? You can still get your ticket.

drupal-camp.gr

And don’t forget to register for news and updates about the event.

Hope to see you around.

(PS. I am not representing the organizers or the Greek Drupal community and this post contains my own opinion)

Catégories: Elsewhere

Drop Guard: Live webinar recording: Build your recurring revenue machine

mar, 21/06/2016 - 10:00
Were you too busy to join our live webinar on 06/20? No problem, we present you the whole story right here: Enjoy 30 minutes about how to
  • sell support contracts with value to your clients
  • automate update processes to save developer time
  • establish a support process with existing resources
  • maximise data security for clients as added value support
Drupal Drupal Planet Business
Catégories: Elsewhere

TimOnWeb.com: Default Search API Sorts Per View in Drupal 7

mar, 21/06/2016 - 04:46

It's been a while since I've written a post here (especially, Drupal-related). But today I have something interesting to share.

There's a module called Search API sorts (https://drupal.org/project/search_api_sorts) that provides custom sorts and a global sort block for Search API. The module itself is ok, but ...

Read now

Catégories: Elsewhere

GVSO Blog: [GSoC 2016: Social API] Week 4: First widget!

lun, 20/06/2016 - 23:14
[GSoC 2016: Social API] Week 4: First widget!

The Social API project is divided into four different modules. One of them is Social Widgets (social_widgets), which covers widgets (sometimes called plugins but for the Social API plugins refers to something else) such as buttons (like, tweet, share, etc.), embedded content (post, videos, tweets, etc.), among other things.

So since my last entry about the progress done with the Social API project, I have been working on adapting the functionality of Facebook Like Button (fblikebutton) to work with the Social API and Social Widgets.

The initial point was to declare a module called Facebook Buttons (facebook_buttons) as a integration of Social Widgets, so the module will be listed in the configuration environment of the Social API. To declare a module as a integration of Social Widgets, a Network Plugin must be declared similar to the following.

Social Widgets Integration List gvso Mon, 06/20/2016 - 17:14 Tags Drupal Drupal Planet GSoC 2016
Catégories: Elsewhere

Jeff Geerling's Blog: DrupalCamp St. Louis 2016 - Call for Sessions!

lun, 20/06/2016 - 21:33

DrupalCamp St. Louis 2016 will be held on September 10-11 in St. Louis, MO, on the campus of the University of Missouri, St. Louis, and we're excited to announce that session submissions are open!

We'd love to hear people speak about Drupal business, case studies, coding, community, DevOps, front end, PHP, project management, security, or any other Drupal topic. If you're interested in speaking, please submit a session for consideration, and we'll announce the selected sessions before August 1st.

Catégories: Elsewhere

Mediacurrent: How to Fix a Testbot Bug When Adding New Tests

lun, 20/06/2016 - 20:16
How to fix a testbot bug when adding new tests
Catégories: Elsewhere

DrupalCon News: Let's be human at DrupalCon

lun, 20/06/2016 - 18:07

Being human comes with a broad spectrum of emotions and experiences. Amongst the hustle and bustle of life, we often forget that we are only human.

The Being Human track stands proud amongst all of the other techie tracks at DrupalCon. We put the software and tools aside to put the spotlight on the human beings who are behind it all.

Here are the main topics that we invite you to speak about.

Catégories: Elsewhere

Daniel Pocock: WebRTC and communications projects in GSoC 2016

lun, 20/06/2016 - 17:02

This year a significant number of students are working on RTC-related projects as part of Google Summer of Code, under the umbrella of the Debian Project. You may have already encountered some of them blogging on Planet or participating in mailing lists and IRC.

WebRTC plugins for popular CMS and web frameworks

There are already a range of pseudo-WebRTC plugins available for CMS and blogging platforms like WordPress, unfortunately, many of them are either not releasing all their source code, locking users into their own servers or requiring the users to download potentially untrustworthy browser plugins (also without any source code) to use them.

Mesut is making plugins for genuinely free WebRTC with open standards like SIP. He has recently created the WPCall plugin for WordPress, based on the highly successful DruCall plugin for WebRTC in Drupal.

Keerthana has started creating a similar plugin for MediaWiki.

What is great about these plugins is that they don't require any browser plugins and they work with any server-side SIP infrastructure that you choose. Whether you are routing calls into a call center or simply using them on a personal blog, they are quick and convenient to install. Hopefully they will be made available as packages, like the DruCall packages for Debian and Ubuntu, enabling even faster installation with all dependencies.

Would you like to try running these plugins yourself and provide feedback to the students? Would you like to help deploy them for online communities using Drupal, WordPress or MediaWiki to power their web sites? Please come and discuss them with us in the Free-RTC mailing list.

You can read more about how to run your own SIP proxy for WebRTC in the RTC Quick Start Guide.

Finding all the phone numbers and ham radio callsigns in old emails

Do you have phone numbers and other contact details such as ham radio callsigns in old emails? Would you like a quick way to data-mine your inbox to find them and help migrate them to your address book?

Jaminy is working on Python scripts to do just that. Her project takes some inspiration from the Telify plugin for Firefox, which detects phone numbers in web pages and converts them to hyperlinks for click-to-dial. The popular libphonenumber from Google, used to format numbers on Android phones, is being used to help normalize any numbers found. If you would like to test the code against your own mailbox and address book, please make contact in the #debian-data channel on IRC.

A truly peer-to-peer alternative to SIP, XMPP and WebRTC

The team at Savoir Faire Linux has been busy building the Ring softphone, a truly peer-to-peer solution based on the OpenDHT distribution hash table technology.

Several students (Simon, Olivier, Nicolas and Alok) are actively collaborating on this project, some of them have been fortunate enough to participate at SFL's offices in Montreal, Canada. These GSoC projects have also provided a great opportunity to raise Debian's profile in Montreal ahead of DebConf17 next year.

Linux Desktop Telepathy framework and reSIProcate

Another group of students, Mateus, Udit and Balram have been busy working on C++ projects involving the Telepathy framework and the reSIProcate SIP stack. Telepathy is the framework behind popular softphones such as GNOME Empathy that are installed by default on the GNU/Linux desktop.

I previously wrote about starting a new SIP-based connection manager for Telepathy based on reSIProcate. Using reSIProcate means more comprehensive support for all the features of SIP, better NAT traversal, IPv6 support, NAPTR support and TLS support. The combined impact of all these features is much greater connectivity and much greater convenience.

The students are extending that work, completing the buddy list functionality, improving error handling and looking at interaction with XMPP.

Streamlining provisioning of SIP accounts

Currently there is some manual effort for each user to take the SIP account settings from their Internet Telephony Service Provider (ITSP) and transpose these into the account settings required by their softphone.

Pranav has been working to close that gap, creating a JAR that can be embedded in Java softphones such as Jitsi, Lumicall and CSipSimple to automate as much of the provisioning process as possible. ITSPs are encouraged to test this client against their services and will be able to add details specific to their service through Github pull requests.

The project also hopes to provide streamlined provisioning mechanisms for privately operated SIP PBXes, such as the Asterisk and FreeSWITCH servers used in small businesses.

Improving SIP support in Apache Camel and the Jitsi softphone

Apache Camel's SIP component and the widely known Jitsi softphone both use the JAIN SIP library for Java.

Nik has been looking at issues faced by SIP users in both projects, adding support for the MESSAGE method in camel-sip and looking at why users sometimes see multiple password prompts for SIP accounts in Jitsi.

If you are trying either of these projects, you are very welcome to come and discuss them on the mailing lists, Camel users and Jitsi users.

GSoC students at DebConf16 and DebConf17 and other events

Many of us have been lucky to meet GSoC students attending DebConf, FOSDEM and other events in the past. From this year, Google now expects the students to complete GSoC before they become eligible for any travel assistance. Some of the students will still be at DebConf16 next month, assisted by the regular travel budget and the diversity funding initiative. Nik and Mesut were already able to travel to Vienna for the recent MiniDebConf / LinuxWochen.at

As mentioned earlier, several of the students and the mentors at Savoir Faire Linux are based in Montreal, Canada, the destination for DebConf17 next year and it is great to see the momentum already building for an event that promises to be very big.

Explore the world of Free Real-Time Communications (RTC)

If you are interesting in knowing more about the Free RTC topic, you may find the following resources helpful:

RTC mentoring team 2016

We have been very fortunate to build a large team of mentors around the RTC-themed projects for 2016. Many of them are first time GSoC mentors and/or new to the Debian community. Some have successfully completed GSoC as students in the past. Each of them brings unique experience and leadership in their domain.

Helping GSoC projects in 2016 and beyond

Not everybody wants to commit to being a dedicated mentor for a GSoC student. In fact, there are many ways to help without being a mentor and many benefits of doing so.

Simply looking out for potential applicants for future rounds of GSoC and referring them to the debian-outreach mailing list or an existing mentor helps ensure we can identify talented students early and design projects around their capabilities and interests.

Testing the projects on an ad-hoc basis, greeting the students at DebConf and reading over the student wikis to find out where they are and introduce them to other developers in their area are all possible ways to help the projects succeed and foster long term engagement.

Google gives Debian a USD $500 grant for each student who completes a project successfully this year. If all 2016 students pass, that is over $10,000 to support Debian's mission.

Catégories: Elsewhere

Drupalize.Me: Learn Views in Drupal 8

lun, 20/06/2016 - 16:44

One of the big changes in Drupal 8 is that Views, the most popular contributed module in Drupal 7, is now included as part of core. Learning Views is a key component of learning to build Drupal sites. Aside from having this tool built in core now, the beauty of this new feature is that it is almost identical to Views in Drupal 7. You can get started site-building with Views in Drupal 8 without waiting for any fancy version-specific instructions.

Catégories: Elsewhere

Mediacurrent: Dropcast: Episode 21- Finally Oscar Menjivar

lun, 20/06/2016 - 16:00

This episode we celebrate our fine podcast finally coming of drinking age and finally get our act together to welcome Oscar Menjivar back, again, for a third time, to talk about his project Exploring Tech which helps youths in south central LA learn how to develop technology. As always we have the latest Drupal news, Bob talks about the most recent Mediacurrent blog posts and Ryan rings us home with the final bell.

Catégories: Elsewhere

Liip: Let’s debug in Drupal 8 !

lun, 20/06/2016 - 09:01

It has been nearly 7 months since Drupal 8 first release and as a developer, I am still in the learning process. It can be hard sometimes to know what is going wrong with your code and how to solve it. I will tell you about few things to know on how to develop and debug Drupal 8 projects and continue learning, learning and learning !

Disabling cache

First of all, to avoid having a crazy terminal with thousands of drupal cr hits, you can disable Drupal caching during development. You need to copy and rename sites/example.settings.local.php file to sites/default/settings.local.php. Then uncomment/update some values:

  • uncomment this line to enable the “null cache service”:
    $settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
  • uncomment these lines to disable CSS/JS aggregation:
    $config['system.performance']['css']['preprocess'] = FALSE; $config['system.performance']['js']['preprocess'] = FALSE;
  • uncomment these lines to disable the render cache and the dynamic page cache:
    $settings['cache']['bins']['render'] = 'cache.backend.null'; $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
  • you can allow test modules and themes to be installed if needed with:
    $settings['extension_discovery_scan_tests'] = TRUE;

To include this file as part of Drupal’s settings file, open sites/default/settings.php file and uncomment these lines:

if (file_exists(__DIR__ . '/settings.local.php')) { include __DIR__ . '/settings.local.php'; }

Then, to disable Twig caching, open sites/development.services.yml file and add the following settings:

parameters: twig.config: debug: true auto_reload: true cache: false

Finally, rebuild the Drupal cache and it is done !

Displaying errors

As in Drupal 7, you can set different levels of errors display (by visiting this page: /admin/config/development/logging in the administration interface):

  • None
  • Errors and warnings
  • All

In Drupal 8, there is a fourth level called “All messages, with backtrace information”. This is native to Drupal core and it allows to display the error backtrace in the message area.

You can also adjust the level of errors in your local setting file:

$config['system.logging']['error_level'] = 'verbose';

Creating log messages

Developers from Drupal 7 know the Database Logging module that allows to log messages in the database using the famous watchdog() function.
Well, this module still exists in Drupal 8 but the function has a replacement : the Drupal 8 logger class.
It looks like this:

// Logs an error \Drupal::logger('my_module')->error($message);

Let’s have a look at the different parts of the code:

  • \Drupal::logger(‘my_module’) is the helper method that quickly creates a copy of the logger service. As a parameter, it takes the module name from where we log the information;
  • ->error: this is the severity-level method (it can be debug, info, notice, warning, error, critical, alert, emergency);
  • $message is the log message. It can be a simple string or it can contain some placeholders. In this case, you can pass the associative array (placeholders as keys) as a second parameter.

All the messages created with the logger service can be viewed in the reports page of the administration interface in /admin/reports/dblog as it used to be in Drupal 7.

Debugging Twig templates

Drupal core comes with a theming debug mode that is really helpful for local environments. To enable it, copy-and-paste the following code into sites/default/services.yml file (if you haven’t already added these lines in development.services.yml):

parameters: twig.config: debug: true

Thanks to this mode, it will be easier to find out which portion of HTML code has been written in which templates: in the source code, you will see each part of Twig templates (pages, nodes, blocks, menus etc.) surrounded by HTML comments that contain the matching suggestion templates. The one in current use will be checked.
Make sure to enable comments in your web browser debug tab and also note that this feature has been backported to Drupal 7.

Used templates mentioned in HTML comments

Inside a Twig template, you will also be able to use {{ dump(my_variable) }} syntax to print a variable content.
If you have Devel Kint module installed, you can use {{ kint(my_variable) }} to dump the variable in a nice formatted structure: you can hide/show levels of arrays/objects which is very helpful as Drupal variables can have many levels inside. Kint is indeed the successor of the krumo() function from Drupal 7.

Print content_attributes variable with kint from node.html.twig template

Profiling pages

When dealing with performance issues, profiling a website will help finding what is the root cause.
The well-known debugging module Devel offers in its latest version a Webprofiler. It is actually a (partial) port of the Symfony profiler and it displays a footer bar on every page with useful data collectors such as:

  • Drupal current version;
  • PHP configuration (current version, loaded modules);
  • route and controller name;
  • page load timeline and memory use;
  • query time and number of queries;
  • number of blocks loaded and rendered;
  • number of views;
  • number of modules and themes available;
  • cache statistics.

Webprofiler bar in Drupal 8

By clicking on each section, you will be redirected to a specific page with more details about the collected data. For instance, if you look at the page request details, you will see which was the matching route, the route object with the passed parameters, response headers etc. Well, all the information needed to debug requests.

Details of a page request provided by Webprofiler

Using command line tools

The Drupal Console project is a powerful command line tool that makes use of the Symfony Console and other third-party components. It is complementary to Drush and allows you to generate code to build modules and themes (code scaffolding), to interact with your Drupal installation and help to debug your code.

Once the Drupal Console installed, you can run the drupal list command to show all available commands.

Here are some useful commands for debug:

  • drupal check: check system requirements;
  • drupal site:status: show current Drupal installation status (Versions of Drupal, PHP, MySQL and libraries, updates status, cron last run, database connection etc.);
  • drupal database:table:debug: show all tables of the database;
  • drupal database:table:debug my_table: show columns of my_table table;
  • drupal config:debug: list all configurations;
  • drupal config:debug image.settings: show configuration for image.settings;
  • drupal config:settings:debug: display current key:value from the settings file;
  • drupal container:debug: display all services ID with the matching class name;
  • drupal router:debug: display all route names with the matching paths;
  • drupal router:debug dblog.overview: display route information about dblog overview page;
  • drupal database:log:debug: display current log events;
  • drupal database:log:debug 107: display one log event in details;
  • drupal site:statistics: show some statistics about the website (number of modules enabled/disabled, number of users and comments etc.).

The Drupal Console is already used by many companies well known in the Drupal community such as Acquia, Amazee Labs, Phase2 and Commerce Guys and is becoming the standard command line tool for Drupal 8.
But note that the current version is not yet fully compatible with Drupal 8.1.x, for instance, there are still some issues with migration commands. The team of the project is currently looking for some financial support and more contributors to get a full stable release.

For more information about the project, check out the official website and the documentation.

Catégories: Elsewhere

Vardot: Facebook Comments Block

dim, 19/06/2016 - 12:49
Resources Read time: 5 minutes

In this article I’d like to share with you a module that I’ve recently created for Drupal 7 and 8 called Facebook Comments Block. It gives visitors of your website the opportunity to comment on your site’s content using a widget that is directly integrated with Facebook. Here is the screenshot showing you how the commenting box will be displayed on your website:

 

 

What was missing in other Drupal commenting modules?

The historical background of my contribution to the Drupal society was pretty easy. While working on Vardot’s distribution Uber Publisher our main goal was to make Drupal as user-friendly as possible. One of the increasing users’ convenience factors was a maximal easiness in adding comments on the website, and one of the main satisfaction criterias from the user's perspective is the number of clicks and the total time needed to proceed with a request.

The big UX disadvantage of popular solutions is that users are required to create an account on a new website. The number of services we are using is increasing every year, and managing, remembering passwords or even logging in to all of them becomes very time-consuming. As a site visitor I’d prefer to be able to comment on posts without signing up, because otherwise, if I read several blogs, I waste too much time for nothing.

Another important disadvantage of commenting widgets I worked with (this time more for a developer and site owner than for an end-user) was that most of them were based on URL aliases. As a result some of our clients were facing the issue when they were losing all comments after changing the URL of the page or its title (in Uber Publisher short SEO-friendly URLs are generated automatically based on the title of the post).

 

What are the advantages of Facebook Comments Block module?

Addressing issues that were described above, and adding some new benefits, I’ve made a list of reasons why you may go for the Facebook Comments Block module:

 

  1. Facebook Comments Block relies on a node ID

The widget minimizes risks of changing the URL, because it relies on a node ID that is always constant. As a result, even if you rewrite the title of your article or the link of the page, comments that were added before won’t be lost.

 

  1. Facebook Comments Block allows for the main domain configuration

If you have multiple domains associated with your website, you can configure the module to recognize the main domain and share comments across all domains. For example, we have two URLs for the same site - www.example.com/article-title and www.myexample.com/article-title. Configure Facebook Comments Block to use www.example.com as a main domain, and comments of the main domain will be shared to and from www.myexample.com.

 

  1. Facebook Comments Block uses basic configurations

It doesn’t have dependencies which makes it easy to install and use. Just go to "Admin" -> "Structure" -> "Block", and you’ll find "Facebook Comments" settings. Choosing “Configure” you’ll see the menu with options to customize the widget:

 

 

  1. You don’t need to log in

Most of the site visitors are already logged in with their Facebook profiles. As a result, they comment using their real social media (Facebook) account and don’t need to make additional clicks to be able to comment. The idea of this widget is to be organically implemented to the page and be percepted as its natural part, so the visitor doesn’t even realize that there is a special block for commenting that is connected to an external service.

 

  1. Facebook Comments Block is easy to integrate with other modules

The widget uses Drupal block API, so it can be easily integrated with most of the Drupal modules that support blocks (i.e. Rules, Context, Panels, …etc.). The integration is straightforward and doesn’t require any additional development efforts or customization.

 

Porting Facebook Comments Block to Drupal 8

Facebook Comments Block was a new step in my developer’s career, because it introduced me to the world of Drupal 8. After D8 release I’ve decided to learn it by porting this block, and use Drupal 8’s new block API, block configurations and the new twig templates to apply changes to my new module. Now the widget is available in two latest Drupal versions - D7 and D8. It can be used by site owners that already realized benefits of Drupal 8 as well as by site owners that prefer to wait, evaluate, and choose.

 

Bottom line

The usage statistics of the widget shows that the number of people installing it is constantly growing and reached 380 sites by the beginning of June:

 

 

Drupal modules are developed by community and grown by community. If you’d like to try the Facebook Comments Block, feel free to download it from drupal.org. To report any bug issue, support or feature request you can fill a new ticket on Drupal issue queue. And of course I would be really thankful if you share this blog post in your social networks, so more interested people could learn about the widget and try it out.

  Tags:  Drupal Planet drupal 8 Modules Title:  Facebook Comments Block
Catégories: Elsewhere

Freelock : A Flash of Insight

sam, 18/06/2016 - 02:45

Its name is Watney. Watney lives in Matrix. Watney is a bot I created about 6 months ago to start helping us with various tasks that are instrumental for day-to-day tasks we need to do in our business.

Watney patiently waits for requests in a bunch of chat rooms we use for internal communications about each website we manage, each project we work on. Watney does a bunch of helpful things already, even though it is still really basic -- it fetches login links for us, helps us assemble release notes for each release we do to a production site, reminds us when it's time to do a release, and kicks off various automation jobs.

DevOpsConcourseMatrixBotWatneyDrupalDrupal Planet
Catégories: Elsewhere

Pages