Latest Drupal related questions

Score: 0
Create 'conditional' select list in webforms?
kr flag

I'm pretty new to this so apologies in advance if I'm confusing or not clear enough.

I'm using Drupal 9 and I'm looking for a way to create a 'master' select list on webforms that will only show certain list items dependent on your answer to other questions. Example:

Q1. Do you want to study full time or part time? [select list]

Answers available: Full time / Part time

Q2. When do you want to stud ...

Score: 0
MacSim avatar
How to use datelist in a custom field widget?
um flag

Since an administrator of the website I am building is visually impaired, I need to create a custom date field widget rather than use the one provided by Drupal.

I am trying to implement a datelist element.

<?php

namespace Drupal\my_module\Plugin\Field\FieldWidget;

use Drupal\Core\Datetime\DrupalDateTime;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\WidgetBase;
use Drupa ...
Score: 0
Check if a field is empty inside a twig paragraph template
pe flag

I know how to check if a field is empty in a twig template (example node--lorem.html.twig):

{% if node.field_lorem.value is not empty %}

    <p>not empty</p>

{% else %}  

    <p>empty</p>

{% endif %}  

I would like to check if a field is not empty inside a paragraph twig template (example paragraph--lorem.html.twig). But this doesn't work :

{% if content.field_lorem.value is  ...
Score: -2
Top-Master avatar
Is there any `drush` command to delete any (previously exported) setting files?
cn flag

Can we use drush to simply delete any (previously exported) config-directory files?

Score: 0
Michael Chen avatar
Adding Middleware::retry() to a custom httpClient effects the default http_client
nl flag

We have two http_clients in our custom service file on __construct, one default from Drupal's http_client service, another custom new Client created by the use of http_client_factory and http_handler_stack services following formOptions function.

The custom client was used to implement guzzle's retry mechanism by pushing Middleware::retry into the current handler_stack in our custom services. But this m ...

Score: -3
Top-Master avatar
How does `drush cim` find and handle the config-directory?
cn flag

I would like to know where the config directory is, and how drush cim command exactly handles it, to be more specific:

  • Where are the setting files imported from, can you provide me with a path relative to the root (I mean, relative to where the main index.php file of drupal is)?

  • Can we change the import path?

  • Does cim command remove the files after they are imported, or not?

  • Can we tell d ...

Score: 0
J.Floyd avatar
Why would a contributed module try to load one of its files from a custom directory?
ma flag

I built a module on a local instance in my module/custom directory; I then published it on drupal.org, as Group by Field Widget. For some reason, when I install the release 1.1.1 via Composer, I get this error.

Warning: include(/app/web/modules/custom/group_by_field_widget/src/Plugin/Field/FieldWidget/EntityReferenceGroupByFieldWidget.php): failed to open stream: No such file or directory in /app/ven ...

Score: 0
ThePear avatar
Views : blank pages when too much results
cn flag

I'm using the Geolocation module to display a map of locations. I have about 550 locations to display currently and I need them all on my map. But whenever I try to show more than 300 results the page just comes out blank.

The marker's tooltip contains data for the location clicked on. One of these data is an image lazyloaded through Blazy. Adding the image to the template reduces the number of r ...

Score: 0
Get Group Name (label) of group the currently logged in user is in
cn flag

We have created several groups using the groups module in Drupal 9. We have assigned some users to these groups. A user can only be in one group. Now when the user is logged in, we have block in the header that displays some user info. One of the things we want to display is the name of the group the user belongs to. I have a hook_preprocess_block in my .theme file already where I am loading the current ...

Score: -1
Interlated avatar
How do I combine terms in Drupal feeds?
km flag

For example if I had 2 rows with people in them

uid | favourite colour
----------------------
 3  | Blue
 3  | Yellow

And I wanted the result to have both Blue and Yellow selected at the end. Is there a combine tamper plugin? I am already doing

class MyAlterSubscriber extends AfterParseBase

Do I need to lookup existing values here and combine them first?

Score: 0
Basil Vlasyuk avatar
Pass one exposed filter onto another? (D9)
pk flag

I have about a dozen string fields that contain objects and their states (for example, let's take 'AC_on' and 'heater_off'). And I have a view that shows nodes containing those fields. The task I'm trying to achieve is this. A user should have two sets of options to filter the nodes by the aforementioned fields:

  • To pick one of the objects via radio button (AC or heater);
  • To pick the states in which th ...

The Stunning Power of Questions

Much of an executive’s workday is spent asking others for information—requesting status updates from a team leader, for example, or questioning a counterpart in a tense negotiation. Yet unlike professionals such as litigators, journalists, and doctors, who are taught how to ask questions as an essential part of their training, few executives think of questioning as a skill that can be honed—or consider how their own answers to questions could make conversations more productive.

That’s a missed opportunity. Questioning is a uniquely powerful tool for unlocking value in organizations: It spurs learning and the exchange of ideas, it fuels innovation and performance improvement, it builds rapport and trust among team members. And it can mitigate business risk by uncovering unforeseen pitfalls and hazards.

For some people, questioning comes easily. Their natural inquisitiveness, emotional intelligence, and ability to read people put the ideal question on the tip of their tongue. But most of us don’t ask enough questions, nor do we pose our inquiries in an optimal way.

The good news is that by asking questions, we naturally improve our emotional intelligence, which in turn makes us better questioners—a virtuous cycle. In this article, we draw on insights from behavioral science research to explore how the way we frame questions and choose to answer our counterparts can influence the outcome of conversations. We offer guidance for choosing the best type, tone, sequence, and framing of questions and for deciding what and how much information to share to reap the most benefit from our interactions, not just for ourselves but for our organizations.