327 Results
  • Latest
  • Oldest
Article
Posted on 18th October 2018
Takes about 1 min to read

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...

Article
Posted on 14th August 2018
Takes about 1 min to read

A client noticed the dates on their news articles were not being translated into the correct language. The name of the month would always appear in English, even though all the month names had themselves been translated and showed correctly elsewhere. The problem turned out to be down to the twig filter being used in the template to format the date. This is what we did have: ```twig {% set newsDate = node.getCreatedTime|date('j F Y')...

Article
Posted on 9th August 2018
Takes about 3 mins to read

The Problem I imagine many of us have been there: there’s some CSS class in your markup, and you need to do something with it. Maybe you want to remove it, change it, or perhaps alter its style declarations. “Easy peasy,” you think, “I’m a developer. I got this.” And so you should. Next, if you’re anything like me, your first instinct is to fire up your search tool of choice and search your...

Article
Posted on 26th June 2018
Takes about 2 mins to read

Let's say you've built a custom form for your Drupal 8 site. It contains various elements for input (name, email address, a message, that kind of thing), and you want to send the submitted values in an email to someone (perhaps a site admin). That's a pretty common thing to need to do. This could be done with Drupal's core contact forms, webforms, or similar -- but there are cases when a bespoke form is...

Published in: #Drupal Planet #email #Forms #token #Drupal 8
Article
Posted on 11th June 2018
Takes about 3 mins to read
This article is part of the series
Rebranding ComputerMinds

I volunteered to carry out the migration for the new ComputerMinds site as migration was one of the very few areas of Drupal that I hadn’t delved into thus far. With Drupal 8 becoming more and more popular, now was a great opportunity to learn the migration ropes. Luckily, Drupal 8’s migration has greatly improved since Drupal 7 so my life was made somewhat a little “easier”! This article will be aimed at some of...

Published in: #Drupal 8 #Migrate #code #yaml #Drupal Planet
Article
Posted on 1st June 2018
Takes about 8 mins to read
This article is part of the series
Rebranding ComputerMinds

Let's have a quick look through our development process on this project and pick out some of the more interesting bits. As briefly mentioned in the last article we are using a composer set up and all code is version controlled using git on github. All pretty standard stuff. Frontend In the previous article I briefly discussed how we set up Pattern Lab. Before getting stuck in to the components that would make up the...

Article
Posted on 30th May 2018
Takes about 2 mins to read

The new GDPR laws are here, hurrah! Having a number of developers handling databases from a number of client sites could easily be a nightmare, but we at ComputerMinds spent quite some time thinking about how to get and keep everybody safe and squeaky clean on the personal data front. Here's a quick run-down of the key things to be aware of - and a pretty poster to help you keep it all in mind...

Published in: #database #drush #Jenkins #Drupal Planet
Article
Posted on 16th May 2018
Takes about 3 mins to read

Steven and I had been encountering (fairly savage) static electric shocks from our desk chairs. For a number of months we'd been noticing the issue, each "crack!" seeming louder and more painful than the last. Almost every time we walked across the room, our chairs would greet us with a stab to the hand. The comedy value grew just as the frustration did; we'd enjoy listening for that signature sound whenever our colleagues returned to...

Published in:
Article
Posted on 14th May 2018
Takes about 2 mins to read

We ran into an obscure error recently, when saving a view that used a custom views plugin. It was supposed to be a very simple extension to core's bundle (content type) filter: InvalidArgumentException: The configuration property display.default.display_options.filters.bundle.value.article doesn't exist. in Drupal\Core\Config\Schema\ArrayElement->get() (line 76 of [...]/core/lib/Drupal/Core/Config/Schema/ArrayElement.php). Several contrib projects ran into this issue too: Drupal Commerce, Search API and Webform Views integration. There's even a core issue that looked relevant... but it turned out to be...

Article
Posted on 4th May 2018
Takes about 1 min to read

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...