With Drupal 7's third and final release candidate unleashed on us all this morning, it is long past time to help the #D7CX movement with a seasonal offering of our own.
As starving authors we at Agaric don't have a lot of cash to burn right now, but we've thrown $25 in the project to make it possible to subscribe to drupal.org issues without commenting. (On top of whatever we donated when this request for funding went out a year and a half ago).
Agaric proposes the creation of a new kind of workplace, essentially a Drupal commune, but really more like an open source free software idea & brainstorming commune, kind of along the same lines as an artist's or writer's colony.
Yes it's true, for the past few months we've been hard at work with a lot of other co-authors on The Definitive Guide to Drupal 7.
Thinking it would be a great place to work a day or two while in New York City for clients or DrupalCamps, Agaric dropped a few dollars in the Kickstarter fund for New Work City: Community Coworking Center for Independents in NY.
For community shared business, development, and training tools, Agaric throws a little sponsorship at modulecraft.
Benjamin Melançon of Agaric helped with a patch for the Drupal 7 version of Insert module.
What the word agaric means and why Agaric took it for our cooperative's name.
Functionality designed to your life is the Agaric Design signature. Utilizing open source, free software from around the world, Agaric Design websites are impeccably crafted with a modern, sophisticated and understated spirit.
I've always had a passion for good design and healthy coding, even back in the days of owning a web site cart in downtown Natick. Back then, my business partner and I made all natural HTML roll-up web sites and, as an incentive for customers to wait in line, we baked Drupal into different flavored designs.
As Drupal awareness grows and more people adopt it as a platform, the community becomes more interesting. There are some real characters that have grown to be major contributors to every facet of the beast. How did they evolve and find their place?
You cannot just apply the stereotypical nerd face to the Drupal community; it will not stick. This is the most welcoming community I have been a part of in my 17 years as a contributor in the Web Development arena, and in 8 years with Drupal, I have seen many new members welcomed enthusiastically.
For newcomers to the community, and to plenty of us who have been here for years, sometimes the question can be: where is my place in the Drupal community? The answer is: You can have many places or roles in the Drupal community. You are not limited to wearing one hat. Believe it or not, there is even a place for someone that has never seen Drupal. What better UI test candidate is there? From Guinea Pig to Drupal Glory, the path can start right there at zero.
Here is a recent month in my life with Drupal: January, 2014.
I managed to go to several meetups, be part of a Drupal Nights panel at BioRAFT in Cambridge, MA and I have three new Drupal client Websites in progress. I am a Project Manager on two sites and an Architect on the other. I introduced four new people to the Drupal community, two PHP developers, one artist, and one musician. All four of my friends have come to a meetup and they have each installed their first Drupal site! I think it is important to introduce new people to the Drupal community and to try and see it through by hooking them up with specific projects that may interest them, or by introducing them to people already part of the Drupal community that may have similar projects or goals.
A few weeks ago I finally convinced a colleague and friend that lives in Western Massachusetts to attend a Drupal meetup. We met years ago when we worked together at an over-funded company that developed an over-priced proprietary software app similar to Google Hangouts (we broadcast concerts and live events to anyone that downloaded the proprietary player). The company blew up in the dot com bubble burst at the turn of the century (just wanted to be able to say that phrase—'turn of the century'—it sounds kind of epic).
My friend had been trying to get his online store to be automated and he had been through the mill trying different solutions, some proprietary, Wordpress, even doing some strange super complex import process using Microsoft Access. I drove from Boston 100 miles West to pick up my friend and find the meetup in a small town called Hadley, MA. On the meetup page it counted only three people that had RSVP'd to attend. I hoped they were the right three people for my friend to meet. I also brought another friend with me from Boston, a local artist that needs a portfolio site and a way to sustain himself financially while helping other artists/musicians. He had just installed his first Drupal 7 site and had no prior experience with creating a website.
We arrived at the meetup just in time for some delicious pizza (yes, Drupal does feed your body as well as your mind sometimes) and lo and behold, there were about 20 people that showed up. The highlight of my night was when my friend asked if anyone thought he could create his site using the Commerce Kickstart distribution. He had already installed it and had started watching tutorials on how to set it up; the resounding answer was—of course—yes… but the better part is that a couple of people took great interest in his project (they were probably musicians) and right then and there, they walked him through a few solutions to some of the biggest challenges of his project, suggesting configurations and additional modules he could use.
The best part: Now my friend will be able to share his knowledge and help other people set up Drupal with Commerce Kickstart. In the near future I am sure he will also be helpful working on projects that require advanced configurations for Commerce Kickstart because I have known him to be creative, caring, and brilliant at learning new things— and now he has been bitten by the Drupal bug!
So, for that night, my place was to introduce new people to the community. The next day I helped someone install Drupal, so my hat changed. Another day my partners Ben Melançon and Stefan Freudenburg helped me set up my development environment on my new Linux box (which I promptly destroyed beyond repair). That day I was in the "help me I am falling" cheap seats place, but it did not feel irreversible. I was soon back in my site-builder role (making a site for my local Linux users group). A place we can all occupy sometimes, a role we can all play, is introducing new Drupal community members into the fold.
I would love to hear your stories of non-scary (or scary) introductions to Drupal, and hats you tried on to see if they would fit!
Get the most out of (and into) your page cache: Leave AJAX disabled in your Views, especially with exposed filters
Enabling AJAX for a Views page can have a performance-harming side effect one might not think of. On a recently built site we observed a relatively low Varnish cache hit rate of 30% using the Munin plugin for Varnish. This hit rate was much lower than expected after prelaunch tests with Jmeter. (The site has almost exclusively anonymous visitors and if caching the pages worked efficiently the same low cost server could handle a lot more traffic.)
An analysis of the most visited paths on the live site showed one ranking two orders of magnitude above all else: views/ajax.

