nrw.social ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Wir sind eine freundliche Mastodon Instanz aus Nordrhein-Westfalen. Ob NRW'ler oder NRW-Sympathifanten, jeder ist hier willkommen.

Serverstatistik:

2,9 Tsd.
aktive Profile

#Drupal

34 Beiträge29 Beteiligte0 Beiträge heute

In your #Drupal controller, when you pass a User object to a Twig template, it's available there as an AccountProxy object, not a User object.

But I need access to the custom fields, so I need to preprocess or inject all field values into the template manually?

Both seem a silly amount of work just to inject a User object into a template.

For now a custom Twig filter that loads a user by id works, but also seems silly.

Am I missing something?

Made a ton of improvements to drupal.org/project/drupal_flak -

- start-config now installs your existing site from configuration
- xdrush triggers an xdebug session from drush
- update-flake makes it easy to get new features in the future
- Composer now visible to PHP, so Project Browser and auto updates work
- Updates to include block to avoid conflicts with other environments

Check it out! In some ways this is easier/faster than #ddev ! #drupal #nix

Take a few minutes and fill out the annual #drupal developer survey - it took me about 10 minutes and is available in many languages.

surveymonkey.com/r/drupal_deve

Survey closes April 20.

One use of the results is to Drupal event organizers in determining topics that are of interest to the community.

www.surveymonkey.com2025 Drupal Developer SurveyTake this survey powered by surveymonkey.com. Create your own surveys for free.

Hey #Drupal friends:

Often you can no longer change a machine_name value once the form is saved.

Sometimes you *can* as long as the thing's machine name hasn't been used (like a list field option).

Is there any guidance on this? Recorded best practices? A name for distinguishing the two practices?

Looking to describe this with the appropriate terminology.

Thanks a bundle!

#Drupal is like Photoshop: work with it for over 20 years, still discover new stuff every day.

Today I learned:

\Drupal::service('country_manager')->getList()

returns:

[
'AC' => t('Ascension Island'),
'AD' => t('Andorra'),
'AE' => t('United Arab Emirates'),
...
]

Pretty handy if your data only contains country codes rather than complete country names.