Development News

Matt Glaman: Open Source: Community and Opportunity

Main Drupal Feed - Tue, 02/20/2018 - 03:35
Open Source: Community and Opportunity mglaman Mon, 02/19/2018 - 21:35

DrupalCamp London is coming around the corner! If you have the chance to go, I highly recommend it. The organizers put on a top-notch event. Last year I had the privilege of giving my first keynote at the conference. I firmly believe that open source is a creator of opportunity. There is no such thing as free software. In open source, we donate our time to provide software that has no monetary cost. This lowers the barrier to entry by removing a layer economic limitations.

frobiovox.com: Why DrupalCon

Main Drupal Feed - Tue, 02/20/2018 - 00:00
Collaboration and Contribution at DrupalCon Drupal is the most flexible general purpose Content Management System on the market today—Open Source or not. Using Drupal enables us to provide a cost effective and flexible platform for our clients, while contributing to Drupal allows us to ensure it remains the most flexible general purpose Content Management System. As contributing to Drupal is the job of the Drupal Community, it’s essential that Drupal...

DrupalEasy: Learning Made Easier Leveraging Drupal's Social Construct

Main Drupal Feed - Mon, 02/19/2018 - 23:18
When I walk along with two others, from at least one I will be able to learn.   – Confucius

Drupal development as a career is usually also a commitment to constant learning through ongoing professional development.  Whether you make it a point to read blog posts or watch screencasts, sign up for some type of live-instructor training, or partake in co-working and meet-ups, on-going learning is a critical piece to being a professional Drupal  developer. Years ago, when DrupalEasy was presenting our Drupal Career Technical Education program exclusively in-person (now Drupal Career Online), the lab-portion (where we met in a less formal way than classroom sessions) became so popular with students, that we decided to continue to host them after graduation for anyone who had taken the class.

Six years later, these "office hours"are still going strong, now online and attended by people weekly from all over the country. It’s amazing to see the developers who first learned how to spell Drupal years ago in our riverside classroom in Cocoa, Florida; now the veterans assisting and connecting with those from recent sessions. People from former sessions, even those who attend at different times, also support each other beyond the labs, which has all contributed to the development of, what we think, is a pretty cool DrupalEasy Learning Community.

Weekly on Thursday afternoons U.S. Eastern Time, you can find DrupalEasy’s Mike Anello leading Go-To-Meeting ofice hours sessions, which are open to anyone who is enrolled in, or has taken any long-form DrupalEasy training courses. It’s a loose session devoted to helping anyone overcome issues, figure out how to approach something, share insights on particular modules and also talk Drupal. Learning experts call this collaborative learning, and it has even more advantages than we realized, which explains why it is so popular and seemingly effective as both an initial learning strategy and ongoing professional development tool. Everyone learns (Even Mike).

The Cornell University Center for Teaching Innovation explains that  “Collaborative learning is based on the view that knowledge is a social construct.”  (Wow, that relates to Drupal and open source projects on so many levels!)  They also explain that there are four principles to the ways collaborative learning happens, including that those who are learning are the primary focus, it is important to “do” and not just listen, working in groups is key, and the group should be learning by developing solutions to real problems.  

DrupalEasy’s learning community organically grew and developed all of these principles over the years, which is a pretty good confirmation that from both learning and solutions perspectives, we are on the right track. At the onset of each week’s office hours session, we say our hellos and figure out the first problem someone is having, or had, and the group works together to come up with a solution. There is of course also a bit of Nerd banter that keeps things fun and allows us to get to know each other a bit more. Cornell’s experts also confirm that group learning contributes to developing a lot of the soft skills (oral communication, leadership,etc.) that can help make a good developer great. We agree!

We also especially appreciate the value of the problem-solving approach to teaching, and also use it in our structured training. Cornell again has some great insight into the types and characteristics of problem solving as a mode of teaching that really resonates with us. They go in pretty broad and deep with references and explanations, so let’s pull the one element they cite that we feel we can attribute a good part of the success of our programs: “The problem is what drives the motivation and the learning.” (Boom!)  

So, knowledge is a social construct and problems motivate us to learn and figure out solutions. Working together as a community to overcome problems and build viable solutions. It’s all very Drupal-y, don’t you think?

The next session of Drupal Career Online begins March 26th. Two no-cost Taste-of-Drupal information sessions about the course are coming up at 1:30pm EST on February 28 and March 14.  Sign up!

 

Matt: Commuting Time Saved

Wordpress Planet - Mon, 02/19/2018 - 18:14

On Automattic's internal BuddyPress-powered company directory, we allow people to fill out a field saying how far their previous daily commute was. 509 people have filled that out so far, and they are saving 12,324 kilometers of travel every work day. Wow!

Lucius Digital: 16 Cool Drupal modules For site builders | Februari 2018

Main Drupal Feed - Mon, 02/19/2018 - 17:37
Drupal Doggo!

