Tag: Drupal

It’s a wrap! Patreon pledges have been doubled and donated to the Drupal Association #DrupalCares (and FillPDF works with Drupal 9)

The total came out to $123.08 after Patreon fees. I doubled that to $246.16 and “topped it off” for a total of $623.08! That could become up to $1,869.24 matched.

Thanks, Patreon supporters!

  • Damien McKenna
  • Andreas Tasch
  • Michael Flipp
  • Jessica Cobb

I also ported FillPDF to Drupal 9 yesterday. I released 5.0.0-alpha1. There are many things to fix, and not all dependencies are ready yet, but it is a good start.

DONATION MADE. THANKS! Patreon pledge = 2x-6x donation to Drupal Association until April 29 #DrupalCares

Update: https://wizone.solutions/2020/04/29/its-a-wrap-patreon-pledges-have-been-doubled-and-donated-to-the-drupal-association-drupalcares-and-fillpdf-works-with-drupal-9/

As you might have seen me tweet, I’ve recently started Patreon and Ko-Fi pages. The goal of these is to let me spend more time working on open source (primarily, but not only, the FillPDF Drupal module and FillPDF LocalServer).

Not long after, Vanessa and Dries Buytaert, the founder of Drupal, announced his matching pledge, in which he would match up to $100,000 of individual memberships and donations.

Then Jeff Geerling pledged to donate $1 per like of his #DrupalCares video.

As if that wasn’t enough, a coalition of Drupal businesses also pledged to match the first $100,000 donated.

 

So, I’m joining the crowd:

If you become a member of my Patreon page (click here to go there), I will donate two times your April pledge to the Drupal Association. (For example, if you pledge $5, I will donate $10.)

 

If the #DrupalCares Match Challenge total is still under $100,000, Vanessa and Dries Buytaert and a coalition of Drupal businesses will each, in turn, match that, making it six times your pledge.

 

I will do this for the first $500 of supporters, for a total donation of $1,000 ($3,000 if fully matched).

 

I will also post and share a blog giving credit to all of the supporters.

 

There’s no obligation to remain a Patreon supporter, but if you use the FillPDF module or anything else I’ve contributed code to on Drupal.orgGitHub, or elsewhere, it will help me do more. I’m hoping some new supporters will remain supporters.

 

Notes:

  • I’ll be making the donation on April 29.
  • My business, FillPDF Service, uses the FillPDF module, but it is not the only way to use the module, so the open source community still benefits from me working on it. It also makes use of open source itself. For example, I published the Commerce Recurring Metered Billing module as part of an upgrade I’m working on.

Fixing duplicate field collection item references in Drupal due to Content Translation bug

I just left a comment in the Field Collection issue queue and thought it’d be good to spread it more widely; maybe people need this fix.

For anyone still getting burned by this bug (or for that matter getting burned by using Node Clone on nodes with field collections), first apply my previous patch (or bderubinat’s, but I haven’t tested that one). That will stop further damage.

To repair your previous entries and ensure that, for example, removing a field collection entry doesn’t remove it from other nodes from which you didn’t want it removed, you can implement this script I’ve detailed in a gist: https://gist.github.com/wizonesolutions/5567549

It will give new item_ids to field collection items that it detects as appearing more than once. All my testing has indicated this is safe, but if not, please leave a comment on the gist. I hope this helps someone.

Thanks to Project Ricochet for sponsoring my time on this.

DrupalCamp alert: DrupalCamp Gothenburg 2013!

If you haven’t been following any of the calendars listing DrupalCamps, you may have missed the arrangement that’s coming up in Gothenburg, Sweden in a couple weeks. This wouldn’t be surprising, since it’s being marketed in Swedish. People of all languages are welcome, however, so I thought I’d somewhat rehash the post I made in Norwegian.

The camp’s pitch is: “A one-day conference focused on the Drupal CMS. Come along and learn more about Drupal and the web, and have a great day in Gothenburg in late Spring.”

Sessions are here: http://summer2013.drupalcamp.se/program/sessions

As with most DrupalCamp sites, volunteer work lies behind the site you see. A lot of people contributed really great work. Fantastic designs and solid development resulted in the site you see today. I was also involved, mostly behind the scenes. I helped with server administration, Git coordination, transferring the site to another server, and mostly with coordinating the web team’s efforts. It was the first time I had spent as much time helping organize a DrupalCamp (and I’ve been to quite a few; I’ve even volunteered at a couple).

If you’re in Europe or in the area, I encourage you to check it out. You can follow them on Twitter at @DrupalGBG.

Google Translate is getting better and better 🙂

I’m a mentor at the free DrupalCamp Sacramento training on June 8!

I haven’t been blogging enough recently, but I will try to keep you posted with short updates at least. It’s been a busy first quarter of the year!

But I wanted to post to announce that I’m mentoring this training, which as I write is tomorrow. It’s full, so this is sure to be an interesting experience on my part. BuildAModule.com’s site is here (affiliate link).

DrupalCamp Sacramento: link (Fill PDF Service is a Bronze Sponsor).

Hope to see you there!

