Wim Leers: High concurrency Composer
On behalf of Acquia I’m currently working on Drupal’s next big leap: Automatic Updates & Project Browser — both are “strategic initiatives”.
In November, I started helping out the team led by Ted Bowman that’s been working on it non-stop for well over 1.5 years (!): see d.o/project/automatic_updates. It’s an enormous undertaking, with many entirely new challenges — as this post will show.
For a sense of scale: more people of Acquia’s “DAT” Drupal Acceleration Team have been working on this project than the entire original DAT/OCTO team back in 2012!
The foundation for both will be the (API-only, no UI!) package_manager module, which builds on top of the php-tuf/composer-stager library. We’re currently working hard to get that module committed to Drupal core before 10.1.0-alpha1.
Over the last few weeks, we managed to solve almost all of the remaining alpha blockers (which block the core issue that will add package_manager to Drupal core, as an alpha-experimental module. One of those was a random test failure on DrupalCI, whose failure frequency was increasing over time!
A rare random failure may be acceptable, but at this point, ~90% of test runs were failing on one or more of the dozens of Kernel tests … but always a different combination. Repeated investigations over the course of a month had not led us to the root cause. But now that the failure rate had reached new heights, we had to solve this. It brought the team’s productivity to a halt — imagine what damage this would have done to Drupal core’s progress!
A combination of prior research combined with the fact that suddenly the failure rate had gone up meant that there really could only be one explanation: this had to be a bug/race condition in Composer itself, because we were now invoking many more composer commands during test execution.
Once we changed focus to composer itself, the root cause became obvious: Composer tries to ensure the temporary directory is writable and avoids conflicts by using microtime(). That function confusingly can return the time at microsecond resolution, but defaults to mere milliseconds — see for yourself.
With sufficiently high concurrency (up to 32 concurrent invocations on DrupalCI!), two composer commands could be executed on the exact same millisecond:
// Check system temp folder for usability as it can cause weird runtime issues otherwise Silencer::call(static function () use ($io): void { $tempfile = sys_get_temp_dir() . '/temp-' . md5(microtime()); if (!(file_put_contents($tempfile, __FILE__) && (file_get_contents($tempfile) === __FILE__) && unlink($tempfile) && !file_exists($tempfile))) { $io->writeError(sprintf('PHP temp directory (%s) does not exist or is not writable to Composer. Set sys_temp_dir in your php.ini', sys_get_temp_dir())); } }); — src/Composer/Console/Application.php in Composer 2.5.4We could switch to microtime(TRUE) for microseconds (reduce collision probability 1000-fold) or hrtime() (reduce collision probability by a factor of a million). But more effective would be to avoid collisions altogether. And that’s possible: composer always runs in its own process.
Simply changing sys_get_temp_dir() . '/temp-' . md5(microtime()); to sys_get_temp_dir() . '/temp-' . getmypid() . '-' . md5(microtime()); is sufficient to safeguard against collisions when using Composer in high concurrency contexts.
So that single line change is what I proposed in a Composer PR a few days ago. Earlier today it was merged into the 2.5 branch — meaning it should ship in the next version!
Eventually we’ll be able to remove our work-around. But for now, this was one of the most interesting challenges along the way :)
Axelerant Blog: How To Run Multiple Instances Of Mautic For Marketing Automation Needs
Mautic is the world's largest free, open-source marketing software that automates marketing tasks like segmentation, lead scoring, campaigns & journey builders, and contact list management. It supports integration with all popular social media platforms like Twitter, LinkedIn, and Facebook and has integrations to connect with other marketing automation tools.
Golems GABB: A Glance at Tome - Drupal static content generator
Creating a completely static HTML website is quite a challenging process unless you use a static content generator. Tome is developed to make it as easy as possible with any site on Drupal.
Like any CMS, it provides a set of templates and automatically helps to create pages, avoiding a long and complicated manual setup. You don't even need to know Java to use it. Just a perfect match if you're creating content based on raw data and a website template set.
Static sites are perfect for SEO and SEA. Using a static content generator gives some severe benefits to your site, including better performance, a lighter backend, and multiple options for customization. Moreover, static sites are more flexible, secure, and scalable than dynamic types. Let's learn more about static website generators and Tome with our Drupal development team.
Axelerant Blog: Why Did We Choose Enthusiasm As A Core Axelerant Value
The Drop Times: Von Eaton Addresses 'Back to Work for Women'
Droptica: Drupal for professional publishing - Thunder CMS overview
Nowadays, software has become crucial for the functioning of large publishers. It supports the process of creating, publishing and distributing content, and also allows monitoring and analyzing users and market data. In the following article, we would like to introduce you to one of the available tools that improve the process of creating a website and increase the quality of daily work on content. This solution is the Thunder distribution based on Drupal CMS.
What is Thunder?Thunder is an open source content management system aimed at professional publishers. The tool is also one of Drupal's free distributions, i.e. its version enriched with additional modules and extensions, which are available out of the box and are targeted at facilitating user work in specific aspects.
In the case of Thunder, we are dealing with a tool for all kinds of publishers. Both small and large information portals, publisher websites, and even blogs can benefit from its functionalities. Popular magazines such as Elle, InStyle, and Playboy use it in everyday work. Further down the article, we'll present details about the distribution itself and some of its most interesting and useful options.
Popularity and authorsCurrently, over 800 websites report using Thunder, and the distribution itself is regularly developed and supported by the authors and users. As a result, the stability and community support for this solution are at least at a satisfactory level.
The author of Thunder is Hubert Burda Media - a German media group that has been developing this project since 2016 (the first version was released in January 2017). Their experience allowed them to tailor a tool to the needs of the industry they are members of. Thunder was designed to solve real problems and facilitate the daily work of other publishing or media companies.
Thunder download and installationThunder as a project is available at: https://www.drupal.org/project/thunder and we can find complete installation instructions in the documentation.
To install Thunder, we need a server with access to PHP, a database and Composer. The article with tips on how to generate a local development environment will help us prepare these elements.
The latest version of Thunder 6, which we recommend, is based on Drupal 9, therefore it shares the hardware requirements with it. These include: PHP in at least 7.3 version (although the recommended version is 8) and Apache in at least 2.4.7 version. In the case of the database, the values will vary depending on which database we decide to use. We can find a full list of hardware requirements in Drupal's documentation.
Once we deal with the necessary preparation, the distribution installation requires only two commands:
1. Project creation and installation
2. Quick start
And that's basically it. After following these steps, we have our first Thunder instance on the local environment ready for work.
We recommend delving deeper into the above-mentioned installation documentation available on Drupal’s website. There we’ll find more details and additional information that will help us launch a new project.
Thunder CMS - review and functionalitiesAs we mentioned above, Thunder is a distribution aimed at publishers. Its main and most commonly used functionality will therefore be the article creation window. We'll go through the process of adding content, indicating the elements that streamline and improve our work. We'll take up the topic in two parts: article creation and additional functions, in order to separate these aspects from each other.
Article creationTo Drupal users, this window may seem both familiar and foreign. The longer we look at this screen, the more we'll be surprised by the solutions not accessible in the standard version of Drupal. Let's go through all sections to see what possibilities Thunder offers us.
BASISSource: Thunder CMS
In addition to the standard Title field to complete the title, there are also several new features here.
Channel
The Channel field allows us to assign an article to one of the main channels. The list of available channels can be configured and extended at: /admin/structure/taxonomy/manage/channel/overview
This function allows us to organize the content and its purpose. In the example above, we see a standard division into events and messages. This type of solution enables us to easily and effectively distribute the content within specific channels. On our test web page, this helped us create separate subpages presenting content from these two categories.
SEO Title
This is the title that isn't visible to the user but is read by robots crawling and indexing our website. Its quality and compliance with certain rules are crucial to strengthen the web page’s position in Google or Bing search engines.
This title is also used to automatically generate the address of our article, so it's a good idea to keep it in mind and include the keywords for our content here.
This field is also enriched with a "validity indicator" oscillating between the colors: red (bad), yellow (correct), and green (good). The dynamic bar illustrates whether we stick to the set rules, such as the length of the title. This indicator updates automatically when filling out the title, so there's no need to refresh the web page.
Tags
These are the keywords that allow us to group the content. This is one of the integral elements of contemporary content creation. Thunder CMS treats this matter seriously and proposes a simple but complementary way to generate and add tags. The Tags field lets us choose the predefined tags and create new ones on the fly.
All the tags we defined are available here: /admin/structure/taxonomy/manage/tags/overview. Here we can edit, remove and add new ones.
Example of creating tags in Thunder CMS:
In addition to the name itself, tags may also contain additional, extensive information, thanks to using Paragraphs, which actions we present later in the article.
In this way, we can easily search for the prepared tag and add it to our article.
That's not all, though. If a tag is missing from the list, we don't have to leave the article editing window in order to add it. We just enter a new expression in the TAGS field, and the right tag will be created in the background.
TEASER
Teaser text
This is an introductory text that aims to familiarize the user with the topic of our article. It usually displays at the very beginning of the content and is separated from the rest of the post. Teaser text is also used as a teaser on article testing web pages and when sharing the content within such channels as Facebook and Google.
Image
Thunder CMS provides the ability to easily add and edit graphics.
First of all, we can add photo in two ways:
- We choose a photo from among the files already added to the system. Filtering them by status and the ability to search by name helps here. It's also a good way to use the graphics prepared and processed earlier by a graphic designer, and add them to the system for later convenient use of the ready files. This creates the opportunity to build our own media collection, which can be used many times in different ways, without having to fill up disk space with the same images.
- We import photos. Here we can upload a photo from our computer.
However, the possibilities don't end with adding a photo. Each image can be described by using a number of fields, such as:
- name: main name of the photo, by witch we’ll be able to search for it in the future,
- tags: created exactly on the same principle as described above,
- alternative text: photo description used by screen readers for blind people, and also important for the website's SEO,
- title: title of our photo,
- description: description of the photo and its content,
- credits: author and source, if the image doesn’t belong to us,
- expires: date indicating when the picture will no longer be valid - a field used for more complex cases, such as purchasing rights to a photo for a specific period.
An additional feature in Thunder CMS, invisible at first glance, is the ability to select a "point of focus" in the photo, symbolized by the cross icon. By clicking anywhere on the graphic, we can choose its most important point. This is used when framing and cropping the photo. By indicating this point, we can be sure that regardless of how the image is displayed, the most crucial element will always be visible.
Under the thumbnail image, we can also find a magnifier icon, which when clicked will show us how the photo will be displayed in various cases:
PARAGRAPHS
Paragraphs are a key functionality used to build an article. It's a system for creating content using separate blocks (paragraphs) that can be one of many types of content. All paragraphs - once added - we can freely edit and change their order, like laying "blocks" of various types.
The basic paragraphs built into Thunder CMS, from which we may build an article, are:
1. Text
The fundamental tool for writing the content itself. With the support of the extremely popular CKEditor module it becomes an extensive editor that meets even complex requirements.
For more advanced users, it's also possible to edit content directly in the HTML code field:
2. Image
The option of adding and editing a photo that works on exactly the same principle as we described above in the TEASER section.
3. Gallery
It allows creating photo galleries. The process itself is very simple and similar to what was presented above in the image section. The only difference here is the ability to add many photos at once.
An example of adding a photo gallery in Thunder CMS:
The gallery created in this way will be displayed on the web page in the form of a slider, with the possibility to switch photos, as in the picture below:
4. Instagram
In this field, we can provide the URL of an Instagram post to embed on the website. Unfortunately, using this option requires additional work from us. For security reasons and due to the requirements arising from Meta's policy, authentication is necessary. We can do this by completing the configuration: /admin/config/media/instagram-settings.
It's required to create an appropriate account here to obtain the indicated data. We can find full configuration instructions on the official Facebook documentation web page.
5. Twitter
The field for embedding Twitter posts. Unlike Instagram, it works straight away and doesn't require any additional actions.
6. Pinterest
As with Twitter, in this field we embed a link to a Pinterest post.
7. Video
As with the photo editor, we have the ability to select a previously added movie from the media library or create a new video.
When adding a new video, we can also insert it using a link from portals such as YouTube, Vimeo, or Tiktok. Such a movie, depending on the selected source, is embedded on the web page with the appropriate player.
8. Link
This field lets us insert a link with an optional anchor text. It should be displayed as:
9. Quote
This option allows for creating a quote.
Note that we mentioned above only those paragraphs that are built directly into the Thunder distribution. They fulfill most of the basic needs arising from creating an article. However, the system itself doesn't limit us to using these options only.
For more advanced users or developers, Thunder CMS makes it possible to build custom paragraphs that meet any requirements. Thus, this tool in the right hands is extremely powerful, and the number of possibilities - is virtually unlimited.
Publication optionsAnother important element of any content creation tool is the ability to configure and manage the publication. Thunder CMS also provides us with extensive and adjustable functions here.
What catches our eye is the publication bar "fixed" to the bottom of the screen.
With its help, we're able to save or delete the article at any time, as well as change its status to one of the following:
- draft: rough version, not visible to users,
- unpublished: finished but unpublished article, not visible to users,
- published: published article available to everyone.
Another vital element is the side menu for more complex operations.
Here we can find information about the date of the last saved version of the document, the possibility of creating a new revision during saving, or leaving information when making such a revision.
Let's stop for a moment to take a look at the concept of revision. What does it mean? Thunder, by default, provides versioning for every change in our article. Using the REVISIONS item in the menu, we are able to view all saved versions of our document:
It allows us to compare the differences between versions and restore previous versions.
This is a handy and simple solution ensuring that no changes will be lost, and in case of any mistake, it'll be easy to restore the last correct version of our website.
Among the available options of our sidebar, we can also find:
- Meta tags: an extensive tool enabling customization of the default meta values of our website. A beneficial and comprehensive solution for SEO specialists.
- Simple XML Sitemap: the configurations concerning the website regarding its existence within the sitemap. We can decide here whether the article is to be indexed and what priority it should have. And yes – Thunder includes an automatically generated XML sitemap by default.
- URL alias: as we mentioned above, the alias of our website is automatically generated based on the SEO title, but to leave us complete freedom and configurability, Thunder’s creators also allow editing the alias from this position.
- URL redirects: enables creating and managing the redirections on our website.
- Scheduling options: an extremely useful option that allows scheduling the article publication. From here, we can also set the end date of the publication - this option can be helpful, for example, in the case of a sponsored article, which is to be displayed on our website only for a certain time period.
- Authoring information: fully editable information about the author and the creation date of the article.
This concludes our adventure with the article creation window. It’s an essential part of Thunder CMS and the place where editors and content creators spend the most time. The comprehensive solution proposed by Thunder is one of the best on the market because it combines ease of use with the complexity of possibilities.
In addition to the core Thunder’s functionality, i.e. the editor, with which we spend most of our time, this system also has a number of other useful elements. We would like to present some of these and show you how to use them.
Mobile previewThe creators of Thunder are aware that we live in a world dominated by mobile devices. Therefore, they provide us with a content management system which allows us to check whether articles display properly on smartphones and tablets.
When logging in as an administrator, we can find a phone icon in the admin bar anywhere on the web page. Clicking it allows us to select the model of a mobile device for simulation. As a result, our website will go into mobile version inspection mode, visible only to us. It's a great and simple tool that enables finding any irregularities on our web page in the blink of an eye.
Liveblog
The name of this module already describes its use. Liveblog allows us to create dynamic, real-time changing articles. It's an ideal solution for reporting sports events or dynamically evolving crisis situations. There are many ways to use it, and we're sure that already while reading this paragraph, you'll come up with at least a few new ones.
Demo Content and Guided TourBy installing these additional modules (they are already included with the system, we only need to turn them on), we get Thunder with basic configuration and sample content. This allows us to get used to the system faster and understand specific dependencies. All screenshots in this article come from Demo Content. In addition, the admin bar is enriched with the Tour icon, and after clicking it, we're guided through the possibilities and functionalities of Thunder. It's a great way to start the adventure with this system.
One of our projects created with Thunder is the website of the Pomeranian regional portal Zawsze Pomorze. The client wanted an easy-to-use, yet a sufficiently extensive system that would allow many journalists to work on several articles at the same time and to manage the publication efficiently.
The website includes an extensive category system, allows for leaving comments, creating "live" articles, and has a complex system of adding and editing sections for individual categories on the home page. The layout can be dynamically edited without any technical knowledge. The system also includes a window for supporting the authors with donations, visible directly on the article page.
Thunder CMS review – summaryFrom the developers’ perspective, we have to admit that working on projects using Thunder is extremely pleasant. The number of possibilities this tool provides out of the box meets most of the requirements. As programmers, we can create and develop CMS systems for media and publishers, focusing only on individual needs and solutions. This greatly shortens the development process and allows building even large-sized websites in a relatively short time.
From the publisher point of view, it's also a very decent system that meets many needs. It maintains the perfect balance between the number of possibilities and their simplicity of use - we are never overwhelmed with a large number of often redundant options. The reduced development time also allows investing in additional functionalities, as the very core on which Thunder is based is a robust and comprehensive solution.
Chromatic Insights: Why is Drupal 7's End-of-Life a Big Deal?
Drupal Association blog: The Drupal Association Supports ICFOSS/Zyxware Back-to-work Programme
The Drupal Association is honored to be included in this month’s cycle of the Back-to-work Programme, an initiative by the International Centre for Free and Open Source Software in collaboration with Zyxware Technologies. Zyxware Technologies is one of our amazing Drupal Certified Partners, and we are excited to contribute to the success of this program for many cycles to come.
The Back-to-work Programme provides Drupal training to women professionals who have been on a career break due to various reasons. This program not only aims to induct them into the talent pool of Drupal developers but also provides an opportunity to reintroduce them to the Free Software community.
The Drupal Association is committed to ensuring that the Open Web thrives and to providing talent and education opportunities to communities who need them most. It is our hope that by supporting ICFOSS, Zyxware, and the Back-to-work Programme, we can continue to expand access to the Drupal community and professional opportunities in the Drupal ecosystem and empower women everywhere in their pursuit of professional equity.
Von R. Eaton, Director, Programs for the Drupal Association, will present to this current cohort on the work being done at the Drupal Association in Open Source, DEI, and talent cultivation on Thursday, 16 March.
We are so excited about this collaboration and are very grateful to have been invited to participate. We look forward to working with Zyxware and ICFOSS to make a positive impact on women in the Drupal community.
Jacob Rockowitz: Providing JSON:API and GraphQL support for the Schema.org Blueprints module
The Schema.org Blueprints module builds content models based on Schema.org's specification for structured data. The generated Schema.org content models are understandable, shareable, and reusable by people, machines, and search engines. To share these content models, we need to expose our data using an API. This post will explore reasonable recommendations for exposing our Schema.org based content inside Drupal to decoupled front-ends and machines.
Currently, in the Drupal community there are two popular API specifications/web services implementations: JSON:API and GraphQL. JSON:API is included in Drupal core and GraphQL is built and maintained as a contributed module. To understand the current state of these different web services implementations, it helps to look back at the history of the decision to include JSON:API in Drupal core and why GraphQL is a contributed module.
In 2019, Dries Buytaert, Drupal's project lead, thoroughly compared REST vs JSON:API vs GraphQL. Dries summarizes the goal of the post.
Dries' conclusion led to the JSON:API module being added to Drupal core.
Philipp Melab, for Amazee Labs, wrote a thoughtful response re-examining the value of GraphQL even though it is not included in Drupal core.
One of Philipp's concerns about exposing Drupal data structure via JSON:API is that the API will contain a lot of Drupal'ism.
Philipp ends his response by stating.
The decision to include JSON:API into Drupal core is very sound. As a backend developer, I found...Read More
Security advisories: Drupal core - Moderately critical - Access bypass - SA-CORE-2023-004
Drupal core provides a page that outputs the markup from phpinfo() to assist with diagnosing PHP configuration.
If an attacker was able to achieve an XSS exploit against a privileged user, they may be able to use the phpinfo page to access sensitive information that could be used to escalate the attack.
This vulnerability is mitigated by the fact that a successful XSS exploit is required in order to exploit it.
Solution:Install the latest version:
- If you are using Drupal 10.0, update to Drupal 10.0.5.
- If you are using Drupal 9.5, update to Drupal 9.5.5.
- If you are using Drupal 9.4, update to Drupal 9.4.12.
- If you are using Drupal 7, update to Drupal 7.95.
All versions of Drupal 9 prior to 9.4.x are end-of-life and do not receive security coverage. Note that Drupal 8 has reached its end of life.
Reported By: Fixed By:- Damien McKenna of the Drupal Security Team
- Elar Lang
- Lee Rowlands of the Drupal Security Team
- Alex Bronstein of the Drupal Security Team
- Joseph Zhao Provisional Member of the Drupal Security Team
- Drew Webber of the Drupal Security Team
- Jen Lampton Provisional Member of the Drupal Security Team
- Nate Lampton
- Greg Knaddison of the Drupal Security Team
Security advisories: Drupal core - Moderately critical - Information Disclosure - SA-CORE-2023-003
The language module provides a Language switcher block which can be placed to provide links to quickly switch between different languages.
The URL of unpublished translations may be disclosed. When used in conjunction with a module like Pathauto, this may reveal the title of unpublished content.
This advisory is not covered by Drupal Steward.
Solution:Install the latest version:
- If you are using Drupal 10.0, update to Drupal 10.0.5.
- If you are using Drupal 9.5, update to Drupal 9.5.5.
- If you are using Drupal 9.4, update to Drupal 9.4.12.
All versions of Drupal 9 prior to 9.4.x are end-of-life and do not receive security coverage. Note that Drupal 8 has reached its end of life.
Drupal 7 core does not include the Language module and therefore is not affected. The contributed modules for translation do not have the same code for language-switching links, so they are not affected, either.
Reported By: Fixed By:- Jan Kellermann
- Lee Rowlands of the Drupal Security Team
- Greg Knaddison of the Drupal Security Team
- Benji Fisher of the Drupal Security Team
- Jess of the Drupal Security Team
- Sascha Grossenbacher
- Neil Drumm of the Drupal Security Team
- Dave Long of the Drupal Security Team
Security advisories: Drupal core - Moderately critical - Information Disclosure - SA-CORE-2023-002
The Media module does not properly check entity access in some circumstances. This may result in users seeing thumbnails of media items they do not have access to, including for private files.
This release was coordinated with SA-CONTRIB-2023-010.
This advisory is not covered by Drupal Steward.
Solution:Install the latest version:
- If you are using Drupal 10.0, update to Drupal 10.0.5.
- If you are using Drupal 9.5, update to Drupal 9.5.5.
- If you are using Drupal 9.4, update to Drupal 9.4.12.
All versions of Drupal 9 prior to 9.4.x are end-of-life and do not receive security coverage. Note that Drupal 8 has reached its end of life.
Drupal 7 core does not include the Media Library module and therefore is not affected.
Reported By: Fixed By:- Lee Rowlands of the Drupal Security Team
- James Williams
- Jess of the Drupal Security Team
- Dave Long of the Drupal Security Team
- Dan Flanagan
- Jen Lampton Provisional Member of the Drupal Security Team
- Joseph Zhao Provisional Member of the Drupal Security Team
- Benji Fisher of the Drupal Security Team
Nonprofit Drupal posts: March Drupal for Nonprofits Chat
Join us on Thursday, March 16 at 1pm ET / 10am PT, for our regularly scheduled call to chat about all things Drupal and nonprofits. (Convert to your local time zone.)
No pre-defined topics on the agenda this month, so join us for 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
Community Working Group posts: Call for creators for crafting future Aaron Winborn Awards
The Drupal Community Working Group started the Aaron Winborn Awards in 2015 with the support of the Drupal Association, in honor of long-time Drupal contributor Aaron Winborn (see his Community Spotlight), who lost his battle with Amyotrophic lateral sclerosis (ALS (also referred to as Lou Gehrig's Disease in the US and Motor Neuron Disease in the UK) in early 2015.
A few years ago, during our preparations for the 2018 Aaron Winborn Award, we had the idea that the award would be created by a community member. Rachel Lawson, a former member of the Drupal Community Working Group's conflict resolution team, created hand-blown glass awards for both the 2018 and 2019 winners, Kevin Thull and Leslie Glynn.
In 2020 and 2021, Bo Shipley hand-crafted the award from leather for Baddý Breidert and AmyJune Hineline.
Last year in 2022, the award was crafted for Angie Byron by Caroline Achee and her husband, Louis Achee. Both Caroline and Louis are woodworkers, and often donate their time and skills to community-focused organizations in their local area.
We are looking for community members to volunteer their time and show off their skills for the 2023 Aaron Winborn Award.
We would like to have a design idea or commitment by March 31st (or sooner).
The deadline for this year’s award to be ready by May 22, 2023.
If you are interested in crafting this year’s award (or any following year), please reach out to the Drupal Community Working Group.
Community Working Group posts: Nominations are now open for the 2023 Aaron Winborn Award
The Drupal Community Working Group is pleased to announce that nominations for the 2023 Aaron Winborn Award are now open.
This annual award recognizes an individual who demonstrates personal integrity, kindness, and above-and-beyond commitment to the Drupal community. It includes a scholarship and travel stipend for the winner to attend DrupalCon North America and recognition in a plenary session at the event.
Nominations are open to all Drupal community members*, including but not limited to people who have made a big impact in their local or regional community. If you know of someone who has made a big difference to any number of people in our community, we want to hear about it.
This award was created in honor of long-time Drupal contributor Aaron Winborn, whose battle with Amyotrophic lateral sclerosis, or ALS (also referred to as Lou Gehrig's Disease) came to an end on March 24, 2015. Based on a suggestion by Hans Riemenschneider, the Community Working Group, with the support of the Drupal Association, launched the Aaron Winborn Award.
Nominations are open until Friday, March 25, 2022. A committee consisting of the Community Working Group members (Conflict Resolution Team) as well as past award winners will select a winner from the nominations.
* Current members of the CWG Conflict Resolution Team and previous winners are not eligible for winning the award.
Previous winners of the award are:
2015: Cathy Theys https://www.drupal.org/u/yesct
2016: Gábor Hojtsy https://www.drupal.org/u/gábor-hojtsy
2017: Nikki Stevens https://www.drupal.org/u/drnikki
2018: Kevin Thull https://www.drupal.org/u/kthull
2019: Leslie Glynn https://www.drupal.org/u/leslieg
2020: Baddý Breidert https://www.drupal.org/u/baddysonja
2021: AmyJune Hineline https://www.drupal.org/u/volkswagenchick
2022: Angie Byron https://www.drupal.org/u/webchick
Now is your chance to show, support and recognize an amazing community member!
If you know someone amazing who should benefit from this award please submit a nomination.
Also, if you are a creator and would like to help craft one of our future Aaron Winborn Awards, please reach out to the Drupal Community Working group.
Matt Glaman: PHPStan's new @not-deprecated annotation
The PHPStan 1.10.3 release shipped with a new @not-deprecated annotation! This is a great utility, and I am very thankful to stof for contributing this to PHPStan. This annotation fixes an issue I reported in June 2022 during our massive Drupal 10 readiness initiative.
Drupal core deprecated assertion methods in PHPUnit test classes. A handful of modules decided to replace the method under the same name. PHPStan would find the method, detect the original method was deprecated, and report errors on that method's usage. There was no way to say: "Wait, trust me, this isn't deprecated. I know what I'm doing!" The only approach was to use an inline comment or add the error message to the ignored error setting.
If you scan the Address module, you'll get an error like the following:
The Drop Times: Just Keep Showing Up, and the Job Is Yours: Chris Wells | DrupalCamp NJ
Specbee: Mastering Drupal 9 Layout Builder: A Comprehensive Guide to Effortlessly Customize Your Website's Design
When it comes to page building, site builders, content authors, and content editors are constantly on the lookout for a smooth, user-friendly experience. When they wish to design and construct pages, they expect to use drag-and-drop and CKEditor technologies. This identical experience is provided by Drupal Layout Builder's simple page construction functionality in the Drupal core.
The distinctive Drupal Layout Builder offers a potent visual design tool to let content authors alter how content is presented. Layout Builder, which was added to Drupal core in its most recent version, Drupal 9 enables you to add/remove sections to show the content using various layouts and customize your pages according to what you need. With Drupal 9's Layout Builder Module, you can mix these sections to make a completely unique page.
There are two different ways to use the Drupal 9 Layout Builder: Layout Defaults (to design a layout for all the content of the content type) and Layout Overrides (to design a layout for the specific content item). You may learn more about and get started using the Drupal 9 Layout Builder module with the help of this blog.
Watch out for our next article on this series where we dive into using the layout builder and Ctools module to apply view mode patterns!
Introducing the Layout BuilderYou can change how entities like content types, taxonomies, users, and more look by using the Drupal 9 Layout Builder module. Site builders may easily drag and drop blocks, fields, and other elements into place using this feature.
By providing a preview of the changes made as you design your layouts, the layout builder module in Drupal 9 facilitates the layout-building process. The layout builder in Drupal 9 enables previews of the changes made for a smooth layout creation experience rather than requiring users to save every tiny modification they make to the layout and then look it up on the front end.
The layout builder has two modules:
Layout Discovery - Gives modules or themes a means to register layouts.
Layout Builder - Enables users to directly add and organize blocks and content fields on the content.
When designing a layout, Layout Builder uses two key ideas:
Sections - Columns or containers where blocks can be placed. For example, it could be a 2-column layout or a 3-column layout, etc.
Blocks - Content elements that can be placed in sections.
Layout Builder module installation and configurationGo to Extend and activate the Layout Builder and Layout Discovery modules to install and configure the Drupal 9 layout builder module.
Modify the Content Type and TaxonomyOnce the module has been installed, go to Structure, Content types, and select "Manage display" for any content type. For this example, we'll use the "article" content type.
Click the Layout options drop-down menu at the bottom to select "Use Layout Builder," then click Save.
Field formatters are replaced with a "Manage layout" option after Layout Builder is activated in the view mode. Each of the available view modes can be used with Layout Builder.
You will be taken to the article content type layout when you click "Manage layout."
Insert Sections into the LayoutRemove the default section before adding any more ones to the layout builder. Select the "close" button (as depicted in the below screenshot). Also, a button to remove the default section will be available to you on the right side of your screen. Then select "Remove."
By selecting the "Add Section" option, let's add a few sections to our layout. On the right side of the screen, options will also be offered to you so that you can select a layout for your section. For now, let's pick the "Two Column Section."
You will be given the option to select the "Two Column Layout” width. For now, let's choose a "67%/33%". Next, select "Add section."
After being added, each section region should display an "Add Block" link.
Insert Blocks into the Section RegionsYou can add blocks to your area after selecting it for the layout. Simply click "Add Block" and the "Choose a block" option will slide out from the right when you want to add a block.
Selecting a blockJust clicking on the blocks in the right column will choose them. Using the "Filter by block name" text field, you can even locate blocks by filtering out the search based on their names.
For now, we'll choose the "Body" content field.
The field formatter will allow you to make changes when you click on the block you want to add. Click "Add Block" after configuring the formatter.
On the left side of the block, there will be a "Body" content area.
The "Body" field has been added; now save your changes. By selecting "Save Layout" from the menu at the top of the Drupal 9 layout page, you can save all the changes you've made to your section.
To further personalize our layout builder, let's try adding a few more fields to our design.
When you visit a page with article content type after saving this layout, you will be able to see a preview of the layout you just created.
Layout Overrides:The layout we just created will work for all of the articles. Drupal has a number of settings that must be enabled in order to create a custom layout for a certain article. To do this, select "Allow each content item to have its layout customized".
If you visit an article after activating this option, a Layout tab button will be visible.
With the same interface, the layout may now be changed. This, however, will only alter the design of this one piece of content.
Now let's add a block to this page. Create a new one-column section and click the "Add Block" button. Consider the case when we wish to show recently edited content from other users on this page, Filter off the "Recent content" block when adding a new block, then customize it to your needs before saving the layout.
Eventually, when we've included the most recent article block, our page will appear like this.
Important: If you've changed the layout of a single entity, you won't be able to disable the Layout Builder.
You can only update the layout options once you've reset all altered layouts to their original settings.
Layout Builder from CodeWhen it comes to GUI management, Drupal Layout Builder is undoubtedly amazing. The programming problems you deal with while using the tool on a regular basis, nevertheless, might be a little more difficult. Now, you might ask how to use Layout Builder using code.
It turns out that it's rather simple to enable and disable templates for a single entity.
Simply load the display using the following code:
$entityViewDisplay = \Drupal::entityTypeManager- >getStorage('entity_view_display')- >load('ENTITY_TYPE.ENTITY_BUNDLE.VIEW_MODE');It will then return an object of the type LayoutBuilderEntityViewDisplay, which you must then change as follows:
$entityViewDisplay->enableLayoutBuilder();If you wish to additionally set the flag or activate the Layout Builder for a specific view mode:
$entityViewDisplay->setOverridable(TRUE);to enable the creation of unique layouts for a single entity.
After that, you must save everything.
$entityViewDisplay->save();What actually occurs in the background is that the Layout Builder module adds the layout_builder_key to the third_party_settings of a certain entity type, with values for the parameters described above (enabled, allow custom), and then stores the default layout for this type of entity under sections.
A new entity field named layout_builder__layout is created and used to hold the updated layout for this specific entity if the setOverridable option is set to TRUE.
Contrarily, it takes a little more work to create a section using code and populate it with relevant content.
Starting off, let's add a new section. The layout_id parameter, which serves as a layout identifier, must be included when creating a new instance of the \Drupal\layout_builder\Section class in order to accomplish this.
Protip: The layout discovery module contains the default templates. Layouts are defined in *.layouts.yml files. For more detailed information, please check out the following article on how to create custom layouts in drupal.
Then, adding a new element directly to the section would be the simplest course of action. To do this, use the appendComponent method, which accepts an instance of the \Drupal\layout_builder\SectionComponent class as an argument. Nevertheless, before you can develop such a section component, you must first arrange a few things. To start, you will require:
- the uuid of the embedded element,
- the name of the region in the section,
- plugin configuration.
In this tutorial, we'll embed a sample node in a single-column section using the plugin supplied by Entity Blocks:
$section = new Section('layout_onecol'); $uuid = $node->uuid(); $region = 'content'; $pluginConfiguration = [ 'id' => 'entity_block:node', 'provider' => 'entity_block', 'label_display' => FALSE, 'view_mode' => 'default', 'entity' => $node->id(), ]; $component = new SectionComponent($uuid, $region, $pluginConfiguration); $section->appendComponent($component);Always keep in mind that layouts are saved in third-party settings or a field; therefore, in order to save the section, you must do so in one of these locations.
In our case, a field is being used, so:
$entity->layout_builder__layout->setValue($section); $entity->save();You have now added a single column section to an entity and shown an example node in it by following all of these steps.
You may also be interested in Improving Drupal's Layout Builder Experience.
Layout Builder Pros and ConsWe've compiled a brief list of some advantages and disadvantages of Layout Builder below:
Pros:- Deployment is simple because there is no need to add new entity types because the module is already included in the core.
- User-friendly UI with drag-and-drop capabilities.
- Choices for individual entity customization.
- A simple method for combining fields with other entities without the need to add more reference fields.
- A simple method of leveraging entity blocks to embed existing entities.
- New entity types and embeddable elements add to the website's size, which significantly lengthens the time it takes for all items to load.
- The module is UI-focused, so creating new layouts might be simpler. Right now, we have to write code to generate.yml files and templates.
- Dragging elements between sections can be a little challenging when there are many parts in the layout.
- Twig's names are suffixed with uuid, making it challenging to render a specified section and restricting access to sections.
The Drupal Layout Builder opens us to a wide range of intriguing possibilities for managing layouts through both user interface and code. Will it replace all current solutions?
It is the ideal tool, in my opinion, for dealing with the layout issue on a large scale. It seems like the best course of action would be to use widely used modules like Paragraphs and Field Group to create closed components, and then Layout Builder to create pre-made layouts composed of these components.
Layout Builder has a unique purpose, much like every other Drupal module. As a result, it will always perform better in some situations while performing substantially worse in others. Check it out for yourself!
If you’re looking for experts to help you out with anything Drupal, we’re just an email away!
Author: Mustakim Farooqui
Meet Mustakim Farooqui, Drupal Developer, and our own Chess master. He dreams of visiting Europe and enjoys reading novels and tech articles. When not working, you can find him with a game of chess, solving puzzles, or checking out new Linux distros. Give him a strong cup of coffee and he’ll set sail for anything!
Email Address Subscribe Leave this field blank Drupal 9 Drupal Module Drupal 9 Module Web Development Drupal Development Drupal PlanetLeave us a Comment
Recent Blogs Image Mastering Drupal 9 Layout Builder: A Comprehensive Guide to Effortlessly Customize Your Website's Design Image How to Efficiently Fetch Drupal Reference Entities in Custom Modules Image Finding Balance - Santhosh Kumar's Parallel Worlds Want to extract the maximum out of Drupal? TALK TO US Featured Case StudiesUpgrading the web presence of IEEE Information Theory Society, the most trusted voice for advanced technology
ExploreA Drupal powered multi-site, multi-lingual platform to enable a unified user experience at SEMI
ExploreGreat Southern Homes, one of the fastest growing home builders in the US, sees greater results with Drupal
Explore View all Case StudiesTalking Drupal: Talking Drupal #390 - Employee Owned Companies
Today we are talking about Employee Owned Companies with Seth Brown.
For show notes visit: www.talkingDrupal.com/390
Topics- What is employee ownership
- Why did Lullabot choose this path
- What is the process
- Other examples
- Has it improved the culture
- Are employees more engaged
- Retirement
- Why don’t more companies do this
- Favorite part of working at an employee owned company
- Least favorite part of working at an employee owned company
- Favorite part as CEO
- Does it reduce pressure
- Tugboat / Drupalize.me
- How to get started
- Lullabot.com
- Planted game
- Employ owned companies
- Stake in the outcome by Jack Stack
Seth Brown - https://www.lullabot.com/about/seth-brown
HostsNic Laflin - www.nLighteneddevelopment.com @nicxvan John Picozzi - www.epam.com @johnpicozzi Jacob Rockowitz - www.jrockowitz.com @jrockowitz
MOTW CorrespondentMartin Anderson-Clutz - @mandclu Entity Registration Allows users on your Drupal site to register for events as an example, but really anything that’s an entity.