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
179
results
Andrew Fletcher
•
Working in Drupal 9.x, I was loading images via the Media module. Below 1 mb no issue. Any thing over - nothing. Nothing as in no response when loading.
An interesting situation, as I had already changed the php.ini file where the following updates occured:
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2MHad changed to
upload_max_filesize = 10MAlso the post max size
; is disabled through...
Andrew Fletcher
•
Have you tried to run a composer update script that...
Andrew Fletcher
•
Since upgrading to Drupal 9.3.0 have you come across this error?
Edit...
Andrew Fletcher
•
Have you noticed through your Google account that there are items being indexed...
Andrew Fletcher
•
When you have an entity ID value such as node ID (nid) or taxonomy term ID, how...
Andrew Fletcher
•
In drupal 9 for logging you can use logger service to log array data in some readable format, by adding html code and print_r to array.
\Drupal::logger('my_module')->warning('<pre><code>' . print_r($responseObj, TRUE) . '</code></pre>');
my_module is type of log message, warning is severity method you call and $responseObj is array you need to put to log file to have some formatting. Other options you can use include:
emergency($message,...
Andrew Fletcher
•
Adding Solr config zip (ie. solr_8.x_config.zip) to your remote...
Andrew Fletcher
•
Z shell (Zsh) is a Unix shell built on top of bash (the default shell for...
Andrew Fletcher
•
Following is a series of steps to install Tika and have it running for your Solr...
Andrew Fletcher
•
You can create a new date/time format by navigating to:
Admin ->...
Andrew Fletcher
•
To assist in finding possible solutions some of the queries that I made include:
Drupal 9 pager with items_per_page
Drupal 9 pager merged with exposed form items_per_page
I wanted to resolve this issue through the theme file rather than in a custom module. While most of the time my preference is to create a custom module, the project I'm working at the moment we are working to minimal or no custom modules. Subsequently, solutions need to be managed via theme...
Andrew Fletcher
•
Creating a message log using Drupal watchdog.
Simple log
// Logs a...
Andrew Fletcher
•
Working in Twig, I had to add classes to a pre-existing array. Whilst I've...
Andrew Fletcher
•
On a git pull from remote dev environment to a staging environment running off...
Andrew Fletcher
•
A recent attempt to run an update composer (regular activity for many of...