developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
479
results
Andrew Fletcher
•
When building a theme in Drupal, it's often necessary to adapt your site’s UI dynamically based on the context in which a user is navigating. One such piece of dynamic content is the menu title. Achieving this can be a bit tricky due to the layered nature of its routing and menu systems. This reference article will walk you through the process of fetching the current menu title within the `hook_preprocess_page` function in your Drupal theme's `.theme` file.
Understanding Drupal's route...
Andrew Fletcher
•
Managing large directories, especially those filled with a diverse mix of media...
Andrew Fletcher
•
Recently I came across this piece of gold when dealing with databases,...
Andrew Fletcher
•
Dealing with errors in Drupal development is a common occurrence, and...
Andrew Fletcher
•
In the realm of system administration and monitoring, understanding memory usage...
Andrew Fletcher
•
Alright, picture this: you're knee-deep in Drupal 10 development, churning out code like a pro. But hold up, what's this? Twig debug mode is still on in production? Cue the headaches. Suddenly, your beautifully crafted HTML is drowning in unnecessary output, and innocent contact form responses are sprouting template suggestions left and right. It's a mess.
In the world of Drupal, keeping things secure and streamlined is key. And one crucial piece of the puzzle? Managing Twig template debugging....
Andrew Fletcher
•
I'm getting the following error
TypeError: Cannot assign null to property...
Andrew Fletcher
•
A growing list of commands I've used and what they do in no specific order
sudo...
Andrew Fletcher
•
Have you ever walked into a situation at work and just wondered how everything...
Andrew Fletcher
•
When attempting to install python libraries on my OSX
pip3 install pandas,...
Andrew Fletcher
•
The red flag was when I saw the server disk space is showing a site is taking up 57992.5 MB, where locally the site size is showing 957MB. There is something serious happening here and I need to establish the problem quickly. When dealing with a significant discrepancy in site size between a local environment and a server, it's important to identify the root cause of the larger disk usage on the server.
Approaches for discovering the issue(s)
1. Analyse Large...
Andrew Fletcher
•
Extending the functionality of a contrib module in Drupal can enhance its...
Andrew Fletcher
•
When receiving a logic error such as
LogicException: Form errors cannot be set...
Andrew Fletcher
•
Adding a new service to a custom module and the following error greeted me:
The...
Andrew Fletcher
•
Continuing on from the Drupal 9 to Drupal 10 upgrade outline written...