Skip to main content

Working with Drupal 7

Drupal 7 is the last major release of the Drupal CMS and is will be supported by the Drupal community until Drupal 9 gets released. Drupal 7 is similar to previous versions of Drupal using a system of hooks to allow us to do much of the heavy lifting and to seamlessly tie in to the Drupal way of doing things. Take a look at some of our Drupal 7 articles below...

Read some of our articles about Drupal 7

Migrating Drupal 7 Files into Drupal 8 / 9 Media entities

27th Jul 2021

This article assumes a basic knowledge of the building of custom modules, the Drupal 8 / 9 Migration system, and the processes behind creating customised migrations from a previous version of Drupal.

One of the more common components of any migration from a previous version of Drupal is the need to migrate files. In Drupal 7 there was a core ‘File’ entity type and on pretty much all of our clients' sites we would also have the contributed module File Entity enabled. This extended the core file functionality and gave the ability to add fields to the file entity, have...

Read more

A recipe for editing & translating over 100 fields

14th Jul 2020

I recently released a new contributed module to aid translation on Drupal 7 sites: Entity Translation: Separated Shared Elements Form (ETSSEF). Yes, it has a convoluted name! It finally resolves a suggestion from years ago in an Entity Translation project issue, to allow editing untranslatable fields separately to translatable ones. One of our clients has a multilingual product database site with a few hundred fields on their content, so anything like this that could reduce the size of their editing forms is useful. I figure the best way to demonstrate this is with a recipe that blends it together...

Read more

A New Years Resolution for maintaining your Drupal site

19th Feb 2020
So 2020 is in full swing, we are already midway through February and any new year’s resolutions you may have set yourself may have slipped … but why not set yourself a new resolution of keeping on top of your Drupal site maintenance? Even as a developer working with Drupal every day, sometimes you can forget some of the basics in regards to site maintenance, so I’ve detailed some of the most important aspects you should be mindful of below.
Read more

Making product images consistent with image styles

We’ve recently given the dimplex.co.uk site a new face lift and stumbled across an interesting problem during development when it came to implementing the new product carousel on their product pages, more specifically, the handling of the images themselves.

The design brief stipulated that the transparent studio style product images required a light grey background behind them, giving the impression of a product floating nicely in the middle of a light grey surrounding.

We had 2 problems here:

1. A lot of the studio style product images didn’t have sufficient transparent space around themselves and we ended up with unsightly results; images would...

Read more

Upgrading your website to Drupal 8 or 9

Part of the series
Upgrading to Drupal 9

Update: Since writing this article the EOL of Drupal 7 has been extended from November 2021 until November 2022.

Your current website/platform is built on Drupal 7 and news has hit your ears about 7’s end of life (EOL). Maybe your website is a Drupal 8 website and you want to know what the future has in store for you. Good news is, you don’t have to do anything immediately, but it is definitely a question that you want to start thinking about very soon.

This article is mainly aimed at Drupal 7 builds looking to upgrade to 8 or...

Read more

Quickly update Drupal core

18th Oct 2018

Update: this article's suggested method has serious shortcomings, use other methods when you can! For example, run the following with drush to just upgrade drupal core code (leaving database updates to be run separately):

drush pm-updatecode drupal --check-updatedb=0

If you've got a Drupal site, which you need to update quickly (for example, to address last night's security advisory!), here's a tip. Run this from the command line:

curl 'https://github.com/drupal/drupal/compare/7.59..7.60.patch' | patch -p1

This assumes your codebase was on Drupal 7.59 and you're currently in Drupal's root directory. If you're currently on a different version, adjust the numbers in the...

Read more

Creating multilingual variables

A super quick blast from the past today; a Drupal 7 based article!

I had some work recently to create a new "setting" variable for one our Drupal 7 multilingual sites, which meant creating multilingual versions of those variables. I soon found out that there is very much a correct way - or order - to achieve this as I got this one very wrong (I had to re-instate my DB!). So here I am writing a very quick guide to help those from my wrong doings.

(This guide assumes you have a multilingual site setup with [i18n's Variable translation...

Read more

SA-CORE-2018-004

26th Apr 2018

As with every other Drupal agency on the planet, it was another fun evening of frantic patching of client sites last night due to the release of the highly critical SA-CORE-2018-004 security update for Drupal, released on 25/04/2018.

Being so closely related to SA-CORE-2018-002 and knowing proven exploits for that were already affecting thousands of un-patched Drupal sites, time was of the essence for this one as a new exploit was sure to be released in a matter of hours.

Our crack team of developers who stayed late especially had all of our clients' production and testing sites patched within a...

Read more

Place blocks inside your content with EBA

13th Jan 2014

Previously on this website I have written about rendering blocks programmatically and adding things to content to be managed alongside fields. It's time to combine the two! On many projects, we find ourselves needing to render a block consistently across all content of a certain type. For example:

  • Are you trying to place advertising blocks or fixed javascript code between the fields in the content of a page, not just shoved into regions around the content?
  • Do you want to show a standard piece of content (we use the bean module for enhanced content in blocks) to be placed...
Read more

Making the Flag Module's Confirmation form use AJAX

Chris Didcote
Chris Didcote
17th Apr 2012

This article discusses how we can use a combination of techniques to take the standard 'Confirmation Form' provided by the [Flag][flag] module and get it to load in a modal window rather than on its own page. We'll also extend this form slightly to allow the user to include some additional data before clicking 'Confirm'. As an example we'll use the Flag module to create an 'Abuse' flag that will apply to a comment entity - this is intended to allow a user to flag a comment as requiring moderations but before triggering the actions associated with the flag we...

Read more