Double Grand: Drupal 7 Grandmaster
Last week, I managed to achieve the prestigious Drupal 9 Grandmaster title. This week I completed the puzzle with Drupal 7, because legacy projects need love and attention as well.
Last week, I managed to achieve the prestigious Drupal 9 Grandmaster title. This week I completed the puzzle with Drupal 7, because legacy projects need love and attention as well.
When dealing with certifications for Drupal, there are a number of questions - is it worth getting a certification? If so, which Drupal version should you target? This is my personal take on those questions.
I had my eye on this certification (or should I say, group of certifications) for a while now, but it was not available for Drupal 9... until recently.
Spoiler: It was not what I expected.
Had some performance issues with a client, recently. The server is an absolute beast, and should be able to easily handle the single website hosted on it. Alas, pages took forever to load (D7). A simple top showed that load was at about 60, and CPU utilization was at 10% for user and ... 95% for system. Wait what?
For a recent client, I needed a node-add form in a custom path. Unfortunately, loading the form there via code (in order to prepopulate the node object) lead to all sorts of FileField errors, and the solution proved to be extraordinarily simple.
I recently got a call from the content managers of a website I support, complaining that they couldn't reorder vocabulary terms any more. Specifically, the Save button was gone! Took me a while, but here is why, and how to solve it (if you just want the solution, scroll to the bottom)
Field Collections are basically multifields in Drupal 7. They're so much user-friendlier than having referenced nodes, and so much lighter. However, if you try to add items to them (that is, an unlimited field collection field) in hook_node_presave , you get stuck in an endless loop. If you have XDebug or similar, you will see the extremely unhelpful message " Maximum function nesting level of '100' reached, aborting!". So what now?
One of the things I love about Drupal is the taxonomy system. It's convenient and stable... except when it's not. I got 404s for the term URLs (both system and alias) and the cryptic message "Notice: Undefined index: href in menu_local_tasks() (row 1973 in path2site/includes/menu.inc).". Well, here's what worked.
It's been long. Too long. I always wanted to upgrade my blog to D7... and never had the time or patience. Well, that's done!
We all know that Drupal provides the FormAPI, in which very powerful form elements exist (in our case, the tableselect element). This magical element behaves like a table, but has a checkbox for each line, and associated JS/CSS to handle checking rows. But it is normally impossible to add additional form elements on each row ( there have been many workarounds, but all seem hackish) due to the way Drupal handles form submission. This is how to have a clean (and simple!) way to go around those restrictions.