You are here

Drupal Planet

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

myDropWizard.com: We've made 99 Drupal 6 Long-Term Support releases... what does that mean for Drupal 7?

Thu, 01/03/2019 - 10:34

As you may or may not know, we've been providing Drupal 6 Long-Term Support (D6LTS) since February 24, 2016, as one of two vendors officially blessed by the Drupal Security Team to do so.

In that time, we have made 99 releases (both Drupal core and contrib) for D6LTS!

Most of those were security releases, but there were also a handful of bug fixes, and most recently, updates to support PHP 7.2(FYI: As of a couple days ago, PHP 5 has also reached it's End-of-Life (EOL) - do you have a plan to update to PHP 7.1 or 7.2?)

When we were first talking to potential customers about D6LTS, I remember many people doubting that we'd be releasing anything at all!

They'd say something like "Drupal 6 has been around so long, aren't all the security issues shaken out by now?" Almost 100 releases later, and I'd say there was plenty to be done. There still is! :-)

In this article, I'm going to look back on Drupal 6 LTS, and also look forward to what that may mean for Drupal 7 extended support after it reaches its End-of-Life.

Categories: Drupal

Morpht: Drupal and Composer: Part 3 — Converting Management of an Existing Drupal 8 site to Composer

Thu, 01/03/2019 - 10:11

As any developer working with Drupal 8 knows, working with Composer has become an integral part of working with Drupal. This can be daunting for those without previous experience working with command line, and can still be a confusing experience for those who do.

This is the third post in an explorative series of blog posts on Drupal and Composer, hopefully clearing up some of the confusion. The four blog posts on this topic will be as follows:

If you have not yet read part 1 and part 2, then before reading through this post, it is probably best to ensure you understand the concepts outlined in the summaries of those articles.

Switching Management of your Drupal site to Composer

So you’ve worked your way through parts one and two of this series, and you now understand what Composer is, how it can be used to work with Drupal 8, and how to start a new Drupal 8 project using Composer. But, you started your current project without using Composer, and want to switch to managing your project using Composer. Where do you start? This article will discusses a few strategies behind converting your existing system to Drupal. Fortunately some automated tools exist for converting existing sites to Composer, and in the situation that neither of these tools work, an overview is provided on how to manually convert an existing site 

But, before moving on to any of these methods...

Take a backup! As this process will be destructive to your system, make sure you take a backup of your file system, and take a backup of your database. Then go and check to ensure that you have a full backup of the file system, and a full back up of the database.

If you skip this step, or do not do it properly, you may end up with an entirely broken system, so don’t skip this step.

Method 1: Composerize (Composer plugin)

Composerize Drupal is a Composer plugin that has been built to convert existing Drupal installations to use Composer. Instructions are on the download page. If this method doesn't work, you can try the Drupal Composerize module:

Method 2: Composerize (Drupal module)

The Composerize module is a Drupal module that is built to convert existing Drupal installations to use Composer. At the time of writing, this module has the following disclaimer on the page:

This module is still in development. It supports very basic Drupal 8 setups, but there are many necessary features it still lacks (e.g., support for patches, JavaScript libraries, distributions, etc). We're working on all that stuff, but this module is definitely not ready for prime time.

If this method doesn't work, you'll likely have to manually convert your site.

Method 3: Manual method

If the above steps fail, your last option is to convert your installation to using the Drupal Composer Template manually. Note that pretty much every system will be different, so these instructions are an overview of the end goal, rather than a complete set of steps that will convert your system. There is a good chance you’ll run into issues along the way that are not covered here, so make sure you took that backup!

Converting a system to the template requires achieving the following goals:

  • Setting up the file structure of the system to match the Drupal Composer Template
  • Delete old Composer files
  • Add the Template file system to your Drupal system
  • Set up the configuration directory and the private files directory
  • Set up your profiles, modules and themes to be managed by Composer
Step 1: Convert your file structure to match the Drupal Composer Template file structure

The Drupal Composer Template is set up to manage the directory above the webroot, as well as the webroot. The webroot is located in the [PROJECT ROOT]/web folder. Therefore you will need this structure:

  • / - Project root. Contains various scaffolding files such as composer.json and composer.lock, as well as the configuration export folder, and the webroot folder
    • /web - The webroot. Contains all Drupal core, profile, module and theme files.

You'll need to set up your Drupal installation to match this structure, and make sure that the server is set up so that the web root is at [PROJECT ROOT]/web.

Note: Some servers require the webroot to be in a directory with a specific name, such as public_html, or www. In this case, you can try setting up symlinks from the required directory name to the /web directory, so that, for example, [PROJECT ROOT]/public_html is a symlink pointing at [PROJECT ROOT]/web. Your Drupal files will then reside in the /web directory (satisfying the Drupal template), and also be accessible at /public_html (satisfying the server requirements). If this does not work, another option would be to edit the composer.json file (which is added in step 3) and change any paths that point at the /web directory, to point at the directory name you are actually using.

Step 2: Delete old Composer files

I'll say it again, because it needs to be said, make sure you took that backup in step 0!

If any of the following files or folders exist in your installation, delete them. Note however that you may want to save the composer.json file for reference if you've manually added any libraries into your existing installation using Composer.

  • [PROJECT ROOT]/vendor directory
  • [PROJECT ROOT]/composer.json file
  • [PROJECT ROOT]/composer.lock file
  • [PROJECT ROOT]/web/vendor directory
  • [PROJECT ROOT]/web/composer.json file
  • [PROJECT ROOT]/web/composer.lock file.
Step 3: Add the Template file system to your Drupal system

Go here, click 'clone or download' and download the .zip file (note - or clone the Git repository if you prefer)

  1. Save/move the zip file into the project root folder (the directory above the 'web' folder you created above). You can then unpack it using the following command. Before this step, the file /composer.json should not exist. After this step, if you've done it correctly, this file will exist.
    tar -zxvf [FILE] --strip-components=1
  2. Run the following command from the project root folder. This command will Install the Composer dependencies as well as create the /vendor directory.
    composer install
  3. Run the following to ensure your database is up to date, and caches are cleared.
    drush updb; drush cr;
Step 4: Set up the configuration directory and the private files directory (Optional)

This next step is optional, however it will make for a more secure system. First, the following directories need to be created if they don't already exist:

  • [PROJECT ROOT]/config/sync
  • [PROJECT_ROOT]/private

The first folder is where exports of the Drupal 8 configuration system will be exported to. The second folder is the private files folder. Creating both of these directories as siblings to the webroot adds security, as the files are not in a web-accessible location. The next thing to do is tell the system of the location of these files. This is done by declaring the folder paths in settings.php. You can do this by adding the following two lines to the bottom of settings.php:

$config_directories['sync'] = '../config/sync';
$settings['file_private_path'] = '../private';

After this, clear the registry (drush cr;). You can confirm that the configuration directory was properly set by running drush cex sync, and then checking that there are .yml files in the [PROJECT ROOT]/config/sync directory. You can confirm that the private files folder was properly set by going to Admin -> Configuration -> Media -> File System, and confirming that the private files directory is listed as ../private.

Step 5: Set up your profiles, modules and themes to be managed by Composer

The final step is to set up Composer to manage Drupal profiles, modules and themes to be managed by Composer. The Drupal Composer Template tracks Core by default, but needs to be informed of the rest of your code. Note that if you do not want to use the most recent version of these profiles/modules/themes, you will need to alter the commands below to set the version you want to install.

Drupal profiles, modules and themes can be installed with the following command:

composer require drupal/[PACKAGE NAME]

For example, if you were using the Administration Toolbar module (admin_toolbar), you would run:

composer require drupal/admin_toolbar

After you have done this, ensure you are up to date with a DB update and cache clear:

drush updb; drush cr;

At this point, your system should be converted to the Drupal Composer Template, with contributed code being managed by Composer.

Summary

This article looks at converting exiting Drupal 8 sites to being managed by the Drupal Composer Template. Doing this can potentially be automated using the Composerize Composer plugin or the Composerize Drupal module. In situations where this does not work, the manual directions in this article can be used as an alternative.

In the next and final part of this series, we'll look at how Drupal developers can integrate 3rd party libraries into their custom Drupal profiles, modules and themes.

Categories: Drupal

Debug Academy: Annoucement: Drupal.tv - A new beginning for the Drupal community!

Thu, 01/03/2019 - 01:04
Author: Ashraf Abed

The Drupal we all know and love is evolving. The learning curve is shifting, the development paradigm is different, and the community, not only the software, is more ambitious. We felt it was time to build Drupal.tv as a thank you to the wider community. Drupal.tv is live as of January 1st, 2019!

Kevin Thull

From the community spotlight on Drupal.org: “He's the fellow that is dashing from room to room before the first session begins to set up the AV equipment and checking in with presenters making sure they all "push the red button". Because of him, we are all able attend the sessions we miss while busy elsewhere. He is personally responsible for recording over 800 sessions and donating countless hours of his time.”

Hear his thoughts on the unofficial Drupal recording initiative ( https://www.drupal.org/association/blog/introducing-the-unofficial-drupal-recording-initiative ).

Thank you, Kevin!

A Tweet to start it all

In Oct 2018, Rachel Lawson (@rachel_norfolk) tweeted: “It strikes me that creating a “DrupalTV” site, collating all YouTube session videos, would be possible in Drupal core these days. Tagging, searching, the lot. Could be a fun project? I’m sure one of our hosting providers would help…

As fate would have it, Ashraf Abed (@ashabed) of Debug Academy was looking for the upcoming semester’s class project and came across the tweet. Debug Academy always does a real, new project in class as it’s the best way to learn programming and to build credibility.

Yes, newbie Drupalers built this site.

Drupal’s learning curve is shifting. The focus of many ongoing core initiatives is improving developer experience, and not only for senior programmers.

This project was built (& continues to be built) by a team of new Drupal developers, led by one Acquia “Grand Master” certified Architect (Ashraf Abed, Debug Academy’s CEO).

The backgrounds of the team include (but are not limited to):

  • 4 experienced backend developers with 0 Drupal experience
  • 1 experienced front end developer with 0 Drupal experience
  • 2 self-taught web developers with 0 Drupal experience
    1. Former career: Library and Information Science
    2. Former career: Teacher (PHD in history!)
  • 2 self-taught with light site building experience in earlier versions of Drupal
  • 1 Drupal Grand Master / Architect (Ashraf)

To illuminate this a bit more: Ashraf was not allowed to contribute any code on the project during the semester, which ended on December 22nd, 2018 (1 week before this site’s launch). That is to ensure that the new developers gain proper experience building the project. So the majority of this project truly was built by non-Drupal developers. We’ll share more about those developers in an upcoming article, with their permission.

And if you’re thinking “the experienced backend developers did most of the work”, that simply is not the case. The majority of the work on the project was contributed by the rest of the group.

Furthermore, as is the naturally occurring case with most Debug Academy semesters, the development team was highly diverse. Over 70% of the team members come from backgrounds that tend to be minorities in our field, and we were lucky to benefit from their ideas and expertise. 

What’s now and what’s next?

Video Coverage

Kevin Thull provided us with a list of DrupalCamp videos, of which we’ve imported 100%. Thanks to Wendy Abed, Kevin, and Ashraf for importing the DrupalCamp and DrupalCon videos. We’re at over 3,500 videos!

In the near future, we will also add free Drupal training videos created by various providers. All videos on this website will always be free.

Conferences

You may have noticed some videos are tagged with conferences. In fact, all videos are tagged with conferences, but you can only see the published ones.

We ask DrupalCamp organizers to reach out so that they can populate their own conference pages. Debug Academy’s next cohort will built out the conference (meetups, Drupal Camps, Drupal Cons) functionality on the website to make conferences (past & future) easy to find.

Searching / Sorting / Filtering

The site’s search is powered by the Search API module(s). The plain text search actually works quite well - search for a conference name, a topic, etc, and you will find all videos from that conference/topic.

As part of next semester’s project, we will be tagging talks with topics and speakers, which will enable us to use faceted search on the website.

Wider accessibility

We want this site to be globally useful. We plan to import video captions as well as and enable the multilingual features available in Drupal core. And if you are recording Drupal conferences in your country, reach out to us with your youtube playlist!

Submitting videos

Video submissions are open to the public! Approved content administrators will have the ability to import entire playlists from youtube, but anyone can import an individual video! Anonymously submitted videos will be created as “Drafts”, and our team of alumni and approved moderators will approve appropriate videos (thanks, Drupal core content moderation!)

Ongoing maintenance

Debug Academy students and alumni will continue to build and maintain the website as a non-profit project for the Drupal community. We will periodically share articles about what new Drupal developers were able to build using the website.

After next semester’s project, we may reach a point where smaller Drupal Camp events do not need to create/maintain their own website. Instead, they could simply create a conference page on Drupal.tv and use their time on higher value initiatives, like running a great conference, as usual! :)

How can you help?

At the moment, we have plenty of development capacity for the project, and we would like this project to continue to enable graduates of Debug Academy to land their first full time jobs as Drupal developers. You can help by spreading the word!

Follow us on twitter @drupaldottv, sign up for our newsletter (in the footer) to hear about new videos and articles, and simply share this website to the wider Drupal community

Also, follow a few of the team members who helped create or populate the site: @kevinjthull, @ashabed, @jackg102@cotterpinx, and @DebugAcademy for sponsoring the project.

We'll be reaching out to our alumni to do a separate piece on them with their inputs and permission. We launched on New years, but it turns out that's an inconvenient time for many contributors. Who would've known?!

And I’d like to give a special shout out to the founder of Drupal, Dries Buytaert, for allowing us to use the domain drupal.tv for this project!

Happy new year, everyone!

Categories: Drupal

TEN7 Blog's Drupal Posts: Episode 050: Dries Buytaert

Thu, 01/03/2019 - 00:20
In this our 50th episode, Ivan is joined by Dries Buytaert, the founder of Drupal, an open source software developer, a startup founder, technology executive, father, world traveler and photographer. Here's what we're discussing in this podcast: Dries' life and career; The creation and emergence of Drupal; Growing up in Antwerp; Living in Boston; Shared love for tennis; Yet another flying start with the Commodore 64; The power of copy/paste; Writing code for his father's medical practice; Wonka Vm, Linux and Java; Juggling multiple careers particularly fatherhood; DrupalCons; The MTV saga; TEN7's decision to go Drupal; The move from Belgium to Boston; Circumventing the globe; Benevolent Dictators for Life; Creating thousands of roles out of one; Drupal's Values and Principles; Drupal as a force for good in the world; Drupal's future and Dries' role moving ahead
Categories: Drupal

iRolo.net: Using Lando with Multiple Databases

Wed, 01/02/2019 - 22:16

A lot of my work over the last few years has been working on migrations between various versions of Drupal. That usually means that I need to configure a local Drupal development environment with more than one database. And although this is relatively easy to do with Lando, I often have to look up how I did it before. So, I figured I should write it down and share with everyone else at the same time.

.lando.yml

Adding a database to an existing Lando environment is as easy as adding a few lines to the .lando.yml file and restarting.

services:
  legacy:
    type: mysql

This will create a new container called legacy with a MySQL database in it. Out of the box, Lando supports many common types of DB servers, including: MySQL, MariaDB, MongoDB, MSSQL, and PostgreSQL.

Often, your .lando.yml file might already have configuration in it. If the services line already exists, just put the new configuration underneath with the correct indentation. You can see examples of more complex configuration files at any of the links in the previous paragraph.

settings.php

Now, you will need to tell Drupal about the new DB. To do this, go to the command line and type lando info. In the output, you should see something like this:

{
  ...
  "legacy": {
    "type": "mysql",
    "version": "5.7",
    "hostnames": [
      "legacy",
      "legacy.clientname.internal"
    ],
    "creds": {
      "user": "mysql",
      "password": "password",
      "database": "database"
    },
    "internal_connection": {
      "host": "legacy",
      "port": 3306
    },
    "external_connection": {
      "host": "localhost",
      "port": "not forwarded"
    },
    "urls": []
  }
}

With that information, you can add the new DB configuration to Drupal's settings.php file.

$databases['old_db']['default'] = array (
  'database' => 'database',
  'username' => 'mysql',
  'password' => 'password',
  'prefix' => '',
  'host' => 'legacy',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
);

Note that, by default the host name is going to correspond to the name of the service/container and will not necessarily be the same as the name of the database (or the name of the Drupal DB alias, for that matter). In other words, you should find the host and port values in Lando's internal_connection array. If, for some reason, you need to have a custom database name, credentials, port numbers or something else, you can refer to the links above.

Tags:
Categories: Drupal

Agaric Collective: Drupal 8 Content Migration Training at DrupalCon Seattle

Wed, 01/02/2019 - 21:41
Drupal 8 Content Migration Training at DrupalCon Seattle 2019 January 02, Wednesday, at 11:41am Clayton Dewey Agaric is facilitating a full day training at DrupalCon Seattle to help you understand how to import content into your to Drupal 8 website. Read more
Categories: Drupal

Mediacurrent: Contrib Committee Review for November 2018

Wed, 01/02/2019 - 18:11

With the year winding down the month was a little quiet, but we still got some good contributions going.

Client sponsored

Thanks to our awesome clients for giving us a chance to help make open source software better for everyone.

Self-directed

Mediacurrent provides some extra time during the week for folks to scratch their own itches, and sometimes people triage issue queues instead of watching football on TV :-)

Blog posts

A little light this month, but there are still two good blog posts from our team.

Contrib Half Hour

We squeezed in four Contrib Half Hour meetings into the month, despite the company being closed for Turkey Day.

Events

Lots of folks were working on their presentation proposals for DrupalCon Seattle 2019. see Tara’s blog post for details. There are also several events coming up soon that we’ll be attending, including DrupalCamp NJ and Florida DrupalCamp in February and then NERDSummit in March.

Stay warm!

That’s it for this month. Hope everyone in the Northern Hemisphere stays warm, everyone in the Southern Hemisphere enjoys their summer, and the folks in the middle don’t brag too much!

Categories: Drupal

ComputerMinds.co.uk: Drupal 7, 8 and 9 - When to Migrate

Wed, 01/02/2019 - 17:48

Anyone familiar with the Drupal core development lifecycle will know that presently the Drupal community supports two major versions at any one time: the current major release and its immediate predecessor. This means that at ComputerMinds we are currently helping our clients support and develop both Drupal 7 and Drupal 8 sites. So the obvious question that we get asked is ‘when is it time to upgrade’?

We can’t properly answer this question without bringing the next major release, Drupal 9, into the mix. So let’s look at the development timeline for these three versions. According to a blog post by Dries both Drupal 7 and 8 will have an end of life of no later than November 2021 with Drupal 9 being released roughly a year earlier in June 2020 to give site owners enough time to move over to Drupal 9. It is worth noting that from November 2021 only Drupal 9 will be supported. Dries outlines these dates with a whole bunch of details in this blog post.