The Views pages on Studio Daniel Libeskind have exposed filters, and with AJAX enabled new data is fetched via POST request to views/ajax when a visitor applies a filter. This happens because the Drupal AJAX Framework leveraged by views exclusively uses POST requests. See issue Ensure it is possible to use AJAX with GET requests for a good explanation of why it is currently this way and the effort to allow GET requests in later versions of Drupal.
As a consequence of all AJAX views using the same path and all filter information being hidden in the request body, Varnish has no straightforward means of caching the content coming from views/ajax. Another downside: It's not easy to share a link to a filtered version of such a page.
If AJAX is not enabled (which is the default) filters are implemented as query parameters in the URL so there's a unique URL for each filtered page. That plays well with reverse proxy caches like Varnish and works well for people wanting to share links, so we disabled AJAX again and the Varnish page cache hit rate has risen to over 90% since.
We do recommend moving directly to Drupal 9 (which was released on June 3rd of 2020), however:
Moving to Drupal 8 or to Drupal 9 is much the same. Drupal 8 starts what i call the "modern Drupal" era. Whereas for going from Drupal 5 to 6 or 6 to 7 or 7 to 8 broke backward compatibility and might as well be a full rebuild (so we would often recommend hopping a version, say, stay on Drupal 6 and wait for Drupal 8 to be ready) going from Drupal 8 to 9 is closer to going from Drupal 8.8 to 8.9— an in-place upgrade from 8.9 to 9.0. Going from 9 to 10 will work the same, and that's the plan and promise for Drupal 8 on out.
All that said, if anything significant needs fixing on your current Drupal 7 site, or you are looking to make any improvements, you'll want to do that on Drupal 8+ or Drupal 8/9 as we phrased it back when Drupal 9 was still a pretty recent release, but now we can just say Drupal 9— or, as i call it to emphasize the decreased importance of major version numbers, modern Drupal.
Agaric is always happy to discuss more! Mostly what i'm saying here is the useful things to talk about are the specific goals for the sites—when you want to accomplish what—because the official support cycles are a distraction in the current context of Drupal. So make sure your current site is maintained, but take your time to get clear on your objectives, and contact Agaric or the Drupal professionals of your choice when you think it might make sense to upgrade your site into the era of modern Drupal.
Sometimes we need a Drupal installation for a quick test of a module, theme, or feature that we are working on. You can have a LAMP stack installed locally or, as we do at Agaric, use virtual machines. In both cases, it can take a considerable amount of time to make the required configuration to install Drupal. It is possible to avoid all that by leveraging Drupal’s support for SQLite and using PHP’s built in web server. Let me show you how to easily create a disposable installation with a few drush commands.
During BADCamp 2015 sprints, some developers and myself joined Jesús Manuel Olivas to work on Drupal Console. It is an amazing project that allows you to speed up your Drupal 8 development by generating scaffolding code. Some Console commands require a Drupal installation to work. I wanted to contribute to the project so I used drush to download and install Drupal in seconds. For instructions on installing drush, check this great article by Karen Stevenson.
1. Download Drupal
drush pm-download --drupal-project-rename=drupal drupal-8.0.x
This will download the latest development version of Drupal 8.0 and place it in the directory specified by the --drupal-project-rename parameter. In our case, the directory name will be called drupal. If you omit this parameter, the files will be downloaded to a directory with the Drupal version number in it.
2. Change directory and install Drupal
cd drupal drush site-install standard --db-url=sqlite:///tmp/test.db
Once we have downloaded the code, we change directories to the Drupal root and issue the installation command. standard is the installation profile to be used. The --db-url parameter allows us to specify the database to connect to. Usually this would include the credentials for MySQL or your favorite database server. In our case, we are going to use SQLite which is a self-contained database engine. To use it, we only need to precede with sqlite:// a file path on our system where the database will be created. In this example, that path is /tmp/test.db
3. Start PHP’s built in server
drush runserver
Starting in version 5.4.0, PHP includes a lightweight web server. The previous command will start the server listening by default on 127.0.0.1:8888. Paste that in your browser’s address and enjoy a fully working Drupal installation in front of you. If you got a different IP address or port number use that instead. The server will keep listening and even output logs as you interact with the site. When you are done testing, press Ctrl + C to stop the web server.
4. Clean up
rm /tmp/test.db cd .. rm -rf drupal
Finally, do some clean up. Delete the database file. If you set up the database in /tmp you might not need to manually delete it. You should also remove the Drupal directory. Everything will be gone in a snap.
The complete recipe is:
# Download Drupal drush pm-download --drupal-project-rename=drupal drupal-8.0.x # Change directory and install Drupal cd drupal drush site-install standard --db-url=sqlite:///tmp/test.db # Start PHP’s built in server. Press Ctrl + C to stop the web server. drush runserver # Clean up. rm /tmp/test.db cd .. rm -rf drupal
A shortcut
drush core-quick-drupal --core=drupal-8.0.x --profile=standard drupal
The previous drush command will download Drupal, install it using SQLite, start PHP's built in server, and even open a browser windows with user 1 already logged in. The command exposes lots of parameter to configure the Drupal installation. In our example, we are downloading version 8.0.x, place it in a directory called drupal, and use the standard installation profile. All the other parameters would use the defaults. For a list of available parameters and arguments issue the following command in the terminal drush help core-quick-drupal.
My motivation for following this approach was that I needed to write and test code when sprinting on Drupal Console. If you do not need to modify code, Patrick Drotleff has built an amazing website that allows you to create temporary Drupal installations with support for modules, themes, distributions, patches, and more. To use it, visit https://simplytest.me
Drupal Console not only generates scaffolding code. It also lets you interact with your Drupal installation in similar ways to Drush. For example, it lets you download and install Drupal using a MySQL database. Notwithstanding, it is not possible at the moment to install Drupal using SQLite or start the PHP’s built in server. Jesús Manuel Olivas, one of the project maintainers, said that these options would be available in future versions of Drupal Console.
What do you think about this method for creating disposable Drupal installations? Do you follow a different approach? Let me know in the comments.
Find It Features and Functionality: Broadening Educational Opportunities for Youth