Centarro: The ABCs of PDPs and PLPs
Promet Source: Provus 2.0: Next Gen Drupal Content Editing
clemens-tolboom deleted branch patch-1 at clemens-tolboom/cpython
Updated Apr 22
clemens-tolboom commented on pull request python/cpython#91741
Sorry for the wrong branch ... my bad :-/ New main branch version is #91814
clemens-tolboom opened a pull request in python/cpython
Currying is not mentioned in the text so the reference is a little pointless. Currying is related to, but not the same as, partial application. F…
+1 -1clemens-tolboom created a branch replace-currying in clemens-tolboom/cpython
Updated Apr 22
Opensource.com: 3 things to know about Drupal in 2022
Several changes have made Drupal more accessible and easier to use.
Shefali Shetty Fri, 04/22/2022 - 03:00A broad range of enterprises, including nonprofits, media and publishing, government agencies, education, and more, rely heavily on Drupal. But while Drupal is widely...
Oomph Insights: Elevating Our Impact: Oomph Joins 1% for the Planet
ImageX: Top Upcoming DrupalCon 2022 Picks for Higher Ed Marketers
ImageX: DrupalCon Portland: Top Sessions for Developers
ImageX: Top Session Choices for Non-Profit Marketers at DrupalCon Portland
Aten Design Group: Set up a local Drupal multisite with Lando on Mac OS
Setting up a local Drupal multisite with Lando isn’t complex with the right docs, but it took me a little while to find all the right bits of configuration. I’ve centralized them here for posterity.
Building and operating local development environments that reflect your production environments can be tricky — especially as the landscape of tools, libraries, and automations continues to evolve. Recently we’ve been pretty satisfied with Lando for Drupal development. It’s well supported, has an active developer community, and can be configured for a variety of tricky use cases like emulating a Pantheon environment (that will have to be a different post) or setting up a Drupal multisite.
If you’re here you probably know what a Drupal multisite is, but just in case: Multiple separate websites, each with its own database and configuration, served from the same code base. There are a host of uses for multisites, but if you think about different websites for different store branches or maybe a variety of individual blog sites driven from the same or similar setup you’d be on the right track.
Installing Lando and Docker DesktopFirst things first: install Docker and Lando. If you already have Lando installed on your machine you can skip ahead, but just FYI I’m using a particular version of Docker for this build. A lot of us here at Aten have been running Lando with Docker Desktop for Mac 4.6.1 — it’s possible this Drupal multisite setup will work with other versions but I’m sure it works with this one. Follow the link above to install Docker — and make sure you choose the right platform for your chipset, whether that’s Apple or Intel. You can check your chipset on your Mac by clicking Apple Icon > About this Mac.
Once you have Docker Desktop installed, you can install Lando. I used the DMG installer for this walkthrough. When downloading the installer make sure to choose the right file — again, depending on your Mac’s chipset. If you have a newer Mac with an Apple chip choose the latest lando-arm64-vx.x.x.dmg, for Intel chips choose the lando-x64-vx.x.x.dmg.
The Lando DMG installer is very straightforward, just follow the onscreen instructions but make sure to choose “Custom” installation type, and uncheck Docker from the list of packages to install. This way Lando will work with the particular 4.6.1 version we already downloaded and installed.
Initializing a Drupal project on LandoFor this demo I used Lando’s Quick Start for Drupal which just takes a couple of minutes to run. You’ll want to start in your projects directory then run the following commands. I called my app landomultidrupal so change that value as you see fit. The somewhat unwieldy terminal commands look like this (pulled directly from the link above):
# Initialize a drupal9 recipe using the latest Drupal 9 version mkdir landomultidrupal \ && cd landomultidrupal \ && lando init \ --source remote \ --remote-url https://www.drupal.org/download-latest/tar.gz \ --remote-options="--strip-components 1" \ --recipe drupal9 \ --webroot . \ --name landomultidrupal # Start it up lando start # Install a site local drush lando composer require drush/drush # Install drupal lando drush site:install --db-url=mysql://drupal9:drupal9@database/drupal9 -y # List information about this app lando infoAnd just like that we’ve got a Drupal 9 site running on Lando. Now let’s turn it into a multisite. We’ve got three tiny steps to complete here: modifications to your .lando.yml file, your settings.php file(s) and your sites.php file.
Multisite setup in .lando.ymlBelow is a barebones .lando.yml configuration for a Drupal 9 multisite setup with two sites which we’ll call multisite1 and multisite2. It’s likely (especially if you’re a Lando aficionado) that your lando file will have some other configurations — but below are the bare necessities for running a multisite. You may notice I’m specifying ports for the portforward values. Specifying ports simplifies using tools like TablePlus to browse your databases, although the more straightforward portforward: true should work as well, and is Lando’s recommended approach.
name: landomultidrupal recipe: drupal9 proxy: appserver: - multisite1.lndo.site - multisite2.lndo.site services: appserver: webroot: . multisite1: type: mysql:5.7 portforward: 3307 multisite2: type: mysql:5.7 portforward: 3308 Drupal 9 multisite configuration in settings.phpThe above lando file configuration sets us up with two sites: multisite1 and multisite2. Our multisite1 will live at /sites/default, and multisite2 will live at /sites/multisite2. Each of these sites will have their own files directories, and could also include their own modules or themes directories depending on the needs of the project. They also have their own settings.php file which is the important component for this post.
You’ll want to paste the following code blocks at the bottom of the existing settings.php files. For multisite2, you can copy and paste the original /sites/default/settings.php to get all the boilerplate stuff in there — then paste in the special Lando code below.
// PASTE THIS AT THE END OF /sites/default/settings.php $lando_info = json_decode(getenv('LANDO_INFO'), TRUE); if (!empty($lando_info)) { // Define this site's default database. Be sure to change ‘multisite1’ to the same identifier that // you use under ‘services’ in your .lando.yml file. $databases['default']['default'] = [ 'database' => $lando_info['multisite1']['creds']['database'], 'username' => $lando_info['multisite1']['creds']['user'], 'password' => $lando_info['multisite1']['creds']['password'], 'host' => 'multisite1', 'driver' => 'mysql', ]; // Define file system settings. $conf['file_temporary_path'] = '/tmp'; $settings['file_private_path'] = '/app/private-files/'; // Trusted host pattern settings. $settings['trusted_host_patterns'][] = '\.lndo\.site$'; // Define this site's own config sync directory for local environment. $settings['config_sync_directory'] = '/app/config/multisite1'; } // PASTE THIS AT THE END OF /sites/multisite2/settings.php $lando_info = json_decode(getenv('LANDO_INFO'), TRUE); if (!empty($lando_info)) { // Define this site's default database. Be sure to change ‘multisite2’ to the same identifier that // you use under ‘services’ for the second site in your .lando.yml file. $databases['default']['default'] = [ 'database' => $lando_info['multisite2']['creds']['database'], 'username' => $lando_info['multisite2']['creds']['user'], 'password' => $lando_info['multisite2']['creds']['password'], 'host' => 'multisite2', 'driver' => 'mysql', ]; // Define file system settings. $conf['file_temporary_path'] = '/tmp'; $settings['file_private_path'] = '/app/private-files/'; // Trusted host pattern settings. $settings['trusted_host_patterns'][] = '\.lndo\.site$'; // Define this site's own config sync directory for local environment. $settings['config_sync_directory'] = '/app/config/multisite2'; } Set up sites.phpNext we need to indicate in sites.php which environment will point to which site configuration. We only need to define multisite2 here because by default, Drupal looks in /sites/default for the first site in a multisite installation. You can make a copy of /sites/example.sites.php to start with — although that file just includes some basic documentation and no actual code. The necessary code is just one line:
$sites['multisite2.lndo.site'] = 'multisite2'; Rebuild, and prestoThat’s it! Make sure all your files are saved, then let Lando know to rebuild using the new configuration. From terminal navigate to your project directory and:
lando rebuild lando startVoila! You should now have multisite1.lndo.site and multisite2.lndo.site running on your local — and both should resolve to the Install Drupal 9 web interface. You can follow the steps in your browser as usual, just remember to give your sites different names!
Have a quicker or easier way to set up a Drupal multisite with Lando? Or some other considerations you’d like to contribute? Feel free to share in the comments below!
Jordan GrahamMorpht: Announcing the Field Formatter Pattern module
Morpht: Announcing the Search API Field Token module
Drupal.org blog: What’s new on Drupal.org - Q1 2022
Read our roadmap to understand how this work falls into priorities set by the Drupal Association with direction and collaboration from the Board and community. You can also review the Drupal project roadmap.
Contributor Enablement Architecting GitLab CI for ContribThe GitLab Acceleration initiative is one of the top priorities of the Drupal Association engineering team.
Over the past quarter, we've been focused on the transition from DrupalCI to GitLab CI, and about 20 contributed module maintainers have stepped forward to help us define the architecture.
We fully believe that involving the community throughout the GitLab acceleration process will be essential to success.
In the case of CI testing for Drupal projects, the move from a centralized system (DrupalCI) to a decentralized one(GitLabCI) needs special care. Once control is directly in the hands of maintainers, we want to ensure we're providing default testing configurations that help them keep their testing up to date with the right versions and environments.
Pre-work for Issue MigrationIn addition to the focus on GitLab CI, we've done a lot of preparatory work for the transition to GitLab issues. Primarily, we've been updating custom version control information like commit logs from our bespoke Drupal.org implementations to link to GitLab instead.
This pre-work is essential to ensuring a smooth transition to GitLab issues when we're ready for that migration. It's important to remember that as these features move to GitLab they will look and function a bit differently. Some things may not work as well or be quite as tightly integrated to the rest of Drupal.org as they used to be, but at the same time we'll be unlocking a range of new capabilities for contribution.
Drupal.org Updates Drupal10 and PHP8 Readiness TestingWith Drupal 10 on the horizon, the Drupal Association worked with Gábor Hojtsy to update the automated deprecation checking for Drupal projects. This checks for Drupal 10 deprecations, and also use of functions deprecated in PHP 8.
We also updated the versions of Chromedriver, Node.js, and MySQL in our test environments.
This process is a big part of getting the contributed module ecosystem ready for each new major version of Drupal. The community can also use this data to prioritize automated deprecation fixes for the most commonly used deprecated functions.
Release page updates: Composer commandsRelease pages for all projects on Drupal.org now provide all the composer commands a user will need to update to that release. For contrib projects, we provide simple $composer require statements. For Drupal core, we provide options for starting a new site from that version, updating an existing site to the latest, and pinning to a specific release. We've also updated documentation to help users manage pinned versions.
Composer workflows continue to be central to modern Drupal, and providing these Composer commands should save time for beginner and intermediate Drupal users.
Updates to the Community Events section on Drupal.orgThe Community Events listings on Drupal.org have been improved with tooltips for online/in-person events, better visual indication of canceled events, as well as additional views for contribution events and DrupalCon.
With COVID restrictions beginning to lift around the world, submissions to /community/events are increasing, empowering the community to come back together. The Events Organizers Working Group has prioritized additional enhancements that the team will continue to work on in Q2.
Visual refresh for organization profilesWe made a few subtle but significant changes to the visual layout of organization profiles. The right column case study display has been moved to the main body of the profile, and the contribution statistics are collapsed by default, giving more focus to the page.
Less clutter and more visual appeal in the organization profiles makes it easier for organizations to shine when evaluators are looking for a partner.
We're planning additional features for organization profile owners, to give them more insight into their contribution statistics and the impact on their marketplace rankings.
Stricter requirements for 'Office Location' Marketplace filterAt the beginning of the quarter, we updated the Office Location field on organization profile pages. Office Locations now better enforce the requirement for a physical presence. (While organizations that work in regions where they don't have offices can still use the Locations Served field).
This change gives organizations a greater presence in the marketplace in regions where they are physically located, and makes it easier for evaluators to find a partner with a physical presence in their area if that is important to them.
Marketplace ranking adjustmentsThe marketplace has received a few other updates over the course of this quarter. Firstly, organizations now receive credit for the contributor roles they sponsor. Secondly, the overall sort order has been adjusted to sort by Drupal Certified Partner Level -> Supporting Partner Level -> Contributor level.
For more information, read the blog post which accompanied these changes.
Work in progress Authentication and Single Sign OnThe Drupal Association engineering team is working with our partners at Tag1 on an authentication and single sign on solution for Drupal.org accounts using Keycloak. We're currently waiting for the next version release of Keycloak for some key features, but once that's available we'll be planning our deployment.
The new authentication solution will help us authenticate Drupal.org users between newly migrated Drupal 9 sites, and our legacy D7 sites, and will also provide the capacity to use the Drupal.org identity to log into community properties like DrupalCamp sites and chat services.
Api.Drupal.org D9 upgrade progressOne of the major projects we began in Q1 of 2022 is the migration of api.drupal.org to Drupal 9. At this point, the key api module is fully ported to Drupal 9, and we're ready to plan the final migration in Q2.
Api.Drupal.org is a key reference for developers working with Drupal. Upgrading this site to Drupal 9 is part of our ongoing effort to bring all of the Drupal.org sub-sites up to modern Drupal.
Events.drupal.org D9 upgrade progressThe DrupalCon website platform is due for an upgrade as well. We're working again with our partners at SixEleven who created the original brand, to bring it up to Drupal 9.
Events.Drupal.org is a site we want to represent the best of Drupal. The DrupalCon web platform is a key part of making that good first impression.
TUF signing for Automatic UpdatesIn Q1 of 2022 we pushed hard with our partners at Consensus Enterprises to build out a beta implementation of TUF package signing for Drupal.org. This signing service should be in production to support the Automatic Updates and Project Browser initiatives in Q2. The product of this effort is being released as an open source TUF signing server, called 'Rugged'.
Supply chain security is essential to implementing automatic updates and project browser installation in a safe way. Drupal has always been known for its security, and TUF is a robust system for preserving that reputation.
See you at DrupalCon!Most of the Drupal Association engineering team will be on site at DrupalCon Portland from April 25-28 of this year. There's still time to join us and chat about these and other updates on the horizon. We'd love to see you there!
———
As always, we’d like to thank all the volunteers who work with us and the Drupal Association Supporters who make it possible for us to work on these projects. In particular, we want to thank:
- Elevated Third - Renewing Signature Supporting Partner
- FFW - Renewing Signature Supporting Partner
- PreviousNext - Renewing Signature Supporting Partner
- Chapter Three - Renewing Premium Supporting Partner
- Dropsolid - Renewing Premium Supporting Partner
- Electric Citizen - Renewing Premium Supporting Partner
- Promet Source - Renewing Premium Supporting Partner
- publicplan GmbH - Renewing Premium Supporting Partner
- SearchStax - *UPGRADE* Premium Supporting Partner
- undpaul - Renewing Premium Supporting Partner
- Vardot - *UPGRADE* Premium Supporting Partner
- Berger Schmidt - Renewing Classic Supporting Partner
- Cheeky Monkey Media - *NEW* Classic Supporting Partner
- Digital Circus - Renewing Classic Supporting Partner
- Esteemed - Renewing Classic Supporting Partner
- Factorial GmbH - Renewing Classic Supporting Partner
- Forum One - Renewing Classic Supporting Partner
- Fruition - *NEW* Classic Supporting Partner
- Liip AG - Renewing Classic Supporting Partner
- Link Solutions - Renewing Classic Supporting Partner
- LN Webworks - *NEW* Classic Supporting Partner
- Mobomo - Renewing Classic Supporting Partner
- Osio Labs - Renewing Classic Supporting Partner
- Redfin Solutions - Renewing Classic Supporting Partner
- University of Virginia - Renewing Classic Supporting Partner
- weKnow - Renewing Classic Supporting Partner
If you would like to support our work as an individual or an organization, consider becoming a member of the Drupal Association.
Follow us on Twitter for regular updates: @drupal_org, @drupal_infra
Lullabot: The Present and Future of Drupal’s Administrative Interface
Claro is the new core administration theme based on the new Drupal design system. It is a clone of the Seven admin theme, the default admin theme in Drupal since Drupal 7. If Seven is adequate for a certain need, then Claro will be adequate for that need, too. We didn’t have to start from scratch.
The big-picture goals are as follows:
Security advisories: Drupal core - Moderately critical - Access bypass - SA-CORE-2022-009
Drupal 9.3 implemented a generic entity access API for entity revisions. However, this API was not completely integrated with existing permissions, resulting in some possible access bypass for users who have access to use revisions of content generally, but who do not have access to individual items of node and media content.
This vulnerability only affects sites using Drupal's revision system.
This advisory is not covered by Drupal Steward.
Solution:Install the latest version:
- If you are using Drupal 9.3, update to Drupal 9.3.12.
All releases prior to Drupal 9.3 (including Drupal 7) are not affected.
Reported By: Fixed By:- Kristiaan Van den Eynde
- Lee Rowlands of the Drupal Security Team
- Adam Bramley
- xjm of the Drupal Security Team
- Dave Long
- Nathaniel Catchpole of the Drupal Security Team
- Jibran Ijaz
- Benji Fisher
Security advisories: Drupal core - Moderately critical - Improper input validation - SA-CORE-2022-008
Drupal core's form API has a vulnerability where certain contributed or custom modules' forms may be vulnerable to improper input validation. This could allow an attacker to inject disallowed values or overwrite data. Affected forms are uncommon, but in certain cases an attacker could alter critical or sensitive data.
We do not know of affected forms within core itself, but contributed and custom project forms could be affected. Installing this update will fix those forms.
This advisory is not covered by Drupal Steward.
Solution:Install the latest version:
- If you are using Drupal 9.3, update to Drupal 9.3.12.
- If you are using Drupal 9.2, update to Drupal 9.2.18.
All versions of Drupal 9 prior to 9.2.x are end-of-life and do not receive security coverage. Note that Drupal 8 has reached its end of life.
Drupal 7 is not affected.
Reported By: Fixed By:- xjm of the Drupal Security Team
- Alex Bronstein of the Drupal Security Team
- Dezső BICZÓ
- Lee Rowlands of the Drupal Security Team
Nonprofit Drupal posts: April Drupal for Nonprofits Chat
We are looking for an additional co-moderator for this group! Reach out to Jess or Johanna to learn more about what's involved.
Our normally scheduled call to chat about all things Drupal and nonprofits will happen TOMORROW, Thursday, April 21 at 1pm ET / 10am PT. (Convert to your local time zone.)
We don't have anything on the agenda at the moment, so we're looking to enjoy an informal chat about anything at the intersection of Drupal and nonprofits. Got something specific on your mind? Feel free to share ahead of time in our collaborative Google doc: https://nten.org/drupal/notes!
All nonprofit Drupal devs and users, regardless of experience level, are always welcome on this call.
This free call is sponsored by NTEN.org and open to everyone.
-
Join the call: https://us02web.zoom.us/j/81817469653
-
Meeting ID: 818 1746 9653
Passcode: 551681 -
One tap mobile:
+16699006833,,81817469653# US (San Jose)
+13462487799,,81817469653# US (Houston) -
Dial by your location:
+1 669 900 6833 US (San Jose)
+1 346 248 7799 US (Houston)
+1 253 215 8782 US (Tacoma)
+1 929 205 6099 US (New York)
+1 301 715 8592 US (Washington DC)
+1 312 626 6799 US (Chicago) -
Find your local number: https://us02web.zoom.us/u/kpV1o65N
-
- Follow along on Google Docs: https://nten.org/drupal/notes
- Follow along on Twitter: #npdrupal