drupal

Droptica: Best Practices for Drupal Caching and How to Deal with Caching Issues

Image removed.

Efficient caching in Drupal significantly boosts performance, ensuring fast load times and a smooth user experience. However, misconfigured caching can lead to stale content, broken functionalities, or unnecessary server load. In this article, we’ll explore best practices for Drupal caching and how to effectively troubleshoot common caching issues.

Wim Leers: XB week 30: HTML comments

It’s been a while since there was a screenshotless for Experience Builder (XB) week overview, but this is one of those. Solely adding more infrastructure and evolving existing ones.

You may recall that last week, a “Publish” button was introduced that was supposed to be short-lived. It’s still around, but the server-side support for the intended UX did land this week: Ted “tedbow” Bowman and Lee “larowlan” Rowlands expanded XB’s internal HTTP API to be able to publish all auto-saved entities. In a future blog post, you’ll get to see the UX this enables!

Two weeks ago we added the Page content entity type for landing pages. We described the rationale for this more tightly controlled content entity type. We already ensured it integrates with the Metatag module, and this week Matt “mglaman” Glaman landed another step: he added a (media) image base field for SEO purposes.

On the client side, Bálint “balintbrews” Kléri and Ben “bnjmnm” Mullins refactored the foundations of XB’s Redux-integrated field widgets (which allows XB’s semi-real-time previews) into presentational components and behavioral wrappers, enabling those presentational components to be used elsewhere in the UI, not just in field widgets.

Missed a prior week? See all posts tagged Experience Builder.

Goal: make it possible to follow high-level progress by reading ~5 minutes/week. I hope this empowers more people to contribute when their unique skills can best be put to use!

For more detail, join the #experience-builder Slack channel. Check out the pinned items at the top!

Accurate previews thanks to HTML comments