It took a while before I could write a new edition, I was just busy with the production of customer projects. Here again with a brand new version, what struck me in module updates in the past month:

1. D8 Editor Advanced link

A popular module that extends the standard editor in Drupal 8 with additional options for managing links. You can now add the following attributes:

  • title
  • class
  • id
  • target
  • rel

D8 Editor Advanced link

2. Password strength

Default password checks are stupid and annoying for the user: they can check the entered password meets certain rules, such as the number of characters and varying types herein (symbols, numbers, capital letters etc.).

This is a stupid way of checking because the password ‘Welcome123’ is accepted, while it is easy to guess.

This module enables a secure password policy by “pattern-matching” and “entropy calculation”. Almost every type of password is accepted, as long as it has sufficient entropy.

SourceHow it works

Instead of checking strict rules, this module calculates the expected time a brute force attack needs to retrieve the password. This is calculated based on underlying patterns:

  • Words that appear in a standard dictionary, common first and surnames and other default passwords.
  • Words from a dictionary, but written in Leet / 1337. For example, where the “e” is written as a three and “a” like an @.
  • A standard sequence of letters like “abcdef”, “qwerty” or “123456”
  • Dates or years.

This module has been around since 2007, I wonder why I only encounter this now :) It is currently available in alpha for Drupal 8 and stable for Drupal 7 available — it is supported by Acquia and Card.

So if you want people to not have to bother to look for a password such as “one special character, 1 upper case and at least 8 characters’, then this module offers a solution.

Password Strength

3. Better Field Descriptions

In order to give content managers issues, it is possible to write an explanation of all content fields that they import. But the standard explanation in a field in the backend of Drupal are often irrelevant, to not apply these generic texts in the implemented *user story* of the installation concerned.

After installing this module you can:

  • Content managers have their own explanation text per field.
  • Set where it stands: above or below the field.
  • The explanatory style that you like.

Better Field Descriptions

4. Better login

Want to make the standard Drupal login screen better? Then install this module and you are good to go: through template overrides you can then do the required further tuning of the layout of the login screen.

Better Login

5. Ridiculously Responsive Social Sharing Buttons

Another social sharing module, but as you see in the title: these are terribly responsive. The icons are SVG based and you need no external services such as AddThis.

Advantage: you’re less dependent and have your data in hand, downside: you have less functionality- such as comprehensive statistics.

Ridiculously Responsive Social Sharing Buttons

6. Flush Cache

If you are not using Drush or Drupal console works then you can Drupal caches flush via “the ‘Flush all caches” button in the Drupal backend. But in a production environment, you will almost never flush all caches, it can cause severe performance problems.

This module solves that problem: install it and you have more control over the caches you want to flush.

CacheFlush

7. Multiple Selects

Have your Drupal content management easier with ‘multiple selects’ administration, this image seems to me to speak for itself:

Multiple Selects

8. Neutral paths

If you are running a multilingual Drupal website, visitors can see the content in one language: the currently active language. Sometimes you would like to see pages in another language. In addition: content managers / Drupal administrators usually want English and not the backend *default language*, in our case, often Dutch.

Issue tracking for example, much easier if the backend is in English: Drupal documentation and support in English is much more available than in Dutch.

This module ensures that you can visit other pages in another language than the default. And can navigate the backend in English, while frontend is in another language.

Neutral paths

9. Password Reset Landing Page (PRLR)

Drupal core includes a ‘password’ function: If you have forgotten your password then you can request a one-time login link that is automatically mailed to you.

If you click on the login link, you will see a screen with a login button. Once you click the ‘login’ button you are logged in and you are redirected to your profile page — that’s it.

You are in this situation where your password is lost / forgotten. You are not required to change your password. This is not usually done, so people often endlessly request login links.

This module solves this: the screen where you end up after clicking on the login link not only contains a login button, but also a function to change your password immediately.

Password Reset Landing Page (PRLP)

10. Auto Purge Users

The user list in Drupal is usually not or hardly ever administered. If people have long been inactive or have not completed their registration, the account can usually be removed to avoid overhead and security issues.

This module does it for you automatically, it checks inactivity below a point and blocks users if they meet:

  • Certain time inactive.
  • Account never activated after registration.
  • Not been logged in for a period of time.

Not a popular module, but in the case of an example Drupal social intranet it can come in handy.

Auto Purge Users

11. Vertical Tabs Config

Want to influence the order of the Drupal tabs? Or do you want some tabs to not show all of your content manager? To keep tabs simple and usable you can install this module: select which tabs to show and in what order.

Modules with similar functions: Simplify and Hide vertical tabs.

Vertical Tabs Config

12. Custom Search

The default Drupal search is fine, but really standard: you have few options to tune the engine. After installing this module, changes that you can then include are:

  • Change the default label in the search box.
  • Set a default text in the search box.
  • Tune ‘Advanced Search’.
  • Change the text on the “submit button”.

