Switching from Nginx to Apache Docker Container for Local Drupal Development

This guide demonstrates how to transition from an Nginx to Apache Docker container setup for local Drupal development, using Alpine-based images and custom configurations. The solution maintains full container flow control while properly handling .htaccess files and PHP-FPM integration, all managed through a Makefile-based workflow with Traefik as a reverse proxy.

Cookiebot issue with aggregated js files

Cookiebot auto-blocking mode is not compatible with Drupals JS aggregation as soon as an aggregated file contains the word "cookie", even if it is for removing a cookie, the whole aggregated script is blocked and leads to JS errors like "jQuery is undefined".
We certainly can add addtional attributes to the library files and custom js files, but not for aggregated (in a simple way).
I found really dirty solution how to achieve this result. 

Default image formatter for multisite

As you know, when creating image field there is an option to create a default image fallback. Image will be saved in public folder. The issue is that we cant export default image within configs, but that's ok for singlesite instances where you need to manually copy the image to production website from your dev env. Also you need to update the image manually again, if you changed it in configs.

Views minimum items to display

As you know views has good pager configuration, where you can set how many items skip (offset), how many display etc.
But it has no info of minimum items to display!
For example we dont want to show the block if there are less than 5 items in results. Maybe it will break styles or somthing else.
In this case a simple condition in hook_views_post_execute will be useful :

Flyout cart and issues

It's really nice module which makes customers flow better on website with no need to reload the page on every action. One thing I dont like is a lot of not needed information was present in responses from cart or product. In my case there were internal fields of Product Variations entity which are not displayed for customers.

Default paragraphs values

Let's assume you have a paragraph SimpleBlock with Title+Text fields. You also have a node with field_paragraphs reference to SimpleBlock paragraph.
You can add any paragraph to field_paragraphs. But you can't set there a default value. For example if you want to display 3 default SimpleBlock if there are no references in field_paragraphs.
One of the solutions is to use "Paragraphs Library", but in this case you need to add this paragraph to every node.
But I want something automatic and to use the same styles from twig templates.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'h0c...' for key 'PRIMARY': UPDATE {sessions}

Started session for anonymous user in mixed mode cause PDOException when user tries to log in. PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'h0c...' for key 'PRIMARY': UPDATE {sessions}