Historically, migrating between major versions has been a considerable chunk of work as major versions aren’t backwards compatible; however, the good news is that migrating from Drupal 8 to Drupal 9 should be a very straightforward process - so long as you’ve kept your Drupal 8 site up-to-date! This is good news for anyone that’s already taken the plunge into the world of Drupal 8 as the migration process shouldn’t really be any more involved than a minor upgrade. This is because the only real changes will be to remove deprecated code and update dependencies, such as Symfony (Symfony 3 has an end of life of November 2021, hence this date being cut off for support for Drupal 8).

For site owners still using Drupal 7 the question of when to upgrade is slightly more complicated. Do you wait for Drupal 9 and skip Drupal 8, or should you upgrade now? As previously mentioned we can be reasonably confident that upgrading from Drupal 8 to Drupal 9 will be a straightforward process, so we don’t need to worry about having to redo lots of work a couple of years down the line if we do migrate to Drupal 8 now. So the question of when to migrate really varies depending on your current circumstance and preference.

Some site owners will want to benefit from new functionality added in Drupal 8 so will want to upgrade their Drupal 7 sites as soon as possible, whilst obviously factoring in how difficult and expensive the migration will be. Others will be perfectly happy sticking with Drupal 7 until support has ended, at which point they will have to port over in order to keep their site secure. Another piece of good news for anyone weighing up their options with Drupal 7 is that support for Drupal 7 will also be extended to November 2021 (previously support would have ended for Drupal 7 as soon as Drupal 9 was released) so this gives you another year to implement your migration to Drupal 9.