And much more, see module page:

Custom Search

13. Persistent Login

Drupal 8 core does not have a ‘remember password’ function when you log in. You can remain automatically logged for some time, but that is based on a PHP session. This module does not, you can also:

  • How long users can stay logged in.
  • How many places a person can be logged in at once.
  • Select certain pages that the user must log in again at. These are usually pages where more sensitive information is available.
  • Allow the user to delete all his logins themself.

Persistent Login

14. Realistic Dummy ContentWisdom

Using the Devel module you can automatically generate content so you can see if your modules / themes work well. But it gives an unrealistic picture of the end result, this module generates more realistic images and texts.

Realistic Dummy Content

15. Password Policy

Although I am a fan of the aforementioned ‘Password strength’ module, this can also be useful if you want to make a specific password policy on your Drupal website.

Password Policy

16. Mass Password Reset

This module, we often use to implement Drupal social intranet: previously, all users and content created by an administrator on a test environment, without it people were informed through e-mail.

Once the social intranet went live, we sent all users at once an email with a login link via this module; the system was live!

Mass Password Reset

Wrap Up

So far that’s what I noticed last month in Drupal modules, stay tuned for more fat Drupal content!

Source header image

16 Cool Drupal modules For site builders | Februari 2018 was originally published in Lucius Digital | Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.

Akismet: Version 4.0.3 of the Akismet WordPress Plugin Is Now Available

Wordpress Planet - Mon, 02/19/2018 - 15:58

Version 4.0.3 of the Akismet plugin for WordPress is now available.

4.0.3 contains a few helpful changes:

  • Adds a new scheduled task to clear out old Akismet entries in the wp_commentmeta table that no longer have corresponding comments in wp_comments.  This should help reduce Akismet’s database usage for some users.
  • Adds a new akismet_batch_delete_count action so developers can optionally take action when Akismet comment data is cleaned up.

To upgrade, visit the Updates page of your WordPress dashboard and follow the instructions. If you need to download the plugin zip file directly, links to all versions are available in the WordPress plugins directory.

Mark Jaquith: Handling old WordPress and PHP versions in your plugin

Wordpress Planet - Mon, 02/19/2018 - 15:14

New versions of WordPress are released about three times a year, and WordPress itself supports PHP versions all the way back to 5.2.4.

What does this mean for you as a plugin developer?

Honestly, many plugin developers spend too much time supporting old versions of WordPress and really old versions of PHP.

It doesn’t have to be this way. You don’t need to support every version of WordPress, and you don’t have to support every version of PHP. Feel free to do this for seemingly selfish reasons. Supporting old versions is hard. You have to “unlearn” new WordPress and PHP features and use their older equivalents, or even have code branches that do version/feature checks. It increases your development and testing time. It increases your support burden.

Economics might force your hand here… a bit. You can’t very well, even in 2018, require that everyone be running PHP 7.1 and the latest version of WordPress. But consider the following:

97% of WordPress installs are running PHP 5.3 or higher. This gives you namespaces, late static binding, closures, Nowdoc, __DIR__, and more.

88% of WordPress installs are running PHP 5.4 or higher. This gives you short array syntax, traits, function-array dereferencing, guaranteed <?= echo syntax availability, $this access in closures, and more.

You get even more things with PHP 5.5 and 5.6 (64% of installs are running 5.6 or higher), but a lot of the syntactic goodness came in 5.3 and 5.4, with very few people running versions less thatn 5.4. So stop typing array(), stop writing named function handlers for simple array_map() uses, and start using namespaces to organize and simplify your code.

Okay, so… how?

I recommend that your main plugin file just be a simple bootstrapper, where you define your autoloader, do a few checks, and then call a method that initializes your plugin code. I also recommend that this main plugin file be PHP 5.2 compatible. This should be easy to do (just be careful not to use __DIR__).

In this file, you should check the minimum PHP and WordPress versions that you are going to support. And if the minimums are not reached, have the plugin:

  1. Not initialize (you don’t want syntax errors).
  2. Display an admin notice saying which minimum version was not met.
  3. Deactivate itself (optional).

Do not die() or wp_die(). That’s “rude”, and a bad user experience. Your goal here is for them to update WordPress or ask their host to move them off an ancient version of PHP, so be kind.

Here is what I use:

View code on GitHub

Reach out on Twitter and let me know what methods you use to manage PHP and WordPress versions in your plugin!

Do you need WordPress services?

Mark runs Covered Web Services which specializes in custom WordPress solutions with focuses on security, speed optimization, plugin development and customization, and complex migrations.

Please reach out to start a conversation!

[contact-form]

qed42.com: Implementing #autocomplete in Drupal 8 with Custom Callbacks

Main Drupal Feed - Mon, 02/19/2018 - 11:59
Implementing #autocomplete in Drupal 8 with Custom Callbacks Body

