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
41
results
Andrew Fletcher
•
xdebug - failed to solve with frontend dockerfile.v0: failed to create LLB definition: dockerfile parse error line 45: unknown instruction: ZEND_EXTENSION=XDEBUG.SO
How I got here
Running the following Docker command
docker-compose upGenerated this output:
Building php
[+] Building 0.1s (2/2) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring...
Andrew Fletcher
•
Create and push to Docker Hub
Creating your own custom image... you need to have...
Andrew Fletcher
•
Resetting Docker is basically following the start parameters. All...
Andrew Fletcher
•
Having access to a site’s URL in your templates can come in handy for many...
Andrew Fletcher
•
I want to create a content type that has a paragraph. Easy enough.
What...
Andrew Fletcher
•
Since upgrading to Drupal 9.3.0 have you come across this error?
Edit mediaTypeError
: Argument 1 passed to Drupal\Core\File\FileUrlGenerator::generateString() must be of the type string, null given, called in /app/web/sites/default/files/php/twig/61baa150bc5f6_media--document.html.twig_h9bK0We32VfjIKYeac5J1n4Mn/6wcKI-HiereIg8aXE0Znemy4PM0s6woj_Cr2Trl_U68.php on line 59 in
Drupal\Core\File\FileUrlGenerator->generateString()
(line 58 of...
Andrew Fletcher
•
When you have an entity ID value such as node ID (nid) or taxonomy term ID, how...
Andrew Fletcher
•
Working in Twig, I had to add classes to a pre-existing array. Whilst I've...
Andrew Fletcher
•
Setting up a new project in Docker and VS Code.
Using Terminal, go to your...
Andrew Fletcher
•
Running Docker in a new process and creating a container.
Go to the...
Andrew Fletcher
•
Working in Laravel, I needed to loop through an array and know whether the current loop was odd or even row. To do this add the expression to your Twig file:
{% set direction = loop.index0 is odd ? 'left' : 'right' %}In the call above, the variable direction is set to either left or right depending on the value of the position of the loop row (loop.index0). I then used the left or right value in a div class adding to a series of tailwind css definitions. Such...