So the short answer of when to migrate your Drupal 7 site is really whenever is good for you. There’s no immediate rush and if you do opt to migrate to Drupal 8, as long as you keep your site up-to-date, upgrading to Drupal 9 when the time comes should be a cinch!

Categories: Drupal

Matt Glaman: Two Zero One Nine

Wed, 01/02/2019 - 17:06
Two Zero One Nine Published on Wednesday 2, January 2019 2018 was a weird year. It felt like it just zoomed by and nothing eventful happened. In fact, I feel like most people I have talked to this year felt the same exact way. But, then I sat down to my end of year write up and realized that this year was way more packed than I thought.
Categories: Drupal

ComputerMinds.co.uk: Peer Review

Wed, 01/02/2019 - 14:27

At ComputerMinds we like to think that we’re all pretty good at what we do; however, nobody is perfect and this is why we always ensure that our code is properly peer reviewed as part of our quality assurance process.

Peer review is literally just what the name implies; we work together to review each other’s code to make sure that it all makes sense. This approach means that we’re able to spot obvious mistakes before they become a problem. It also has the huge advantage of allowing us to transfer knowledge between our team on a day-to-day basis.

Pull Requests

The primary way we peer our code is to make use of GitHub’s pull requests (PR) feature. This means that whenever we need to do some work on a Git repo we start by creating a new feature branch which will contain the chunk of work that we’re doing. Then once we are happy with the code we’ve written in this branch we’ll go over to GitHub and create a PR to merge our branch in with another branch which we know is stable, for example the master branch. Before this merge happens GitHub’s PR tool will show all the changes between the the two branches so that they can be reviewed by another developer.

