developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
Selected filter
26
results
Andrew Fletcher
•
Maintaining a Drupal site is usually smooth sailing once the environment is properly set up. However, even in a stable environment, updates to modules can sometimes reveal underlying configuration issues that weren't apparent before. This was the case when I updated a contrib module on a Drupal 10.3 site, which suddenly started throwing errors related to the mbstring PHP extension.
The problem
The problem first surfaced after updating the search_api_attachments contrib module. The Drupal...
Andrew Fletcher
•
As you're using Bootstrap 5 and applying a style for the hover state of an...
Andrew Fletcher
•
Loading the code in a platform - in this article, I'll be focusing on Android...
Andrew Fletcher
•
Update Ubuntu 20.04
To begin update the server using the command
sudo apt update...
Andrew Fletcher
•
Using CK Editor 5, I needed to add instructions to a page that held FontAwesome...
Andrew Fletcher
•
Installing PHP on OSX and it installed PHP 8.2.x. However, for my applications I need to run 8.1.x. How do you switch the current PHP version?
Current version
Check the current PHP version by executing the command
php -vResponse:
PHP 8.2.2 (cli) (built: Feb 5 2023 12:38:16) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.2, Copyright (c) Zend Technologies
with Zend OPcache v8.2.2, Copyright (c), by Zend Technologies
Unlink PHP
To change your PHP version, begin...
Andrew Fletcher
•
It appears that the plugin or file path is not working how it used to be on...
Andrew Fletcher
•
JSON structure
Outlining the structure of the elements common attributes:...
Andrew Fletcher
•
In this instance, I'll check the beginning of the string. I want to focus...
Andrew Fletcher
•
Working from the bases that .DS_Store has not been added to your git repository,...
Andrew Fletcher
•
To sort through a multidimensional array seems to be a function that I occasionally call on. Handy to have referenced here:
/**
* Loop through a multi dimensional array
*
* @param array $haystack
* Data array.
*/
protected function sortMultiDimensionalArray($haystack)
{
foreach ($haystack as $key => $item) {
// If $item is an array and the number of children is greater to one
// keep looping through the array.
if (is_array($item) &&...
Andrew Fletcher
•
phpcs issue in Visual Studio Code, I'm receiving this warning in VS...
Andrew Fletcher
•
Had the situation where you are running composer however, the scripts stops with...
Andrew Fletcher
•
Oh the treasure of a client coming to you with a site they have removed the...
Andrew Fletcher
•
I installed Lando 3.6.2 and Laravel 9. When I visit the web page, I...