Blokspeed.net - Bending the rules, ruling the bends since 2004 https://blokspeed.net/ en Proposal: Modernise the Drupal update framework https://blokspeed.net/2020/proposal-modernise-drupal-update-framework <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>The current Drupal update framework (roughly: hook_update_N) is quite old. It is still firmly rooted in the procedural origins of Drupal. Also, it has several shortcomings. Some of those shortcomings were addressed in the new(ish) hook_post_update mechanism, but that does not replace the old system, it only augments it for update code that needs the full Drupal framework to be available.</p>&#13; &#13; <p>This blogpost is a repost of an issue I created in the Drupal Ideas issue queue.</p></div> Thu, 27 Aug 2020 15:02:00 +0000 eelke 943 at https://blokspeed.net The tale of the mistranslated plurals https://blokspeed.net/2020/tale-mistranslated-plurals <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Recently, I ran into a strange issue with a Drupal site. Phrases that were based on a count, using the formatPlural() method to determine the correct phrase to report a count, were all translated with the phrase meant for a count of 1. All of them said e.g. 1 vraag or 1 reactie (Dutch for 1 question and 1 comment), even when there were more than one, or in some cases no questions, comments, or whatever the relevant phrase was.</p></div> Mon, 17 Aug 2020 16:26:56 +0000 eelke 942 at https://blokspeed.net Quick tip: Laravel, Lando and Mailhog https://blokspeed.net/2020/quick-tip-laravel-lando-and-mailhog <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>I've had some trouble finding the correct settings to to get a Laravel app running on Lando to send its mails to the Lando Mailhog service. Of course, hindsight is 20/20; if I had started out at the official Mailhog documentation, it would probably have been clear in seconds. I didn't, and went from the Learning Laravel site to the Lando documentation site to Google, passing by numerous Stackoverflow articles along the way. </p>&#13; &#13; <p>Just to prime that search query for Lando, Laravel and Mailhog, here's what worked:</p>&#13; &#13; &#13; MAIL_DRIVER=smtp&#13; MAIL_HOST=mailhog&#13; MAIL_PORT=1025...</div> Sun, 26 Jan 2020 10:22:44 +0000 eelke 941 at https://blokspeed.net Fighting content spam on Drupal with Akismet https://blokspeed.net/2019/fighting-content-spam-drupal-akismet <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Once, the Drupal community had Mollom, and everything was good. It was a web service that would let you use an API to scan comments and other user-submitted content and it would let your site know whether it thought it was spam, or not, so it could safely publish the content. Or not. It was created by our very own Dries Buytaert and obviously had a Drupal module. It was the service of choice for Drupal sites struggling with comment spam. Unfortunately, Mollom no longer exists. But there is an alternative, from the WordPress world: Akismet.</p></div> Thu, 15 Aug 2019 14:15:48 +0000 eelke 936 at https://blokspeed.net DIY multi-socket travel-adapter https://blokspeed.net/2019/diy-multi-socket-travel-adapter <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item">The last time I was in the UK, I came across a DIY power plug in a super store, and an idea jumped in my head. What if I bought one of those power strips back in Holland and replaced its plug with this UK one?</div> Mon, 12 Aug 2019 15:15:33 +0000 eelke 937 at https://blokspeed.net Creating fields and other configuration during updates in Drupal https://blokspeed.net/2019/creating-fields-and-other-configuration-during-updates-drupal <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>When deploying changes to a Drupal environment, you should be running database updates (e.g. drush updb, or through update.php) first, and only then import new configuration (which itself is supposedly the result of running the same update hooks on a development environment). The reason for this is that update hooks may want to update configuration, which will fail if that configuration is already structured in the new format (you can't do without updates either; update hooks don't just deal with configuration, but may also need to change the database schema and do associated data...</p></div> Mon, 05 Aug 2019 20:31:53 +0000 eelke 935 at https://blokspeed.net Video: The State of Drupal 9 https://blokspeed.net/2019/video-state-drupal-9 <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>At last month's DrupalJam XL in Utrecht, the Netherlands, I gave Gabor Hojtsy's presentation on the state of Drupal 9. It was recorded - thanks DrupalJam organization! - so here is the video. You might also want to view Gabor's own presentation from DrupalCamp Belarus.</p>&#13; &#13; <p>You'll need to turn up the audio, because it seems that it was recorded using the camera, not the fancy microphone I'm wearing.</p></div> Wed, 10 Jul 2019 11:09:56 +0000 eelke 934 at https://blokspeed.net Quick tip: generating a hash salt for Drupal 8 https://blokspeed.net/2018/quick-tip-generating-hash-salt-drupal-8 <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Drupal 8 will actively complain when your site does not have a hash_salt configured, which usually gets generated when installing the site. (The complaint, mind you, might be fairly obscure; your site might just say "The website encountered an unexpected error. Please try again later." Depending on your error reporting settings, the message might be a bit more helpful). If, for example, you "install" a site by copying over a database and files, you will not have this.</p>&#13; &#13; <p>Update 26/21/2021: since writing this blog post, I found that basically, for Drupal's functioning, it does...</p></div> Fri, 24 Aug 2018 11:39:39 +0000 eelke 933 at https://blokspeed.net DrupalCamp Ruhr Talk: Drupal 8 Configuration Management https://blokspeed.net/2018/drupalcamp-ruhr-talk-drupal-8-configuration-management <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Last weekend, the DrupalCamp Ruhr was held in Essen, Germany. I was fortunate enough to have been selected as a speaker. I've now made the slides available online.</p></div> Thu, 22 Mar 2018 08:26:16 +0000 eelke 931 at https://blokspeed.net Preparing your Drupal 8.3 site with Media for Drupal 8.4 https://blokspeed.net/2018/preparing-your-drupal-83-site-media-drupal-84 <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>If you have the Media module for Drupal 8 installed (not a requirement to use media with Drupal 8, so this post may not apply to you), you need to remove it before you can upgrade to the latest core version (8.4). Unfortunately, there are a few gotchas involved with the process. This blog post is about getting rid of the old contrib Media module, so the site can be updated to Drupal 8.4 in a subsequent step. This is based on my personal experience. YMMV, as they say.</p></div> Sat, 20 Jan 2018 14:36:41 +0000 eelke 930 at https://blokspeed.net