At ComputerMinds we use pull requests a lot. We don’t like to work directly on a stable branch as this way there is much more chance the bugs might slip through the net. By using pull requests we can be sure that our code is properly sanity checked before it makes its way over to a stable environment, be that a client facing testing branch or the live branch. GitHub also makes it easy to add comments directly to the pull request so any issues are full documented and feedback is clearly displayed.

Face to face

When dealing with a more in-depth code change, it's particularly helpful to talk face-to-face, as it allows the original developer to talk you through their changes and the thinking behind them. This allows the reviewer to have a much better understanding of what the original developer was aiming to achieve and to sanity-check their thinking. A 'meatspace' chat can be more difficult to achieve than just getting some comments on a pull request, but it's often worth the effort.

Finding the right fit

Both of these methods have their strengths and weaknesses. Pull requests are quick and easy to use; however, when dealing with larger sets of changes things may get overlooked, or may not be properly understood without knowledge of the bigger picture. Face to face reviews obviously take up more resources to conduct the review but do allow for a more in-depth review where the bigger picture can be clearly explained by the original developer.

Obviously it goes without saying that these two approaches to peer review aren’t mutually exclusive - there are plenty of meatspace chats going on around the office about various PRs.

At ComputerMinds we're still working on how we do code review. There's always room for growth and for change, and we're actively promoting discussion amongst our team to see how we can do better.

