Dropsolid Experience Cloud: Everything you need to know about headless Drupal
Dropsolid Experience Cloud: How to add metatags to your headless Drupal project
Dropsolid Experience Cloud: The road to fully headless Drupal
Dropsolid Experience Cloud: Dropsolid DXP, the most open Drupal powered DXP for enterprises with a low entry barrier
Dropsolid Experience Cloud: What is a Digital Experience Platform (DXP) and why do you need one?
The Drop Times: Navigating the Currents of Change: The Multidimensional Journey of Preston So
The Drop Times: TDT Named Official Media Partner of DrupalCon Barcelona
The Drop Times: TDT an Official Media Partner for Drupal Iberia 2024
Drupal Atlanta Medium Publication: How to Configure the SMTP Module in Drupal 10 with Gmail, Since Google Removed Less Secure Apps
To ensure your Drupal 10 website can send emails, like password reset links, you must configure the SMTP Module, especially after Google’s policy change on September 30, 2024, which prohibits the use of less secure apps. This guide will show you how to set up the SMTP Module in Drupal 10 for sending password reset emails and other form submissions via Gmail.
Before you begin, ensure you have the necessary tools. You will need Composer and Drush installed on your computer. Additionally, you must have access to a Gmail account and its password, which will be used to send the emails. Follow these steps to configure SMTP in Drupal 10, ensuring your site’s email functionality is uninterrupted by Google’s security updates.
Note: The instructions below are for a standard Gmail and have not been tested on a Google Workspace email address.
Download and Enable the Module- First, you must download and enable the module.
- We are going to use composer to download and then a drush command to enable it. Or you could just enable the module in the
drush en smtp -yConfigure the SMTP Module in Drupal
- Navigate to the configuration page admin/config/system/smtp
- Under Turn this module on or off select On.
- Under SMTP server enter the following smtp.gmail.com. Leave SMTP backup server blank
- Under SMTP port enter 587
- Under Use encrypted protocol select Use TLS
- Under E-MAIL OPTIONS use the same Gmail address as you did above and enter an E-mail from name
- Login to your Gmail account at https://myaccount.google.com/
- On the account homepage, click Sign-in & security or navigate to https://myaccount.google.com/security
- Turn on 2-factor authentication and enter your phone numbers
- Visit https://myaccount.google.com/apppasswords
- Name your app — XYZ Drupal Website
- Copy the password and enter this password into the SMTP Module password location.
How to Configure the SMTP Module in Drupal 10 with Gmail, Since Google Removed Less Secure Apps was originally published in Drupal Atlanta on Medium, where people are continuing the conversation by highlighting and responding to this story.
ComputerMinds.co.uk: Format Drush output for easy wins!
Drush, the brilliant command-line tool for Drupal, is capable of giving you its output in several ways. Its global --format parameter can be set to a type that you can use in useful ways. Most recently, I found this incredibly useful when I had made some configuration changes through Drupal's admin pages, and needed to then script those changes to automatically apply to hundreds of sites on a platform we manage.
I simply asked Drush for the value of the configuration I had set, formatted as the PHP code to set those values. Then I could drop that into our PHP automatic update script. Here are two examples - one getting just a single property of a block placement, and another for the whole settings object for a module.
# Get the visibility conditions of my block. drush config:get block.block.myblock visibility --format=var_export # Get the whole settings singleton for my module. drush config:get mymodule.settings --format=var_exportThe var_export format provides the output using PHP's traditional array syntax, instead of the default YAML (which matches the format of config export files). Here's an example of the output for another type of configuration, an action:
array ( 'uuid' => 'faaaea7f-d377-4b9c-bbfb-bd1b9c562050', 'langcode' => 'en', 'status' => true, 'dependencies' => array ( 'module' => array ( 0 => 'mymodule', ), ), '_core' => array ( 'default_config_hash' => 'vvt7bzrXEwxrTfY--axzCfSRPzggH0o4hahUY9Kh0z0', ), 'id' => 'mymodule_foo_action', 'label' => 'An example action', 'type' => 'webform', 'plugin' => 'mymodule_foo_action', 'configuration' => array ( ), )Then I could just copy the output and paste it into a post-update hook. My IDE makes it easier to prettify the code to match Drupal's coding standards and switch to PHP's newer short array syntax. I also removed all the bits that I could leave to be dynamic; like the uuid, _core, and empty configuration properties in the action example above. I can then either use the entity storage for my type of entity to save the configuration, or just use the Configuration Factory service more directly:
$data = // (Paste & adapt the output from drush for this variable.) // Example of using the config factory. $config = \Drupal::configFactory()->getEditable('block.block.myblock'); // Using `setData()` will replace the entire config array. We could instead // use `set()` for individual properties. $config->setData($data)->save(); // Alternatively use the entity type storage and specific methods, when // available. Create new entities with `$storage->create($settings)->save()`. $storage = \Drupal::entityTypeManager()->getStorage('block'); $storage->load('myblock')->set('settings', $data['settings'])->save();We tend to automate Drupal core's configuration management on most of our projects - but not always. Even where we don't, there is usually some config that we exclude from the automated management - usually to allow clients to make changes in the admin UI without needing to access the codebase. So this is a handy trick to have available when you just need to script some changes outside of config management.
Under the hood, the consolidation/output-formatters library is what provides output formatters. If you run drush help version you can get a list of other standard formatters, which includes:
-
yaml
-
The key-value format usually used for configuration exports.
-
csv
-
Comma-separated values; ideal for simple lists
-
php
-
The format that PHP's internal serialize() method produces.
-
var_dump
-
Probably my new favourite; as produces coloured syntax highlighting in the terminal output! It is powered by Symfony's VarDumper component. I have found this particularly useful recently when debugging the output from a remote API endpoint, to help me visually parse clumps of output.
As a bonus, this can be useful for quickly loading up an entity to inspect its field values:
getStorage('taxonomy_term')->load(11)->toArray());" --format=var_dump`" data-entity-type="file" data-entity-uuid="9930f0b8-e138-4ae8-8432-1e42a2e7086b" src="https://www.computerminds.co.uk/sites/default/files/inline-images/drush-var-dumping.png" width="692" height="834" loading="lazy" /> My output from drush php-eval "return array_filter(\\Drupal::entityTypeManager()->getStorage('subscriber')->load(127)->toArray());" --format=var_dump
...which feels rather like a good case for a custom drush command, just taking an entity type and ID as arguments ;-)
What other handy uses of specifying an output format can you come up with? Let me know!
Tag1 Consulting: Drupal Core Test Suite Improved Runtime By 10% With Gander
The Drupal community has continuously sought ways to enhance the performance and efficiency of Drupal sites. The performance testing framework Gander has been part of Drupal core since version 10.2. The result of joint efforts between the Google Chrome team and Tag1 Consulting, this powerful tool is specifically designed to optimize Drupal performance. Optimized performance ensures that sites are not only fast but also efficient and sustainable. Today, we will take a closer look at how Gander played a crucial role in improving the Drupal core test suite runtime by 10%. ## Identifying A Core Performance Issue Gander's impact on Drupal development was recently highlighted by its identification of a performance issue within Drupal core. The issue (#3410312) reported a particular code section being called redundantly during automated test runs and on live websites, resulting in delays. ### The Bottleneck Identified Drupal is designed to use the flood system for user logins. It first checks if a flood protection table exists in the database. If it does not exist, Drupal postpones the creation of the table until it needs to write to it instead of creating the missing table immediately. What can happen is...
Read more janez Wed, 04/03/2024 - 02:00Talking Drupal: Skills Upgrade #5
Welcome back to “Skills Upgrade” a Talking Drupal mini-series following the journey of a D7 developer learning D10. This is episode 5.
Topics-
Review Chad's goals for the previous week
- .gitignore
- Field Example module
- Plugin API
- Drupaal 10 Masterclass book
-
Review Chad's questions
- Field Example follow up
-
Tasks for the upcoming week
- Examples module: js_example module
- js_example.libraries.yml
- hook_theme() implementation in js_example.module
- JsExampleController
- template files
- Examples module: js_example module
.gitignore Drupal 10 Masterclass Modernizing Drupal 10 Theme Development Chad's Drupal 10 Learning Curriclum & Journal Chad's Drupal 10 Learning Notes
The Linux Foundation is offering a discount of 30% off e-learning courses, certifications and bundles with the code, all uppercase DRUPAL24 and that is good until June 5th https://training.linuxfoundation.org/certification-catalog/
HostsAmyJune Hineline - @volkswagenchick
GuestsChad Hester - chadkhester.com @chadkhest Mike Anello - DrupalEasy.com @ultimike
Acquia Developer Portal Blog: Local environment for Acquia Site Factory
The purpose of this tutorial is to explain how to set up a best practice local environment for Drupal multisite, including on Acquia Site Factory:
- Configure Lando to support wildcard DNS.
- In settings.php, set an "App ID" to use in code for a specific multisite in any environment.
- In settings.php, set database, public files, memcache prefix, Solr core, and other settings per "App ID".
- Configure Drush aliases per multisite and per environment.
- Write bash scripts to push and pull sites using these aliases.
- Configure Lando with wildcard DNS
Lando is a docker orchestration framework for development environments.
There
Salsa Digital: Splash Awards 2024
The Drop Times: For Drupal to Remain Well and Alive: An Exclusive Conversation with Tim Doyle
Drupal Association blog: DrupalCon Portland 2024: The Nonprofit Summit Agenda is here!
I am pleased to share the schedule for the upcoming 2024 DrupalCon Nonprofit Summit. There is a special rate ($395.00) for nonprofit org staff, and those who are affiliated with nonprofits, and the summit is included free with your ticket! You can register here.
Relying on community feedback and past experience, we put together an agenda that we hope encompasses the spirit of open source camaraderie and will provide nourishment for the mind and soul. We tried to balance the technical with the strategy and networking with expertise. We look forward to seeing you there.
Agenda 9:00 am - 9:15 am: Welcome and overviewJulia Kranzthor
9:15 am - 10:30 am: Why Should Nonprofits Use Drupal? The Case for Owning Your Own Data and Using Drupal to Manage It.Fireside Chat with Tim Lehnen, Johanna Bates, and Jess Snyder
10:30 am - 10:45 am: Break 10:45 am -11:00 am: Sponsor Case Study #1 11:00 am - 12:15 pm: Breakout SessionsRound Table Discussions
-
Using Drupal to Promote Engagement With Your Audience: Tools, Challenges, and Measurement
-
Web Analytics for Nonprofits: Google Analytics 4 and Alternatives.
-
Thriving as a Lone Wolf: Navigating the Challenges of Being the Only Drupalist at a Nonprofit
-
Migrating from Drupal 7 to Drupal 10
-
Managing a Major Website Rebuild/Migration
-
Birds of a Feather: Topic to be determined on-site
A time for relaxing, and networking if you feel like it.
1:15 pm - 2:30 pm: Breakout SessionsRound Table Discussions
-
Web Accessibility and Site Governance
-
Using Drupal in Small Nonprofits with Limited Staff and Financial Resources
-
Preparing for Impact on Your Website Redesign
-
Development and Hosting Challenges for Nonprofits
-
Leveraging CiviCRM with Drupal: Open Source CRM for Contact Management and Engagement Tracking
-
Birds of a Feather: Topic to be determined on-site
Panel discussion with Tim Lehnen and Fran Garcia-Linares
4:00 pm - 5:00 pm: Optional NetworkingWrap up conversations, visit with colleagues.
Drupal Association Journey: Pedro Cambra: Survey on Bookmarking Tool Needs Your Input
TL;DR: I’m requesting members of the Drupal community to help my research about the need for a bookmarking tool by responding a super quick survey.
As part of my dissertation work for my bachelor’s degree, I’m unsurprisingly working in something related to Drupal. After a lot of consideration regarding a project that could be within a reasonable scope but also allowed me to contribute a little bit to the Drupal ecosystem, a chat with Cristina and Christian helped me decide to work in the shortcut module, and try to make improvements before it is marked to be removed to core – and try to avoid that because I believe it could be a useful tool for both the navigation and the dashboards initiatives.
But first things first.
One of the elements I am looking to explore the most in my research is the full process of the contribution, from identifying the issue to solve, get quantitative data through a survey in the community to establish that the problem is worth solving it, then propose a solution and get feedback on it.
I would appreciate it a lot if you could help me achieve my goal by answering the survey I’ve prepared.
Matt Glaman: Ensuring smart_date works for all versions of Drupal 10 and 11
At MidCamp a few weeks ago, Martin Anderson-Clutz tapped me on the shoulder to check out a Smart Date issue for compatibility with Drupal 10.2. As of Drupal 10.2, ListItemBase::extractAllowedValues takes an array as its first argument versus a string. The method used to explode a newline separated string into an array for its callers. I took a look at the issue. The change affected the parseValues method in the SmartDateListItemBase class. The parseValues method takes the field's values and passes them to extractAllowedValues, the method with a changed signature in Drupal 11.
The original method contained the following: