Category: Drupal
Auto-creating Drupal user entities with custom entity reference selection plugin
Creating users on the fly through Drupal's entity reference fields doesn't work out of the box because user entities need more than just a label. The core implementation tries but fails to properly generate usernames, emails, and passwords from the provided text. This tutorial shows how to fix this with a custom Entity Reference Selection plugin.
Safely updating text field lengths in Drupal
Ever found yourself in a situation where you needed to increase the length of a text field that already contains data in your Drupal site? Maybe you started with a shorter field length and now your content editors need more space. It's a common scenario, but changing field lengths in production can be tricky.
Improving Drupal code quality: Using Data Transfer Objects instead of arrays
From my experience over the years, Drupal developers tend to use arrays everywhere. In some situations, that's perfectly fine, but in others, it's not ideal at all. A better solution than using arrays is to use Data Transfer Objects (DTOs).
Lightgallery module can disrupt analytics on your Drupal site
If you're using the Lightgallery module on your Drupal site in combination with Meta/Facebook Pixel or Google Tag, the module's settings can potentially interfere with tracking the PageView and some other events. Let's explore why this happens and how to resolve the issue.
Upgrading CKEditor from Version 4 to 5 in Drupal
Upgrading CKEditor from version 4 to 5 in Drupal 10 can be tricky, especially when it comes to code syntax highlighting. I'll guide you through the process, sharing the challenges I faced and the solutions I explored. Ultimately, I found success using the highlight.js Input Filter module, which significantly improved code highlight.
Facebook/Meta Pixel and Conversions API: Drupal module
Similar to Google Analytics' Measurement Protocol, Facebook/Meta has the Conversions API for server-side tracking. This API sends events directly from your server to Meta, providing more accurate data, better targeting, and improved campaign insights.
Drupal hosting doesn't have to be expensive
I recently helped an acquaintance transfer a Drupal site from an overpriced hosting provider to a much more affordable one, making it about 40 times cheaper. The move was necessary due to the old host's high costs and its outdated Linux version.