How do you do quality assurance and review on your code? Share your thoughts and tips with us below!

Categories: Drupal

The Accidental Coder: 8: Adding an admin page with a config settings form to a custom module

Tue, 01/01/2019 - 06:19
8: Adding an admin page with a config settings form to a custom module ayen Mon, 12/31/2018 - 21:19
Categories: Drupal

Wim Leers: A dozen years of Drupal

Tue, 01/01/2019 - 02:13

Last week was my twelfth Drupalversary!

The first half dozen years as a volunteer contributor/student, the second half as a full-time contributor/Acquia employee. Which makes this a special Drupalversary and worth looking back on :)

2006–2012

The d.o highlights of the first six years were my Hierarchical Select and CDN modules. I started those in my first year or so of using Drupal (which coincides with my first year at university). They led to a summer job for Mollom, working with/for Dries remotely — vastly better than counting sandwiches or waiting tables!

It also resulted in me freelancing during the school holidays: the Hierarchical Select module gained many features thanks to agencies not just requesting but also sponsoring them. I couldn’t believe that companies thousands of kilometers away would trust a 21-year old to write code for them!

Then I did my bachelor thesis and master thesis on Drupal + WPO (Web Performance Optimization) + data mining. To my own amazement, my bachelor thesis (while now irrelevant) led to freelancing for the White House and an internship with Facebook.

Biggest lesson learned: opportunities are hiding in unexpected places! (But opportunities are more within reach to those who are privileged. I had the privilege to do university studies, to spend my free time contributing to an open source project, and to propose thesis subjects.)

2012–2018

The second half was made possible by all of the above and sheer luck.

When I was first looking for a job in early 2012, Acquia had a remote hiring freeze. It got lifted a few months later. Because I’d worked remotely with Dries before (at Mollom), I was given the opportunity to work fully remotely from day one. (This would turn out to be very valuable: since then I’ve moved three times!) Angie and Moshe thought I was a capable candidate, I think largely based on the Hierarchical Select module.
Imagine that the remote hiring freeze had not gotten lifted or I’d written a different module? I was lucky in past choices and timing.
So I joined Acquia and started working on Drupal core full-time! I was originally hired to work on the authoring experience, specifically in-place editing.
The team of four I joined in 2012 has quadrupled since then and has always been an amazing group of people — a reflection of the people in the Drupal community at large!

Getting Drupal 8 shipped was hard on everyone in the community, but definitely also on our team. We all did whatever was most important; I probably contributed to more than a dozen subsystems along the way. The Drupal 8 achievement I’m most proud of is probably the intersection of cacheability and the render pipeline: Dynamic Page Cache & BigPipe, both of which have accelerated many billions responses by now. After Drupal 8 shipped, my primary focus has been the API-First Initiative. It’s satisfying to see Drupal 8 do well.

Biggest lessons learned:

  1. code criticism is not personal criticism — not feeling the need to defend every piece of code you’ve written is not only liberating, it also makes you immensely more productive!
  2. always think about future maintainability — having to provide support and backwards compatibility made me truly understand the consequences of mistakes I’ve made.

To many more years with the Drupal community!

Categories: Drupal

Jeff Geerling's Blog: Make composer operations with Drupal way faster and easier on RAM

Mon, 12/31/2018 - 19:42

tl;dr: Run composer require zaporylie/composer-drupal-optimizations:^1.0 in your Drupal codebase to halve Composer's RAM usage and make operations like require and update 3-4x faster.

A few weeks ago, I noticed Drupal VM's PHP 5.6 automated test suite started failing on the step that runs composer require drupal/drush. (PSA: PHP 5.6 is officially dead. Don't use it anymore. If you're still using it, upgrade to a supported version ASAP!). This was the error message I was getting from Travis CI:

PHP Fatal error:  Allowed memory size of 2147483648 bytes exhausted (tried to allocate 32 bytes) in phar:///usr/bin/composer/src/Composer/DependencyResolver/RuleWatchNode.php on line 40

I ran the test suite locally, and didn't have the same issue (locally I have PHP's CLI memory limit set to -1 so it never runs out of RAM unless I do insane-crazy things.

Categories: Drupal

AddWeb Solution: 2018 - A ‘Year’ full of Smiles, Stronger Bonds & Success!

Mon, 12/31/2018 - 16:03

