Building custom themes for Drupal can be done with tons of approaches and many different ways of automating routine CSS operations. Here is the short list of tools I use with Gulp that I find solve close to 100% of the most common needs for Drupal (as well as for other CMS custom development). Feel free to share your thoughts on this list in the comments below. Continue reading
Category Archives: Tips & Tricks
Amazon SNS Introduces Message Filtering
A Fine Start
Chrome’s default tab page – that handful of thumbnail images of your most often visited websites – is useful to a certain extent only. There are easy ways to make that page more useful.
Drupal 8: Taxonomy Terms by Level
Convenient Semaphore with DynamoDB
DynamoDB is a non-blocking asynchronous storage, and it is great. Mostly. However, sometimes you just need to ensure that only one instance of script accesses a certain share of information in your table. In my case it was operation or purgin+rebuilding records, which under race conditions would result in a massive data loss.
So, I decided to build a semaphore. Continue reading
RESTful API Tester
For those of us who develop or work with backends with RESTful APIs, I wrote a little tool at http://x2node.com/api-tester/ that allows using a browser to make calls to the backends, mostly for testing. It’s useful when the application’s UI part is not yet ready but you already need to start making calls to the web-service you’re working on. The tool is part of the X2 Framework for Node.js ecosystem, but it’s generic and will work with any RESTful web-service. Enjoy!
A fix for Drupal 8’s broken preview
Drupal 8 is still beta-ish in so many aspects, that “workarounds” is becoming a separate genre of Drupal development tips and tricks.
The today’s workaround is for the bug in “node preview” functionality. It is not frequently used, but can be rather convenient for large websites with moderation enabled. The bug can be spotted only when CSS styles, applied to the node/page template rely on the <body> CSS classes, namely the core-added page-node-type-[node bundle] body class. It helps to effectively distinguish different node templates, and therefore are widely relied on by front-end developers. However, in preview mode, this class appears entirely missing, which breaks the styling.
Drupal 8 Migration: Field Updates
By default, the migrate module in Drupal 8 updates existing nodes by completely overwriting all the fields in the target node with the data from the migration. But what if your client has modified content on the target (D8) system, and still wants to update the content with newly-mapped fields? For instance, there is a “description” that has been updated after the first migration, but now the client wants “subtitle” field to be migrated (which was empty or not present during the first pass), without overwriting the description field changes. Continue reading
Do you mind closing that window?
It is a well-known fact that external links can be opened in a new browser window via
target="_blank"
. It is a little-known fact that this can cause security risks and performance issues on your own webpage.
Continue reading