Autocomplete on textfields like tags / user & node reference helps improve the UX and interactivity for your site visitors, In this blog post I'd like to cover how to implement autocomplete functionality in Drupal 8, including implementing a custom callback

Step 1: Assign autocomplete properties to textfield

As per Drupal Change records, #autocomplete_path has been replaced by #autocomplete_route_name and #autocomplete_parameters for autocomplete fields ( More details -- https://www.drupal.org/node/2070985).

The very first step is to assign appropriate properties to the textfield:

  1. '#autocomplete_route_name':
    for passing route name of callback URL to be used by autocomplete Javascript Library.
  2. '#autocomplete_route_parameters':
    for passing array of arguments to be passed to autocomplete handler.
$form['name'] = array( '#type' => 'textfield', '#autocomplete_route_name' => 'my_module.autocomplete', '#autocomplete_route_parameters' => array('field_name' => 'name', 'count' => 10), );

Thats all! for adding an #autocomplete callback to a textfield. 

However, there might be cases where the routes provided by core might not suffice as we might different response in JSON or additional data. Lets take a look at how to write a autocomplete callback, we will be using using my_module.autocomplete route and will pass arguments: 'name' as field_name and 10 as count.

Step 2: Define autocomplete route

Now, add the 'my_module.autocomplete' route in my_module.routing.yml file as:

my_module.autocomplete: path: '/my-module-autocomplete/{field_name}/{count}' defaults: _controller: '\Drupal\my_module\Controller\AutocompleteController::handleAutocomplete' _format: json requirements: _access: 'TRUE'

While Passing parameters to controller, use the same names in curly braces, which were used while defining the autocomplete_route_parameters. Defining _format as json is a good practise.

Step 3: Add Controller and return JSON response

Finally, we need to generate the JSON response for our field element. So, proceeding further we would be creating AutoCompleteController class file at my_module > src > Controller > AutocompleteController.php.