Past is a place, thoroughly familiar and yet the experience of revisiting it varies drastically. Revisiting some leaves you with happy nostalgia, some with innocent laughter, some with a moment of pride, and some, a prick of sadness or regret. But yet we choose to visit this place called ‘past’ through our memory, time and again. In fact, we recently did so by revisiting the year 2018, like many others, that is about to end in just a handful of hours. And fortunately, it was filled with a host of happy moments to rejoice and relish, topped by several breakthrough changes and chances we’ve embraced with all love & warmth.


The year 2018 has been the most eventful year for the AddWeb-traveling, counting right from the moment of moving into altogether new office space to officially being a supporting partner of Drupal.org and everything in between. It’s a journey no less than a cinematic experience, with all the drama, emotions and heroic ending - full of catharsis. Let us take you through this marvelous journey, as experienced by AddWeb-ians.

 

Welcoming 2018 - The Journey Begins, Quite Literally!

, ,

The hobby of traveling might be a trending one today. But we refrain from polluting our passion for traveling, by putting it under the category of ‘trending’. We’re so much about traveling that it has become just a part of our existence, now. Apart from all the traveling we individually do, throughout the year, we also make sure to plan at least one with our AddWeb family. And this time, we literally began our journey of 2018 by going on a trip to Jaisalmer - amidst sand dunes and folk tunes, starry nights and tipsy sites; quite literally!  

 

AddWeb Family Celebrate Emotions!

, ,

We promised you a journey with emotions at the backdrop. So, here we share a set of different emotions we shared and celebrated across the year.

  • Celebrating the born-day of our dear AddWebians with cakes, candles, and compassion

  • Celebrating the unity in diversity of the Republic of India with the strength of tri-color dress code and decorations

  • Celebrating the diverseness of our being with colors during the festival of Holi

  • Celebrating the feminine force on Women’s day by showing them the feeling of gratitude with ‘sweet’ presents

  • Celebrating the feeling of freedom on Independence day by painting our mood with patriotism

  • Celebrating the oneness of AddWeb family with an electrifying and energetic party - The AddWeb Annual Event at Olives Restaurant

  • Celebrating the almighty of auspiciousness - the cherubic Ganesha with an immense amount of faith and festive decorations on the occasion of Ganesh Chaturthi

  • Celebrating the festive mood of Diwali with DIY decorations, dazzling traditional dresses, delicious Diwali lunch, and gifts!

  • Celebrating the Christian festival of Christmas with a dress code, gifts, and our own two self-proclaimed Santas!

Level up, Metaphorically & Literally!

, ,

Well, it wouldn’t be an exaggeration if we said we literally levelled-up this year. Because this very year we moved into a new & bigger office space that is a few floors up from the old one. And we guess, this clearly states that we grew bigger in terms of our employee strength too, or as we like to address it - our AddWeb family grew even bigger! Yes, we started off from 50+ in January 2018 and today, by the end of December 2018, we’re almost a family of 100.

 

Apart from the above two, there are a few other spheres too, where we levelled-up. Like we launched a brand new website of ours, a couple of months before shifting into a brand new office space. Also, since we’re already following the international method of working, we also adopted the international standards of work hours by bringing the ‘5-days working’ policy into account. We also initiated sponsoring quarterly team lunches for our AddWeb family, who after travel bonds the most over food!  

 

Giving Back to the Society

, ,

The universe thrives and survives on the rule of ‘give & take’ and we firmly understand the importance of the same. Hence, we do believe in giving back to the society that has given us so much to relish upon. Maybe, that is why apart from doing things for the lesser privileged on a personal ground, we also choose to do a small act of charity on an official ground. We deliberately choose to publically share it, in order to inspire others to do the same.


This year too, we gave back to society by visiting a nearby government school. We spent some really good times with the happy and giving souls there and donated some stationary products, cookies, crayons, textbooks, et all for those kids. Believe us, it was one of the most wonderful time we had throughout the entire year. Something, that’s going to stay with us for a long, long time!

 

The AddWeb-Drupal Association, Elevated!

, ,

Our association with Drupal is as old as our existence. In fact, we as individual team members have been Drupal-ing even before the inception of AddWeb. And this year, we took a step ahead by giving the monetary contribution to the ‘Promote Drupal Initiative’ by Drupal.org. How could we not contribute, when it was about strengthening the community to a higher level.


And our support & passion for Drupal doesn’t end there. We also became the official ‘Supporting Partner’ of Drupal, which ultimately helped us in extending and strengthening our association with Drupal. We also made another contribution towards Drupal by organizing a ‘Drupal Meetup’ in our city and had multiple interesting knowledge-sharing sessions with the local community members.

And of course, how could we not attend the international Drupal events, worldwide! This year we attended the Standford Drupal Camp, DrupalCon Nashville, and Drupal Europe event that was voluntarily organised by the Drupal community members. We also attended our first ever Laravel event in Europe by the name of LaraCon EU.

 

