Welcome
Welcome to singularo.com This site has links to various projects that i'm currently working on.
Welcome to singularo.com This site has links to various projects that i'm currently working on.
When building the authoring experience in Drupal, its nice to add in a token browser for text fields and let users replace tokens with other fields from the content or site.
The token browser provides the ability to filter down to entity types, users, site and other things, but it shows ALL the tokens for those. I wanted to restrict the tokens shown from the node type to a specific subset to reduce complexity and make it less daunting for users using the token browser, which has a huge number of options, even on a brand new site.
It was time to bite the bullet and upgrade this site to Drupal 10, which went pretty smoothly, but of course, never start this sort of process without a backup.
Drupal has made huge advances with upgradability since Drupal 7. Going from Drupal 8 to Drupal 9 and now to Drupal 10 has been a progressively smoother process.
In the case of this site, it was simply updating composer.json and changing some lines in composer.json like this:
Before:
I started having this issue a week or so ago where Bluetooth would just be disabled on boot, and my mouse wouldn't work until I used the touchpad on the laptop and went and manually enabled Bluetooth. Inconvenient, but not a show stopper.
With the release of Drupal 10, I wanted to take it for a spin, and updated the Shepherd scaffold we use for OpenShift deployments so that things work nicely. If you already have docker, docker-compose & composer installed, try these steps to give it a spin.
I took the plunge and switched from swiftmailer to symfony_mailer in StratosERP on the weekend, and it was surprisingly simple!
This snippet of code generates a pdf file using entity_print with wkhtmltopdf in the private filesystem, creates a new email, attaches the file and also takes a text_format field for the body and sends it.
Today I figured out an issue that has been blocking progress on StratosERP for a while. Its one of the last things needed, and I had run out of other immediate bugs/features, so it had to be sorted.
The issue was the wkhtmltopdf would generate an unstyled pdf. It gave no errors and the handy Entity Print module debugging url worked fine and looked correct.
The Github tools are cool, but mostly I just wanted a quicker way to confirm that my jobs had run successfully, rather than go to the web browser.
It was pretty easy to construct a command to make it a one liner, but first, the github cli tools need to be installed, and the jq utility.
Once thats setup when a git push has just been done, then this command should automatically watch the job.
I recently needed to perform some simple domain redirects, and surprise - there is a minimal docker container that is perfect for the job.
docker run -d --restart=always \ -e REDIRECT_TARGET=https://domaintoredirect.biz \ -e VIRTUAL_HOST=www.someotherdomain.com,someotherdomain.com \ -e LETSENCRYPT_HOST=www.someotherdomain.com,someotherdomain.com \ --name=domaintoredirect-biz -p 8080:80 morbz/docker-web-redirect
This works a treat, but does require a few things done first:
MS Teams has been adopted all over, but on Linux, they have annoyingly decided to not provide the default Window decorations, so Its not possible to right click, and enable 'Always on Visible Workspace' which is something I like to have on.
OOhhh, found a different way, hold down the ALT key and right click on the teams title bar and the popup has 'Always on Visible Workspace' as an option.