Our intent is to eventually have actual real-time previews with in-place editing wherever possible (see #3453690: [META] Real-time preview: supporting back-end infrastructure for details), which requires knowing where in the DOM which component inputs appear. In Single Directory Components (SDC) terminology: where which props appear.
And before that, something far simpler: where component instances themselves begin and end. Otherwise, XB wouldn’t be able to know what hovered or selected HTML corresponds to which component instance in the XB component tree!

An important step towards landed this week thanks to Lee, Jesse Baker and Dave “longwave” Long: a Twig extension is now wrapping:

  • rendered SDCs in <!-- xb-start-{{UUID}} --> + <!-- xb-end-{{UUID}} --> comments
  • SDC props in <!-- xb-prop-start-{{prop name}} --> + <!-- xb-prop-end-{{prop name}} -->
  • SDC slots in  <!-- xb-slot-start-{{slot name}}--><!-- xb-slot-end-{{slot name}} --> comments.

Why comments? Why not use SDC’s native data-component-id attribute? 🤔

That last question is the easiest one to answer: while SDC’s Twig extension indeed is adding that data- attribute1, this is not reliable, because SDCs are not guaranteed to have an attributes prop, and even if they do, it’s not enforced that it’s applied to the SDC’s outermost tag.2
If XB were to rely on this, it’d result in some SDCs being either incorrectly highlighted by XB’s UI, or even impossible to highlight.

Plus, 4 weeks ago XB introduced the concept of ComponentSource plugins, so we need a mechanism that can be implemented by any source of components, an SDC-only solution is a partial solution.

The intuitive (and naïve) answer might be: “well, just add the necessary wrapping markup!” — but this would break the preview! 😅 The preview MUST NOT use any additional markup: CSS selectors would no longer match, JS (think Drupal.behaviors.*) would have to be made aware of multiple possible structures, and so on.

That’s how we arrive at HTML Comments as the solution outlined by Jesse six months earlier: it can work for any ComponentSource plugin, and it doesn’t interfere with the components’ CSS and JS. And actually … XB does use the naïve but wrong approach of using a wrapper element: we couldn’t wait for all this infrastructure to exist, so now we’ll have to refactor that away.

Fun fact: I used this a decade ago for similar reasons in my renderviz proof-of-concept! 🤓

Grab bag

We noticed that tests are failing on Drupal 11.0. This is because XB added a ComponentSource plugin to support block plugins, and Drupal core only made Block plugins’ settings fully validatable in 11.1! Dave, Lauri “lauriii” Timmanee, Jesse and I solved it  by making XB require not any version of Drupal 11, but Drupal 11.1 or newer, while still retaining support for Drupal 10.4.
That means XB needs to do some backwards compatibility work for Drupal 10.4 support, but when testing against the latest and greatest version of Drupal core, XB takes full advantage of what it offers.

Week 30 was December 2–8, 2024.

  • 1

    It’s adding it in  \Drupal\Core\Template\ComponentsTwigExtension::mergeAdditionalRenderContext().

  • 2

    Pierre “pdureau” Dureau’s research shows that ~87% of the SDCs across a wide range of contributed Drupal themes use the attributes prop. That means that XB relying on this SDC infrastructure would inevitably lead to a frustrating experience with some SDCs “inexplicably” not working in XB.

drunomics: Eine Reise zu mehr Nachhaltigkeit und Teambuilding

A Journey Towards Sustainability and Team Building Image removed.jurgen.thano Fri, 07/05/2024 - 15:15 The drunomics team gathered for an event full of excitement and inspiration in Burgas, Bulgaria. From bonding activities to insightful discussions and workshops, it was a day full of energy and enthusiasm. Want to know more? Our blog post covers all the key moments and takeaways from this fantastic day!

Metadrop: Metadrop February 2025: Security reinforcements, dark mode expansion & Open Source innovation

February was a month of significant advancements, with a focus on security, accessibility, performance, and open-source contributions. Our clients benefited from the implementation of dark mode, proactive security measuresnew Drupal modules and features, and improvements in AI-driven automation.

This report highlights key improvements that enhanced the security, usability, and efficiency of the platforms we support, as well as the next steps to continue delivering value.

Major accomplishments

Dark mode implementation for Syensqo

To enhance usability and accessibility, Syensqo and its network of sites now support dark mode:

  • CDM USA: A platform serving US-based space and defense customers.
  • Syensqo Fund: Supporting education, sustainability, and innovation initiatives.

Talking Drupal: Talking Drupal #493 - Drupal Developer Survey

Today we are talking about The Drupal Developer Survey, Last year's results, and How it helps Drupal with guest Mike Richardson. We’ll also cover HTMX as our module of the week.

For show notes visit: https://www.talkingDrupal.com/493

Topics
  • What is the Drupal Developer Survey
  • How often does it come out
  • How did it come to be
  • What type of information does it collect
  • Do you look at other surveys
  • What were some of the most interesting stats last year
  • Core contributors
  • How do you expect last year to compare to this year
  • Do you think the outlook will be more positive with Drupal CMS
  • Drop off in Drupal 7
  • Home users
  • DDEV usage
  • AI questions
  • Security questions
Resources Guests

Mike Richardson - Ironstar Dev Survey richo_au

Hosts

Nic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Andrew Berry - lullabot.com deviantintegral

MOTW Correspondent

Martin Anderson-Clutz - mandclu.com mandclu

  • Brief description:
    • Have you ever wanted to replace Drupal’s AJAX capabilities with a lightweight library that has no additional dependencies? There’s a module for that.
  • Module name/project name:
  • Brief history
    • How old: created in May 2023 by wouters_f though recent releases are by fathershawn of Memorial Sloan Kettering Cancer Center
    • Versions available: 1.3.5 and 1.4.0, both of which support Drupal 10.3 and 11
  • Maintainership
    • Actively maintained, latest release less than a month ago
    • Security coverage
    • Test coverage
    • Documentation included in the repo as well as online
    • Number of open issues: 3 open issues, 1 of which is a bug
  • Usage stats:
    • 92 sites
  • Module features and usage
    • To use HTMX, you need to attach the library to the render array of one or more elements where you want to use it, and then add data attributes to your render array that indicate how you want HTMX to react to user behaviour
    • HTMX can help make your Drupal sites more interactive by dynamically loading or reloading parts of a page, giving it a more “application-like” user experience
    • There is a planning issue to discuss gradually replace Drupal’s current AJAX system with HTMX, and a related Proof Of Concept showing how that could work with an existing Drupal admin form
    • A number of elements in the current AJAX system also rely on jQuery, so adopting HTMX would also help to phase out jQuery in core. HTMX is also significantly more lightweight than JS frameworks like React
    • HTMX is really a developer-oriented project, which is why I thought it would be appropriate for this week’s episode

Nonprofit Drupal posts: March Drupal for Nonprofits Chat

Join us THURSDAY, March 20 at 1pm ET / 10am PT, for our regularly scheduled call to chat about all things Drupal and nonprofits. (Convert to your local time zone.)

We don't have anything specific on the agenda this month, so we'll have plenty of time to discuss anything that's on our minds at the intersection of Drupal and nonprofits.  Got something specific you want to talk about? 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

View notes of previous months' calls.

The Drop Times: Time to Evolve

This past week, the Drupal community was stirred by an open letter from Josh Koenig, Co-Founder of Pantheon, challenging Drupal’s positioning in the modern digital space. Koenig argues that Drupal must move beyond the traditional Digital Experience Platform (DXP) model and redefine itself as an "agile business driver"—a tool that empowers digital teams with flexibility and control without vendor lock-in.  

His perspective has ignited discussions on Drupal’s future, especially with DrupalCon Atlanta 2025 on the horizon. Is Drupal evolving fast enough to meet the needs of enterprise users? Should it shift focus to adaptability rather than chasing competitors? These questions are at the heart of Drupal’s next chapter.

Such debates and diverse perspectives are vital for open-source initiatives like Drupal, which rely on community-driven evolution. It is up to the community to pay heed, introspect, and ensure that Drupal continues to thrive—rather than risk fading into obscurity.  

Let's have a look at last week's important stories.

Happy reading,  
Thomas Alias K,
Sub Editor, 
The Drop Times

Interview

Discover Drupal

Events

Organization News

DDEV Blog: Thanks to our Amazing Sponsors!

Image removed.

Thank you!

We just want to take a moment to thank all of the amazing sponsors of the DDEV open source project. All of you reading this know that we've been working for years now to make DDEV a financially sustainable project, so it can serve you into the future. So many have responded to that call. Thank you!

Even though we're going to mention the biggest sponsors first, we want all of you to know that your sponsorship matters too, and with care we can expand to many, many small sponsors to ensure DDEV's resilience and sustainability.

Major Sponsors

  • Platform.sh has been a major sponsor of DDEV for a few years now. You may know that they recently reduced their sponsorship, but they remain our largest single supporter, and we appreciate it greatly. Platform.sh has also transferred the "ddev" domain names to the DDEV Foundation and will be transferring the "DDEV" trademark. And they're funding Randy's plane ticket to Drupalcon Atlanta!
  • Tag1 Consulting stepped up to generously support DDEV at a very significant level so many years ago, and has continued doing that. And they don't just offer outstanding financial support, they're always making clear that they use and support DDEV, and we get to see them at conferences.
  • Mobilistics and i-gelb both sponsor at the $500/month level.
  • All these lovely organizations sponsor at the $100/month (or a bit higher) level: Lullabot, Affinity Bridge, Webikon, FameHelsinki, OPTASY, Gizra, Cambrico, Agaric, Centarro, Craft CMS, Redfin Solutions, b13. And brand new this week (welcome!) Full Fat Things.

So many more wonderful sponsors!

Here are some of many sponsors who help out via GitHub Sponsors.

Image removed.

In-Kind Sponsors

The open-source community has lots of folks helping out multiple collaborators. In our case, MacStadium provides us testing resources, and JetBrains provides a subscription to their IDE products, thanks!

But we never forget Docker. Docker has adopted us in the Docker-Sponsored-Open-Source (DSOS) program for a few years now, and this means that all of your image pulls are sponsored in that project. You may know that normal image pulls will be strictly limited starting April 1, 2025, but because of the DSOS, users of DDEV won't hit that restriction.

And please don't forget that the open-source Docker project underlies every single Docker provider. It doesn't matter if you're using OrbStack or Lima or Docker Desktop or whatever, they're all built on top of the amazing Docker open-source project.

JSON Detail about Sponsorships

We recently set up a full updated JSON feed that can be used to see exactly where DDEV's sponsorship comes from and how we're doing. You can see the latest data any day in the all sponsorships feed. And Mark Conroy has built a web component that can be used to show where we're at on any website. Thank you!

Many Ways to Sponsor

We have almost too many ways that you can sponsor, but we want to make it easy for you and your organization.

  • For individuals and some organizations, GitHub Sponsors is super easy, takes moments and can be changed any time.
  • We are happy to invoice your organization and do more of a "support contract" so that you don't have to explain open-source to your finance department. We accept ACH, Wise.com, bank transfer, IBAN, SWIFT, checks, we'll work with your organization to make it work for you. Just send us a note via the contact page or any other way.
  • PayPal to DDEV

Oops, are you missing or did I forget you?

Is your name or your organization's name missing here? It's easy to get it here. How much does DDEV's support and ongoing maintenance mean to your organization?

(If I made a mistake and left you out, let me know and I'll edit this.)

Do you have questions or want to talk (about sponsoring or anything else)? Contact us! or join us in Discord.