<?php namespace Drupal\my_module\Controller; use Drupal\Core\Controller\ControllerBase; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Drupal\Component\Utility\Tags; use Drupal\Component\Utility\Unicode; /** * Defines a route controller for entity autocomplete form elements. */ class AutocompleteController extends ControllerBase { /** * Handler for autocomplete request. */ public function handleAutocomplete(Request $request, $field_name, $count) { $results = []; // Get the typed string from the URL, if it exists. if ($input = $request->query->get('q')) { $typed_string = Tags::explode($input); $typed_string = Unicode::strtolower(array_pop($typed_string)); // @todo: Apply logic for generating results based on typed_string and other // arguments passed. for ($i = 0; $i < $count; $i++) { $results[] = [ 'value' => $field_name . '_' . $i . '(' . $i . ')', 'label' => $field_name . ' ' . $i, ]; } } return new JsonResponse($results); } }

We would be extending ControllerBase class and would then define our handler method, which will return results. Parameters for the handler would be Request object and arguments (field_name and count) passed in routing.yml file. From the Request object, we would be getting the typed string from the URL. Besides, we do have other route parameters (field_name and Count) on the basis of which we can generate the results array. 

An important point to be noticed here is, we need the results array to have data in 'value' and 'label' key-value pair as we have done above. Then finally we would be generating JsonResponse by creating new JsonResponse object and passing $results.

That's all we need to make autocomplete field working. Rebuild the cache and load the form page to see results.

PURUSHOTAM RAI Mon, 02/19/2018 - 17:29

jmolivas.com: Try Drupal 8.5 and umami profile using one command

Main Drupal Feed - Mon, 02/19/2018 - 08:23
Try Drupal 8.5 and umami profile using one command jmolivas Mon, 02/19/2018 - 08:23 Body

If you are following the upcoming release of Drupal 8.5 you might be aware of the umami profile. This installation profile is part of the Out of The Box experience initiative. The goal of this profile is to add sample content presented in a well-designed theme, displayed as a food magazine. Using recipes and feature articles this example site will make Drupal look much better right from the start and help evaluators explore core Drupal concepts like content types, fields, blocks, views, taxonomy, etc.

Roy Scholten: Tweets starting from here

Main Drupal Feed - Sun, 02/18/2018 - 22:55
18 Feb 2018 /sites/default/files/styles/large/public/20180219-notes-ui.png?itok=Xp6Vepyy Tweets starting from here

My previous post inspired Joeri to some improvements on his site. Nice!

I built another step towards POSSE this weekend: tweet-sized notes posted as content on yoroy.com that get pushed to Twitter via RSS and Zapier. Here’s how:

Create a new content type “Note”. This one needs to only have a text area. And here we run into Drupal always requiring a title. We can’t create entities without giving it a title. The title itself is always a text field, so not ideal for writing 280 char bits of text. Two contrib modules to work around this:

  • Auto entity label to define an automatic pattern for the title of these Notes. I set it to use a simple timestamp.
  • Exclude node title to actually hide the title field on the Note creation form and on display.

Next I defined a new text format that does not use CKEditor but allows tags and automatically transforms URLs into links. I set this to be the default text format for the text area on the Note using the Better Formats module (sadly currently only available as an old development release). This step is optional, it helps remove user interface clutter. This gives me a content creation form with just a single plain text text area, a “published” checkbox and a Save button.

I updated the views that list blog content on this site to also include content of type “Note” and configured a Notes RSS feed as well. I use this feed as an input on Zapier where the Notes body is extracted and posted as a tweet.

Tags posse twitter Drupal content modeling drupalplanet

Matt Glaman: Florida Drupal Camp: a return four years in the making

Main Drupal Feed - Sat, 02/17/2018 - 12:25
Florida Drupal Camp: a return four years in the making mglaman Sat, 02/17/2018 - 06:25

Five years ago I went to my second Drupal Camp and first Drupal Camp that I presented at. It has been four years, but I am finally going back to Florida Drupal Camp. I am pretty excited, as a lot has changed since then.

KatteKrab: Site building with Drupal

Main Drupal Feed - Sat, 02/17/2018 - 03:05
Saturday, February 17, 2018 - 14:05What even is "Site Building"?

At DrupalDownunder some years back, the wonderful Erica Bramham named her talk "All node, no code". Nodes were the fundamental building blocks in Drupal, they were like single drops of content. These days though, it's all about entities.

But hang on a minute, I'm using lots of buzz words, and worse, I'm using words that mean different things in different contexts. Jargon is one of the first hurdles you need to jump to understand the diverse worlds of the web. People who grow up multi-lingual learn that the meanings of words is somewhat arbitrary. They learn the same thing has different names. This is true for the web too. So the first thing to know about Site Building, is it means different things to different people. 

To me, it means being able to build a website with out knowing how to code. I also believe it means I can build a website without having to set up my own development environment. I know people who vehemently disagree with me about this. But that's ok. This is my blog, and these are my rules.

So - this is a post about site building, using SimplyTest.Me and Drupal 8 out of the box.

1. Go to https://simplytest.me

2. Type Drupal Core in the search field, and select "Drupal core" from the list

3. Choose the latest development branch, right at the bottom of the list.

 

For me, right now, that's 8.6.x, and here's a screenshot of what that looks like.

 

4. Click "Launch sandbox".

Now wait.

In a few moments, you should see a fresh shiny Drupal 8 site, ready for you to explore.

For me today, it looks like this.  

 

In the top right of the window, you should see a "Log in" link.

Click that, and enter admin/admin to login. 

You're now ready to practice some site building!

First, you'll need to create some content to play with.  Here's a short screencast that shows you how to login, add an article, and change the title using Quick Edit.

A guide to what's next

Follow the Drupal User guide to start building your site!

If you want to start at the beginning, you'll get a great overview of Drupal, and some important info on how to plan your site. But if you want to roll up your sleeves and get building, you can skip the chapter on site installation and jump straight to chapter 4, and dive into basic site configuration.

 

Experiment

You have 24 hours to experiment with the simplytest.me sandbox - after that it disappears.

 

Get in touch

If you want something more permanent, you might want to "try drupal" or contact us at catalyst-au.net to discuss our Drupal services.

Post Status: How WebDevStudios is serving different market segments — Draft podcast

Wordpress Planet - Fri, 02/16/2018 - 22:38

Welcome to the Post Status Draft podcast, which you can find on iTunes, Google Play, Stitcher, and via RSS for your favorite podcatcher. Post Status Draft is hosted by Brian Krogsgard and co-host Brian Richards.

In this episode, Lisa Sabin-Wilson shares about the entangled history of WebDevStudios and eWebscapes and how she and team are targeting every level of the market. WebDevStudios focuses heavily on the upper and enterprise market segments, providing a high degree of attention and support to those clients.

Sometime in 2017 Lisa did the math on all the lower-end projects that they were referring away and realized that WDS had a prime opportunity to re-introduce her former web studio, eWebscapes, as a way to serve these smaller-scope projects. This rebirth, so to speak, has positioned them to better target local communities, provide staff with more variety of work, and bring simplified processes alongside those they use for larger projects.

Key take-aways
  • Lisa observed a market opportunity and did the math first
  • Relaunching started with a solid content strategy
  • Simplified processes for managing a project
  • Utilized talent already on staff
  • Lots of opportunity to target local communities
  • Evaluating the success of this strategy after 6 months
Links

Photo Credit

Sponsor: Prospress

Prospress makes the WooCommerce Subscriptions plugin, that enables you to turn your online business into a recurring revenue business. Whether you want to ship a box or setup digital subscriptions like I have on Post Status, Prospress has you covered. Check out Prospress.com for more, and thanks to Prospress for being a Post Status partner.

Matt: No Office Workstyle

Wordpress Planet - Fri, 02/16/2018 - 18:44

Reed Albergotti has a great article titled Latest Amenity for Startups: No Office. You can put in your email to read I believe but it's behind a paywall otherwise. The Information is a pretty excellent site that alongside (former Automattician) Ben Thompson's Stratechery I recommend subscribing to. Here are some quotes from the parts of the article that quote me or talk about Automattic:

So it’s no coincidence that one of the first companies to operate with a distributed workforce has roots in the open source movement. Automattic, the company behind open source software tools like WordPress, was founded in 2005 and has always allowed its employees to work from anywhere. The company’s 680 employees are based in 63 countries and speak 79 languages. Last year, it closed its San Francisco office, a converted warehouse — because so few employees were using it. It still has a few coworking spaces scattered around the globe.

Matt Mullenweg, Automattic’s founder and CEO, said that when the company first started, its employees communicated via IRC, an early form of instant messaging. Now it uses a whole host of software that’s tailor-made for remote work, and as the technology evolves, Automattic adopts what they need.

Mr. Mullenweg said Automattic only started having regular meetings, for instance, after it started using Zoom, a video conferencing tool that works even on slow internet connections.

He’s become a proponent of office-less companies and shares what he’s learned with other founders who are attempting it. Mr. Mullenweg said he believes the distributed approach has led to employees who are even more loyal to the company and that his employees especially appreciate that they don’t need to spend a chunk of their day on a commute.

“Our retention is off the charts,” he said.

And:

“Where it goes wrong is if they don’t have a strong network outside of work—they can become isolated and fall into bad habits,” Mr. Mullenweg said. He said he encourages employees to join groups, play sports and have friends outside of work. That kind of thing wouldn’t be a risk at big tech companies, where employees are encouraged to socialize and spend a lot of time with colleagues.

But for those who ask him about the negatives, Mr. Mullenweg offers anecdotal proof of a workaround.

For example, he said he has 14 employees in Seattle who wanted to beat the isolation by meeting up for work once a week. So they found a local bar that didn’t open until 5 p.m., pooled together the $250 per month co-working stipends that Automattic provides and convinced the bar’s owner to let them rent out the place every Friday.

The didn't need to pool all their co-working allowance to get the bar, I recall it was pretty cheap! Finally:

For Automattic, flying 700 employees to places like Whistler, British Columbia or Orlando, Florida, has turned into a seven-figure expense.

“I used to joke that we save it on office space and blow it on travel. But the reality is that in-person is really important. That’s a worthwhile investment,” Mr. Mullenweg said.It might take a while, but some people are convinced that a distributed workforce is the way of the future.

“Facebook is never going to work like this. Google is never going to work like this. But whatever replaces them will look more like a distributed company than a centralized one,” Mr. Mullenweg said.

Drop Guard: Feature-February: What changed in Drop Guard?

Main Drupal Feed - Fri, 02/16/2018 - 11:00
Feature-February: What changed in Drop Guard?

Hello everybody! You might've experienced some changes of the project settings interface already - here’s the broad summary of what makes Drop Guard more efficient and more powerful now: composer package manager mode, speeding up the setup of update type behaviors (with a short mode option) and live site monitoring.

 

Drupal 8 Composer Drupal Planet Drupal features Drop Guard announcements

Dries Buytaert: My POSSE plan for evolving my site

Main Drupal Feed - Fri, 02/16/2018 - 09:23

In an effort to reclaim my blog as my thought space and take back control over my data, I want to share how I plan to evolve my website. Given the incredible feedback on my previous blog posts, I want to continue to conversation and ask for feedback.

First, I need to find a way to combine longer blog posts and status updates on one site:

  1. Update my site navigation menu to include sections for "Blog" and "Notes". The "Notes" section would resemble a Twitter or Facebook livestream that catalogs short status updates, replies, interesting links, photos and more. Instead of posting these on third-party social media sites, I want to post them on my site first (POSSE). The "Blog" section would continue to feature longer, more in-depth blog posts. The front page of my website will combine both blog posts and notes in one stream.
  2. Add support for Webmention, a web standard for tracking comments, likes, reposts and other rich interactions across the web. This way, when users retweet a post on Twitter or cite a blog post, mentions are tracked on my own website.
  3. Automatically syndicate to 3rd party services, such as syndicating photo posts to Facebook and Instagram or syndicating quick Drupal updates to Twitter. To start, I can do this manually, but it would be nice to automate this process over time.
  4. Streamline the ability to post updates from my phone. Sharing photos or updates in real-time only becomes a habit if you can publish something in 30 seconds or less. It's why I use Facebook and Twitter often. I'd like to explore building a simple iOS application to remove any friction from posting updates on the go.
  5. Streamline the ability to share other people's content. I'd like to create a browser extension to share interesting links along with some commentary. I'm a small investor in Buffer, a social media management platform, and I use their tool often. Buffer makes it incredibly easy to share interesting articles on social media, without having to actually open any social media sites. I'd like to be able to share articles on my blog that way.

Second, as I begin to introduce a larger variety of content to my site, I'd like to find a way for readers to filter content:

  1. Expand the site navigation so readers can filter by topic. If you want to read about Drupal, click "Drupal". If you just want to see some of my photos, click "Photos".
  2. Allow people to subscribe by interests. Drupal 8 make it easy to offer an RSS feed by topic. However, it doesn't look nearly as easy to allow email subscribers to receive updates by interest. Mailchimp's RSS-to-email feature, my current mailing list solution, doesn't seem to support this and neither do the obvious alternatives.

Implementing this plan is going to take me some time, especially because it's hard to prioritize this over other things. Some of the steps I've outlined are easy to implement thanks to the fact that I use Drupal. For example, creating new content types for the "Notes" section, adding new RSS feeds and integrating "Blogs" and "Notes" into one stream on my homepage are all easy – I should be able to get those done my next free evening. Other steps, like building an iPhone application, building a browser extension, or figuring out how to filter email subscriptions by topics are going to take more time. Setting up my POSSE system is a nice personal challenge for 2018. I'll keep you posted on my progress – much of that might happen via short status updates, rather than on the main blog. ;)

Gizra.com: Travis - The Need for Speed

Main Drupal Feed - Fri, 02/16/2018 - 06:00

Chances are that you already use Travis or another cool CI to execute your tests, and everyone politely waits for the CI checks before even thinking about merging, right? More likely, waiting your turn becomes a pain and you click on the merge: it’s a trivial change and you need it now. If this happens often, then it’s the responsibility of those who worked on those scripts that Travis crunches to make some changes. There are some trivial and not so trivial options to make the team always be willing to wait for the completion.

This blog post is for you if you have a project with Travis integration, and you’d like to maintain and optimize it, or just curious what’s possible. Users of other CI tools, keep reading, many areas may apply in your case too.

Unlike other performance optimization areas, doing before-after benchmarks is not so crucial, as Travis mostly collects the data, you just have to make sure to do the math and present the numbers proudly.

Caching

To start, if your .travis.yml lacks the cache: directive, then you might start in the easiest place: caching dependencies. For a Drupal-based project, it’s a good idea to think about caching all the modules and libraries that must be downloaded to build the project (it uses a buildsystem, doesn’t it?). So even a variant of:

cache: directories: - $HOME/.composer/cache/files

or for Drush

cache: directories: - $HOME/.drush/cache

It’s explained well in the verbose documentation at Travis-ci.com. Before your script is executed, Travis populates the cache directories automatically from a successful previous build. If your project has only a few packages, it won’t help much, and actually it can make things even slower. What’s critical is that we need to cache slow-to-generate, easy-to-download materials. Caching a large ZIP file would not make sense for example, caching many small ones from multiple origin servers would be more beneficial.

From this point, you could just read the standard documentation instead of this blog post, but we also have icing on the cake for you. A Drupal installation can take several minutes, initializing all the modules, executing the logic of the install profile and so on. Travis is kind enough to provide a bird’s-eye view on what eats up build time:

Execution speed measurements built in the log

Mind the bottleneck when making a decision on what to cache and how.

For us, it means cache of the installed, initialized Drupal database and the full document root. Cache invalidation is hard, we can’t change that, but it turned out to be a good compromise between complexity and execution speed gain, check our examples:

Do your homework and cache what’s the most resource-consuming to generate, SQL database, built source code or compiled binary, Travis is here to assist with that.

Software Versions

There are two reasons to pay attention to software versions.

Use Pre-installed Versions

Travis uses containers of different distributions, let’s say you use trusty, the default one these days, then if you choose PHP 7.0.7, it’s pre-installled, in case of 7.1, it’s needed to fetch separately and that takes time for every single build. When you have production constraints, that’s almost certainly more important to match, but in some cases, using the pre-installed version can speed things up.

And moreover, let’s say you prefer MariaDB over MySQL, then do not sudo and start to install it with the package manager, as there is the add-on system to make it available. The same goes for Google Chrome, and so on. Stick to what’s inside the image already if you can. Exploit that possibility of what Travis can fetch via the YML definition!

Use the Latest and (or) Greatest

If you ever read an article about the performance gain from migrating to PHP 7, you sense the importance of selecting the versions carefully. If your build is PHP-execution heavy, fetching PHP 7.2 (it’s another leap, but mind the backward incompatibilities) could totally make sense and it’s as easy as can be after making your code compatible:

language: php php: - '7.2'

Almost certainly, a similar thing could be written about Node.js, or relational databases, etc. If you know what’s the bottleneck in your build and find the best performing versions – newer or older – it will improve your speed. Does that conflict with the previous point about pre-installed versions? Not really, just measure which one helps your build the most!

Make it Parallel

When a Travis job is running, 2 cores and 4 GBytes of RAM is available – that’s something to rely on! Downloading packages should happen in parallel. drush make, gulp and other tools like that might use it out of the box: check your parameters and configfiles. However, on the higher level, let’s say you’d like to execute a unit test and a browser-based test, as well. You can ask Travis to spin up two (or more) containers concurrently. In the first, you can install the unit testing dependencies and execute it; then the second one can take care of only the functional test. We have a fine-grained example of this approach in our Drupal-Elm Starter, where 7 containers are used for various testing and linting. In addition to the great execution speed reduction, the benefit is that the result is also more fine-grained, instead of having a single boolean value, just by checking the build, you have an overview what can be broken.

All in all, it’s a warm fuzzy feeling that Travis is happy to create so many containers for your humble project:

If it's independent, no need to serialize the execution Utilize RAM

The available memory is currently between 4 and 7.5 GBytes , depending on the configuration, and it should be used as much as possible. One example could be to move the database main working directory to a memory-based filesystem. For many simpler projects, that’s absolutely doable and at least for Drupal, a solid speedup. Needless to say, we have an example and on client projects, we saw 15-30% improvement at SimpleTest execution. For traditional RMDBS, you can give it a try. If your DB cannot fit in memory, you can still ask InnoDB to fill memory.

Think about your use case – even moving the whole document root there could be legitimate. Also if you need to compile a source code, doing it there makes sense as well.

Build Your Own Docker Image

If your project is really exotic or a legacy one, it potentially makes sense to maintain your own Docker image and then download and execute it in Travis. We did it in the past and then converted. Maintaining your image means recurring effort, fighting with outdated versions, unavailable dependencies, that’s what to expect. Still, even it could be a type of performance optimization if you have lots of software dependencies that are hard to install on the current Travis container images.

+1 - Debug with Ease

To work on various improvements in the Travis integration for your projects, it’s a must to spot issues quickly. What worked on localhost, might or might not work on Travis – and you should know the root cause quickly.

In the past, we propagated video recording, now I’d recommend something else. You have a web application, for all the backend errors, there’s a tool to access the logs, at Drupal, you can use Drush. But what about the frontend? Headless Chrome is neat, it has built-in debugging capability, the best of which is that you can break out of the box using Ngrok. Without any X11 forwarding (which is not available) or a local hack to try to mimic Travis, you can play with your app running in the Travis environment. All you need to do is to execute a Debug build, execute the installation part (travis_run_before_install, travis_run_install, travis_run_before_script), start Headless Chrome (google-chrome --headless --remote-debugging-port=9222), download Ngrok, start a tunnel (ngrok http 9222), visit the exposed URL from your local Chrome and have fun with inspection, debugger console, and more.

Takeaway

Working on such improvements has benefits of many kinds. The entire development team can enjoy the shorter queues and faster merges, and you can go ahead and apply part of the enhancements to your local environment, especially if you dig deep into database performance optimization and make the things parallel. And even more, clients love to hear that you are going to speed up their sites, as this mindset should be also used at production.

Continue reading…

Agiledrop.com Blog: AGILEDROP: Time to move forward?

Main Drupal Feed - Fri, 02/16/2018 - 00:10
When is the right time to let it go and move forward? Yes, we are talking about migrating to Drupal 8 version. Drupal 8 was released in November 2015, so it has been more than two years now. No matter what kind of website you have, whether you have an online shop, small brochure website or an extensive and complex website, if its build on Drupal 6, it's almost urgent you move forward and upgrade it to Drupal 8. Why? The Drupal community no longer (officially) supports Drupal 6 since three months after Drupal 8 came out. That means that bugs are no longer getting fixed. Drupal 6 is simply long… READ MORE

Acro Media: Drupal Commerce 2: How to Add and Modify Product Content

Main Drupal Feed - Thu, 02/15/2018 - 21:13

In part one  and two of this Acro Media Tech Talk video series, we covered how you set up a new product attribute and used rendered fields, in Drupal Commerce 2. Parts three and four then to set up a product variation type and a product type, both with custom fields. This completes our new product configuration.

In part five, the last of this series, we'll finally get to try out the new product! We'll add a product to the store as if we are a store administrators (end user) who is creating content. We'll try out all of the fields and properties we've configured, make a product, and view it on the site. Afterwards, we'll cover how an administrator can then go in and edit the product to make content changes.

This entire video series, parts one through five, show you how to set up a new product in Drupal Commerce 2, from start to finish. The video is captured using our Urban Hipster Commerce 2 demo site.

Its important to note that this video was recorded before the official 2.0 release of Drupal Commerce and so you may see a few small differences between this video and the official release now available.

Urban Hipster Commerce 2 Demo site

This video was created using the Urban Hipster Commerce 2 demo site. We've built this site to show the adaptability of the Drupal 8, Commerce 2 platform. Most of what you see is out-of-the-box functionality combined with expert configuration and theming.

More from Acro Media Drupal modules used in this video

Pages