Lando set-up running Drupal and Python
Lando is a development environment tool that makes it easier to set up and manage local development environments for web applications. To use Python within a Lando-based development environment, you can follow these general steps:
Create a Lando Configuration File
Make sure you have a Lando configuration file (e.g., .lando.yml) in your project's root directory. If you don't have one, you can create it. Here's a basic example:
Using paragraph.getParentEntity() in Drupal Twig templates
In Drupal Twig templates, you can set a variable like paragraph_parent to the parent entity of a paragraph using the paragraph.getParentEntity() method. This is a common approach when you want to access the parent entity (e.g., a node) that contains the paragraph. Here's how you can do it:
Warning SameSite cookie attribute
In the Drupal Status report, I'm seeing the following message
Not set
This attribute should be explicitly set to Lax, Strict or None. If set to None then the request must be made via HTTPS. See PHP documentation
Watchdog page load impact on Drupal websites
In Drupal, the Watchdog module (or the logging system) is responsible for logging messages, errors, and other information related to the operation of your Drupal site. This data is useful for monitoring and troubleshooting, but it can potentially impact page load times if not managed properly.
Lando setup running Drupal 10
Create a Lando setup running Drupal 10.
The command you provided appears to be a Lando configuration command for initialising a new Lando environment for a Drupal 10 project. Following is a breakdown of the command and what it does:
Twig\Error\SyntaxError: Unexpected "spaceless" tag
Adding Open AI to a Drupal site
Twig\Error\SyntaxError: Unknown "filter" tag
Twig error
Twig\Error\SyntaxError: Unknown "filter" tag. in Twig\Parser->subparse() (line 6 of themes/custom/{theme}/templates/views/views-view-field--products--field_product_type.html.twig).
Line 6 of the views-view-field--products--field_product_type.html.twig file is
{% filter upper|escape('html') %}
The actual Twig file code
TypeError: Cannot assign null to property Drupal\views\Plugin\views\argument\ArgumentPluginBase::$operator
Post upgrading from Drupal 9.5.10 to Drupal 10.1.3, I was seeing the following error when viewing a view page:
Drupal managing a patch to composer.json
To get Flysystem S3 ready for Drupal 10, I needed to apply the latest patch to the contrib module - Flysystem S3 (https://www.drupal.org/project/flysystem_s3).
Rather than using the current RC (2.0.0-rc5) release, which was released 25 March 2022. Instead, I'll be using the dev release - 2.0.x-dev updated 14 Aug 2023.