How to use drupal 8 mail manager without the $to value?

This is the Drupal 8 version of the question How to use drupal_mail without the $to value?. I want to send bcc email for multiple users without a to address. Setting $to = NULL or $to = '' or $to = 'undisclosed-recipients:;' isn’t working.

How can I send an email just with BCC recipients?

views – Drupal 9 Taxonomy: Parent contextual filter

I’m using drupal 9 for a project with a large taxonomy structure. On the parent page I want to show the child terms of the node. Multiple guides i’ve found have suggested using the contextual filter in a view for “Taxonomy: Parent Term” but that contextual filter doesnt seem to exist in Drupal 9.

anyone have suggestions? Thanks

entities – How to alter inline entity form fields on node edit drupal

Actually documentation of module in readme file the hook was written and i was using that hook but only problem was the custom module name. if your custom module name is two parts like custom_websitename then this hook did not work in my case, so after one day i changed module name to single word and hook worked.. I am sharing code incase someone need to update lineitemform in node edit for drupal commerce.

function customruba_inline_entity_form_entity_form_alter(&$entity_form,   $form_state){
$entity_form('commerce_price')('#access')=false;
$entity_form('field_commerce_saleprice_on_sale')('#access')=false;
$entity_form('field_commerce_saleprice')('#access')=false;
$entity_form('status')('#access')=false;
}

this worked for me to hide some information on inline entity form

drush – “Drupal root not found. Pass –root or a @siteAlias in order to see Drupal-specific commands”

I have multiple sites inside the same htdocs directory. In one, I removed all the folders except vendor under Web. Now drush will not work (it worked before I moved the folders). But now, it cannot find the database, which is correctly defined in web/sites/default/settings.php

/srv/www/htdocs/jar/drupal # ./drush status
 PHP binary    : /usr/bin/php
 PHP config    : /srv/www/php.ini
 PHP OS        : Linux
 Drush script  : /srv/www/htdocs/jar/drupal/vendor/drush/drush/drush
 Drush version : 10.3.6
 Drush temp    : /tmp
 Drush configs : /srv/www/htdocs/jar/drupal/vendor/drush/drush/drush.yml
 Drupal root   : /srv/www/htdocs/jar/drupal

I am running Drupal 9.0.8 and drush 10.3.6 (in /srv/www/htdocs/jar/drupal). I have removed drush using composer (2.0.3) and reinstalled it (recreating vendor in the process).

/srv/www/htdocs/jar/drupal # ./drush -vvv cr
 (preflight) Config paths: /srv/www/htdocs/jar/drupal/vendor/drush/drush/drush.yml
 (preflight) Alias paths: /srv/www/htdocs/jar/drupal/drush/sites,/srv/www/htdocs/jar/drush/sites
 (preflight) Commandfile search paths: /srv/www/htdocs/jar/drupal/vendor/drush/drush/src
 (debug) Starting bootstrap to site (0.04 sec, 8.17 MB)

In BootstrapHook.php line 32:
  (Exception)
  Bootstrap failed. Run your command with -vvv for more information.
Exception trace:
  at /srv/www/htdocs/jar/drupal/vendor/drush/drush/src/Boot/BootstrapHook.php:32
 DrushBootBootstrapHook->initialize() at /srv/www/htdocs/jar/drupal/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:44
 ConsolidationAnnotatedCommandHooksDispatchersInitializeHookDispatcher->doInitializeHook() at /srv/www/htdocs/jar/drupal/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:36
 ConsolidationAnnotatedCommandHooksDispatchersInitializeHookDispatcher->callInitializeHook() at /srv/www/htdocs/jar/drupal/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:29
 ConsolidationAnnotatedCommandHooksDispatchersInitializeHookDispatcher->initialize() at /srv/www/htdocs/jar/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:145
 ConsolidationAnnotatedCommandCommandProcessor->initializeHook() at /srv/www/htdocs/jar/drupal/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:296
 ConsolidationAnnotatedCommandAnnotatedCommand->initialize() at /srv/www/htdocs/jar/drupal/vendor/symfony/console/Command/Command.php:221
 SymfonyComponentConsoleCommandCommand->run() at /srv/www/htdocs/jar/drupal/vendor/symfony/console/Application.php:1018
 SymfonyComponentConsoleApplication->doRunCommand() at /srv/www/htdocs/jar/drupal/vendor/symfony/console/Application.php:271
 SymfonyComponentConsoleApplication->doRun() at /srv/www/htdocs/jar/drupal/vendor/symfony/console/Application.php:147
 SymfonyComponentConsoleApplication->run() at /srv/www/htdocs/jar/drupal/vendor/drush/drush/src/Runtime/Runtime.php:118
 DrushRuntimeRuntime->doRun() at /srv/www/htdocs/jar/drupal/vendor/drush/drush/src/Runtime/Runtime.php:49
 DrushRuntimeRuntime->run() at /srv/www/htdocs/jar/drupal/vendor/drush/drush/drush.php:72
 require() at /srv/www/htdocs/jar/drupal/vendor/drush/drush/drush:4

I looked at all the above suggestions, but am stuck. Drush works perfectly on my other 5 sites…

theming – Drupal Forum customizing: Get Taxonomy field value in Forum overview forum-list.html.twig

i am customizing the appearance of the drupal standard forum. Drupals standard forum is based on taxonomy terms. I added all my forums and container. So far so good.

Additionally i added a custom taxonomy field and i want to show the field for each forum category. (See on attached pictures)

how can i call the custom taxonomy field in forum-list.html.twig?

I know how to call content fields from nodes in node.html.twig. for example, but how to call custom taxonomy fields in forum-list.enter image description herehtml.twig (core moduleenter image description here).

(Drupal 9.17)

I appreciate every help.

Thanks in advance!

views – How to get drupal fields and customize themes

I’m trying to customize a durpal theme, but I’m getting tired to guess the path of getting different fields of data types. for example, here are some few examples:

row.content('#row')._entity.title.value (for titles)
row.content('#row')._entity.field_image.entity.uri.value (for images)
row.content('#row')._entity.field_image(0).alt (for images alt)
row.content('#row')._entity.body.summary (for summaries)

How can I get my taxonomies labels, and is their any effective way to debug and get he nodes & elements structure

drush – Database changes across multiple drupal instances

I often have the problem that I would like to apply Drupal settings for several pages at once. Until now, I have always gone through all the pages and have changed individually. Of course, this is really time-consuming for many pages. But now the pages are all on one webspace and the databases are all accessible under one phpmyadmin instance. I thought in the first moment to write a SQL query that processes all Drupal databases. Or is there a smarter way I haven’t thought of yet. At the moment I have the problem with the security kit module: https://www.drupal.org/project/seckit. Unfortunately there are no drush commands for this module that would take care of the problem for me. But have I perhaps not considered a completely different possibility?

Thanks a lot

Bavra

entities – How to store drupal content field to custom table

I have a compound field in content, which is stored in its field table. However I want some parts of the compound field also stored in custom table.

Which hook to use, I could not find any example or tutorial.

The compound field in content is stored in its field table, I want some of its part to be stored in custom table when the node is created/updated. Also, when any changes I make to field it should update.

How to achieve the above, I have chosen this platform, cause experts could say something about this.

Why I am storing in custom table Because of the project requirement I am storing in custom table. I am looking for answer to the above problem, please reply whatever it may help. Thanks

theming – Drupal Home page works, not the rest

Drupal works on the landing page but shows no other page sections, for example /about or any other sections only the main page that you can see!

Basically I have just gotten a new mac, and lots of my old sites have this issue.

This shows something that might be similar.

The main index page

Other pages that just don’t work

Drupal works on the landing page but shows no other page sections

Drupal works on the landing page but shows no other page sections, for example /about or any other sections only the main page that you can see!

The main index page

Other pages that just don't work