AEDU Hits the Market, Successfully!

, ,

The joy of launching your very own dream-project is no less than winning an Oscar. Indeed! The year 2018 gave us one such moment when we launched our very own school management software - AEDU in the market. And to our surprise, it got adopted by more than 200+ schools across the nation with all love and warmth. Not just that, we also launched the Parent and Driver’s App, for the same and they also got an equal and elaborative response as the software did!

 

Community, Coding, Contributions & Client-Satisfaction

, ,

Last but not least! Our core passion for coding paved a path full of new endeavors and wealthy projects. Let us share these moments of pride and high spirits, from this year, with you before we all enter into a new year with goals to achieve and moments to live!

  • On one hand, when we introduced our very own Research Wing for Artificial Intelligence(AI); on the other hand, we also spent 1000+ hours on contributing towards the open-source community

  • We adapted the Intranet & Instant Communication Tool by the name of ‘Rocket.chat’, along with developing & launching our very own ‘AddWeb Ionic Chat

  • Witnessing the boom of ReactJS and ASP.Net, we also adopted them, for we love learning and excelling at new technologies

  • We automated the DevOps process that we follow with the use of Jenkins and Ansible, resulting in being more productive and futuristic!

  • And the most momentous achievement of the year - We successfully completed 100+ projects, worldwide along with one of the biggest project of the year, named ‘AnyQuip

 

With a wish that we haven’t bored with our smiles, stronger bonds and success, we again wish each one of you reading this a #HappyNewYear and blissful moments, manifold!

 

Categories: Drupal

Dries Buytaert: Soft-launching your new Drupal theme

Sun, 12/30/2018 - 20:22

Have you ever wanted to preview your new Drupal theme in a production environment without making it the default yet?

I did when I was working on my redesign of dri.es earlier in the year. I wanted the ability to add ?preview to the end of any URL on dri.es and have that URL render in my upcoming theme.

It allowed me to easily share my new design with a few friends and ask for their feedback. I would send them a quick message like this: Hi Matt, check out an early preview of my site's new design: https://dri.es?preview. Please let me know what you think!.

Because I use Drupal for my site, I created a custom Drupal 8 module to add this functionality. The module is probably too simple to share on Drupal.org so I figured I'd start with sharing it on my blog instead.

Like all Drupal modules, my module has a *.info.yml file. The purpose of the *.info.yml file is to let Drupal know about the existence of my module and to share some basic information about the module. My theme preview module is called Previewer so it has a *.info.yml file called previewer.info.yml:

name: Previewer description: Allows previewing of a theme by adding '?preview' to URLs. package: Custom type: module core: 8.x

The module has only one PHP class, Previewer, that implements Drupal's ThemeNegotiatorInterface interface:

<?php namespace Drupal\previewer\Theme; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Theme\ThemeNegotiatorInterface; class Previewer implements ThemeNegotiatorInterface { /** * The function applies() determines if it wants to set the * active theme. If the ?preview query string is part of the * URL, return TRUE to denote that Previewer wants to set * the theme. determineActiveTheme() will be called to * ask for the theme's name. */ public function applies(RouteMatchInterface $route_match) { if (isset($_GET['preview'])) { return TRUE; } return FALSE; } /** * The function determineActiveTheme() is responsible * for returning the name of the theme that is to be used. */ public function determineActiveTheme(RouteMatchInterface $route_match) { return 'dries'; // Yes, the name of my theme is 'dries'. } } ?>

The function applies() checks if '?preview' is set as part of the current URL. If so, applies() returns TRUE to tell Drupal that it would like to specify what theme to use. If Previewer is allowed to specify the theme, its determineActiveTheme() function will be called. determineActiveTheme() returns the name of the theme. Drupal uses the specified theme to render the current page request.

Next, we have to tell Drupal about our theme negotiator class Previewer. This is done by registering it a service in previewer.services.yml:

services: theme.negotiator.previewer: class: Drupal\previewer\Theme\Previewer tags: - { name: theme_negotiator, priority: 10 }

previewer.services.yml tells Drupal to call our class Drupal\previewer\Theme\Previewer when it has to decide what theme to load.

A service is a common concept in Drupal (inherited from Symfony). Many of Drupal's features are separated into a service. Each service does just one job. Structuring your application around a set of independent and reusable service classes is an object-oriented programming best-practice. To some it might feel complex, but it actually promotes reusable and decoupled code.

Note that Drupal 8 adheres to PSR-4 namespaces and autoloading. This means that files must be named in specific ways and placed in specific directories in order to be recognized and loaded. Here is what my directory structure looks like:

$ tree previewer previewer ├── previewer.info.yml ├── previewer.services.yml └── src └── Theme └── Previewer.php

And that's it!

Categories: Drupal

Pages