06 Aug 2026

feedDrupal.org aggregator

Talking Drupal: Talking Drupal #564 - Approachable Open Source

Today we are talking about Maintaining NodeJS, Patternlab, Writing Books, and Open Source with guest Brian Muenzenmeyer. We'll also cover AI Webform Generator as our module of the week.

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

Topics

Resources

Guests

Brian Muenzenmeyer - brianmuenzenmeyer.com

Hosts

Nic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Bernardo Martinez - bernardm28 JD Flynn - dorficus

MOTW Correspondent

Jacob Rockowitz - jrockowitz.com jrockowitz

06 Aug 2026 6:00pm GMT

The Drop Times: James Abrahams Makes Sustainable Funding a Focus of Board Candidacy

How the Drupal Association raises money can shape who influences the project and which work gets sustained. James Abrahams makes that tension central to his board candidacy.

06 Aug 2026 2:50pm GMT

feedSymfony Blog

SymfonyCon Warsaw 2026: Developing the developer: Journaling with AI

SymfonyCon Warsaw 2026 is officially set for November 26 and 27, 2026, in Warsaw (Poland)! Join developers from across the globe for our flagship international event. 🎤 Speaker announcements We are happy to host Timo Bakx, Webdeveloper, Linku for…

06 Aug 2026 2:00pm GMT

New in Twig 4.0: A New Macro System

Contributed by Fabien Potencier Macros are as old as Twig itself. They look like functions, you call them like functions,…

06 Aug 2026 12:12pm GMT

feedDrupal.org aggregator

joshics.in: A backend engineer guide to Single Directory Components in Drupal

A backend engineer guide to Single Directory Components in Drupal bhavinhjoshi

Single Directory Components completely changed how we handle the frontend. But if you spend most of your time engineering the backend, SDC can feel incredibly frustrating.

You build a massive render array, pass it to the template, and the strict schema rejects it instantly. The days of dumping raw entity objects into Twig are over.

When you work with SDC, the component dictates exactly what data it accepts. This guide details the cleanest way to format your data and bridge the gap between custom backend logic and strict frontend schemas.

Implementing the Component Workflow

If your backend architecture does not format data perfectly, the system throws a fatal error. Follow these steps to ensure your data matches the strict schema requirements.

1. Define your component schema

Every component needs a YAML file. This is the contract your backend must follow. Keep your properties simple and predictable.

name: Article Card
description: A strict component for displaying article summaries.
props:
  type: object
  required:
    - title
    - url
  properties:
    title:
      type: string
      title: Article Title
    url:
      type: string
      title: Target Link
    summary:
      type: string
      title: Teaser Text

2. Format the render array

Backend engineers usually try to pass the entire node object. Do not do that. Extract the exact strings your schema demands. Set the render array type to component so Drupal knows how to route it.

$build['article_card'] = [
  '#type' => 'component',
  '#component' => 'my_theme:article_card',
  '#props' => [
    'title' => $node->getTitle(),
    'url' => $node->toUrl()->toString(),
    'summary' => $node->get('field_summary')->value,
  ],
];

3. Render the component

Your Twig file is now incredibly clean. It only prints exactly what the backend provided. No complex logic. No processing overhead.

<div class="article-card">
  <h2><a href="{{ url }}">{{ title }}</a></h2>
  <p>{{ summary }}</p>
</div>

Notice how we completely avoid preprocess functions here. The template simply accepts the data contract and renders the output.

Key Considerations

  • Never pass full entity objects into SDC props. Always extract the raw values first.
  • Validate your schema early. A mismatched type will trigger a rendering error that brings down the page.
  • Keep your #props mapping clean by handling all complex business logic in the controller rather than the template.

This strict separation keeps your backend logic secure and your templates highly predictable. Adapting to Single Directory Components requires a mindset shift for backend developers. But it is the absolute best way to scale enterprise software without creating a massive technical debt trap for future engineers.

Add new comment

06 Aug 2026 12:06pm GMT

05 Aug 2026

feedSymfony Blog

New in Twig 4.0: A First-Class Sandbox

Contributed by Fabien Potencier The sandbox has been part of Twig since 2009. If your users write newsletters, CMS blocks…

05 Aug 2026 12:09pm GMT

01 Apr 2004

feedPlanet PHP

ezSystems are classy folks

cover
Last week I helped the folks at ezSystems debug some APC problems they were having. The problems ended up being a 64bit architecture problem (they have uber-fast Opterons) and the bug is now fixed in 2.0.3.

Today I received Python & XML from them (off my Amazon wishlist). Thanks guys!

On a side note, my wishlist seems borked. The list I get when I search on my email address or name is not the same one I can edit when I log into the site.

01 Apr 2004 6:53pm GMT

PHP april fools...

1st of April 2004 get's to it's end and I guess it's time, to summarize the recent April fools a bit. Not that I think anyone in the world believes in them, but some were quite funny:

1. Changes to case sensitivity in PHP.
Alan Knowles announced that PHP will change to the studlyCase API and therefor will get everything broken by changing established functions.

2. IBM takes over Zend.
Myself hacked a little article about IBM taking over Zend to make PHP a compete of Java.

3. The first PHP virus has been seen.
Wasn't there one last year, too?

4. PHP has been overtaken by Micro$oft.
Mhhh... a little bit unreliable, if they had been taken over by IBM this morning... Maybe one should first look, what others wrote...

5. And finally, PHP4 and 5 showed their real faces...
Take a look at a phpinfo() output!

I guess I missed some, so feel free to comment on this entry, if you found another!

01 Apr 2004 5:49pm GMT

PHP Virus Attacking Web Hosts

Symantec have a report of the virus here. I've yet to see any of the PHP news sites picking up on it but, using a virtual host account, managed to deliberately expose some PHP scripts to it. From examining the infected scripts, what's disturbing is once infected, every tim...

01 Apr 2004 12:19pm GMT