Drush Make: Avoid the Unexpected

There are two things that are no secret and which form the basis for this post:

  1. Using the development versions of Drupal modules is sometimes the best choice.
  2. Using development versions as the project[module_name][version] parameter in a Drush Make file is always a bad choice.

How can we reconcile these two seemingly irreconcilable truths? The answer is actually very straightforward, and it’s even documented in Drush Make’s README.txt file itself1!

I tweeted a link to this pastebin snippet the other day. Keep that open, and let’s take a closer look.

This example comes directly from a Drush Make file I actually use:

; Download the module with Git
projects[webform_userpoints][download][type] = "git"

; Find this revision by clicking View Commits on the project page
; in the lower right-hand column. Click on the most recent commit
; in the branch you were going to use. Copy and paste the full revision
; identifier.
projects[webform_userpoints][download][revision] = "25bfe11d2c6dc6480d0aabc79b1edb54dec06236"

; Tell Drush Make it's a module. This might not be necessary.
projects[webform_userpoints][type] = "module"

; You can erase or change the subdirectory. I like to separate
; my Git-downloaded modules.
projects[webform_userpoints][subdir] = "_custom"

The comments are there for explanatory purposes, of course. They explain the basics, so let’s look at the finer points. First of all, what was my thinking behind doing it this way? To answer that, take a quick look at the Webform Userpoints module and the available releases. I’ll wait.

OK, as you can see, this module only has a development release. However, I’ve also used this technique for modules where the development version had a feature (or even a bug fix) that I needed. The benefit of doing it this way instead of simply specifying the version as “1.x-dev” is that your site will never suddenly stop working after a Drush Make (or Aegir)-based deployment because of the latest development version having different code than you expect (i.e., new code). Git repository revisions are fixed points in time and code. You can rely on them not changing. This is a very good thing.

Finally, I thought I should include a screenshot of where to find the commit identifier. There are a couple places; let’s start with the one I used the first time:

Click the "View commits" link on a project to get here

That’s the View Commits page for Webform Userpoints. It’s accessible through the right sidebar. You usually want the latest one for the development version you need. Click on it, and then click here to skip ahead.

Sometimes, though, especially in actively-developed projects, you’ll find that there are so many commits that it’s impractical to find the revision that way.  In these cases, the Repository Viewer is the answer. To get there, click Repository Viewer on the Drupal.org project page of the module or theme with which you’re dealing, and then under the heads section, find the one that looks like the development version you wanted. This will typically be something like 6.x-1.x. Next to that, you’ll see a few links such as shortlog, log, and tree. Click log, and then click on the title of the latest commit.

With either approach, this type of page is your final destination:

Once you click a specific commit, you wind up on a page like this

The highlighted text is what you want. This will be different for you unless you’re doing this for the same revision of the same module.

Bonus developer method: Clone the repository with Git and check out the branch corresponding to the development version. Run git log and copy the full commit identifier. Stick it in the right place in the Drush Make file. You probably didn’t even need me to write all this if you’re using this method.

1 http://drupalcode.org/project/drush_make.git/blob/086793e8887008a7841a5ef6081f8cf2766347db:/README.txt#l268

Last-ditch Solution to Non-Working PHP-FPM + Apache Configuration

I had a surreal experience yesterday. I was following online tutorials about setting up Apache + PHP-FPM (for example, this ServerFault question: http://serverfault.com/questions/326919/how-to-set-the-httpd-conf-when-using-php-fpm-with-php5-3-8-and-apache2). I’ll let you read that rather than re-hash it.

My goal here is only to share quickly how I actually got this working.

Alright, so you know the part where it says to add the directives:

AddHandler php5-fcgi .php
Action php5-fcgi /fcgi-bin/php5.external

This didn’t work for me no matter what I did. No errors were produced, so I knew that it simply wasn’t executing the Action directive for whatever reason. In checking the Apache 2.2 documentation for Action, I noticed that a MIME type could be given in lieu of an action-type (the php5-fcgi thing). Having exhausted all other options, and knowing that the PHP file was being sent to the browser unprocessed with the MIME type application/x-httpd-php, I decided to add:

Action application/x-httpd-php /fcgi-bin/php5.external

to my configuration. And, much to my shock, it actually worked!

So, if you find yourself as frustrated with setting up Apache + PHP-FPM as I was, I hope this tip may ease your suffering.

Multi-conference report coming

I’ve been to several camps this summer and early fall, but I haven’t really written anything about them since I mentioned sponsoring DrupalCamp LA 2011. I’ve decided that I’ll probably never document them individually but that a combined blog post would be reasonable. I’ll write this soon, probably next week (once things calm down a bit).

There will be pictures.

Cloning Content Types in D7 – Errata

Update: You may also want to check out the Bundle Copy module. I haven’t tried it yet, so let me know in the comments if it works!

Recently, I read the Stanford Tech Commons article on Cloning a Content Type in D7 at https://techcommons.stanford.edu/topics/drupal-7x/cloning-content-type-d7. It proposes a simple but (mostly) effective way  to wind up with cloned content types in Drupal 7. Summarized: