Drupal Answers Community Digest

Top new questions this week:

What is the right way of loading a service?

when trying to use a service in drupal actually there is 3 ways , what is the preferred way to use a service and why : passing dependencies directly through the constructor: public function ...

8 dependency-injection symfony-services  
asked by Marwen Amri 4 votes
answered by 4k4 5 votes

How can I use TwigExtension from an existing symfony bundle?

UPDATED Context I'm using Symfony Webpack Encore to take care of all the JS and CSS postprocessing, transpiling and so on... There are different ways to implement webpack, even a module, Webpack ...

dependency-injection symfony-services  
asked by Kojo 3 votes

How do you access other submitted values from ConstraintValidator?

May well be missing the obvious here. So in Drupal 8 I have a content type. That has a date range field and then using paragraphs, a paragraph with several fields including a date field. So I need to ...

paragraphs  
asked by nickbits 3 votes
answered by nickbits 1 vote

Errors from custom FieldItemList::getConstraints() displayed next to every single property

Summary Errors set by constraints on custom field types appear next to every single property by default. We can use the ::errorElement() method on the widget to place errors that come from the ...

entities  
asked by Philipp Zedler 2 votes
answered by Philipp Zedler 0 votes

Getting the workflow associated to a node type

How do i get the workflow entity associated to a certain node bundle? So far my approach has been to use EntityTypeManager to load the workflow config entity storage and trying to load the right ...

workflows  
asked by Howard 2 votes
answered by d70rr3s 1 vote

Using drupal-scaffold correctly

I am in the process of starting new projects using drupal/recommended-project over the Drupal composer project template. One of the differences I have noted is that the Drupal scaffold tool fires ...

8 composer  
asked by Kevin 2 votes
answered by Leigh 2 votes

Why would a multilingual site sometimes say "Save (this translation)" and other times say "Save (all translations)"?

We have a multilingual Drupal 8 site supporting 17 different languages and many more localized versions of those languages. I have been noticing that sometimes when I am editing a node it says "Save ...

8 nodes i18n-l10n  
asked by Patrick 2 votes
answered by 4k4 1 vote

Greatest hits from previous weeks:

Strict warning: Only variables should be passed by reference

I get the following error: Strict warning: Only variables should be passed by reference in include() (line 18 of /home/sites/dev/theparce/sites/all/themes/parce/block--block--3.tpl.php). This is ...

7  
asked by silkAdmin 21 votes
answered by kiamlaluno 52 votes

How do I load a field collection from a node?

I have a node that has a few field collections on it. When I look at node_load() output, I see: [field_rich_text_group] => Array ( [und] => Array ( ...

7 entities  
asked by Justin 73 votes
answered by Justin 89 votes

How to check Drush version?

How can I identify what version of Drush is installed on a given system?

drush  
asked by markdorison 34 votes
answered by Chaulky 45 votes

How to programmatically get the NID of the current node

I've pored over this old thread on drupal.org and it just kind of makes my head spin around. Pulling down the path and trying to parse out the NID from within it? There has to be a better way. And ...

nodes  
asked by beth 26 votes
answered by Clive 50 votes

How to use drupal_mail() to send emails with custom template

I would like to use the drupal_mail() function to send out emails but with a custom HTML template so that they are in keeping with my website design but I am a complete newbie to hooks and modules ...

7 hooks emails  
asked by Andy 32 votes
answered by Aneek Mukhopadhyay 40 votes

List all terms from a vocabulary

I have a taxonomy called services and want to list out all the terms. I can load the vocab with $vocabulary = taxonomy_vocabulary_machine_name_load('Services') but cannot seen to get all the ...

7 taxonomy-terms  
asked by LeBlaireau 25 votes
answered by Clive 43 votes

Create template file for views block

There is a lot about theming custom blocks, but what about blocks created by views? My views block has id: block-views-posts-listing-block, I try many ways for naming template file, ex: ...

7 views theming 8 blocks  
asked by Codium 19 votes
answered by cigotete 18 votes

Can you answer these questions?

How can I send mass emails as part of a bulk operation?

I have a view where the webform submissions of the site authenticated users are shown. In that view I have some bulk operations (created by me) that change the value of a field in these submissions ...

emails  
asked by Dimitris Markopoulos 2 votes

Redirecting when processing inbound

I want to redirect users when a condition is met. I want to do the redirect when processing the inbound, so therefore I created a path processer, which implements the InboundPathProcessorInterface ...

8 redirection  
asked by Jdrupal 1 vote

How do I add an item to the Bootstrap Simple Carousel on Drupal 8?

I'm having problems configuring the Bootstrap Simple Carousel module on Drupal 8. I see that I can add carousel items at /admin/structure/bootstrap_simple_carousel and I've created the carousel block ...

blocks bootstrap-theme  
asked by Charlie 1 vote
You're receiving this message because you subscribed to the Drupal Answers community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 110 William Street, 28th floor, New York, NY 10038

<3