Latest Drupal related questions

Score: 0
Webform Confirmation settings on form submission not working
ng flag

I am using Acquia site studio components for web pages. In all the pages I have a pop-up with a webform submit button to enter to the site.

In Webform confirmation settings I have selected the option - URL (redirects to a custom path or URL) and in the confirmation URL textfield [current-page:url]?[current-page:query] is given.

On form submission, it is expected to redirect to the current page with the cu ...

Score: 0
Thakur avatar
Update menu links based on the site URL
us flag

I have URLs defined in links.menu.yml file as "route_parameters: {webform: 'abc'}", but I need to update webform value based on the page URL. If URL has "/type1/" in it, keep webform: 'abc' OR If URL has "/type2/" in it, change the webform to webform: 'xyz'

please suggest.

Score: 1
pglatz avatar
Drush site aliases not working as expected
in flag

Using drush 11 and Drupal 9 to test a local site on my Mac (using MAMP), I'm having difficulty getting site aliases to work. I used Drush Launcher to make my drush executable globally. I also created <DRUPAL_ROOT>/drush/sites/self.site.yml containing:

local:
  host: www.en9-local.pglatz.com
  user: pglatz
  root: /Users/pglatz/dev/electronovelty/en9-www/web
  uri: https://en9-local.pglatz.com ...
Score: 1
Does a database transaction rollback if a PHP/Gateway timeout / connection dropped/lost occurs?
ca flag

I am using Drupal behind a reverse proxy/cache layer (e.g. Cloud Front/ Akamai) and sometimes the service goes quite slow (so I get a Gateway timeout, for reasons such as too many people are using the servers) or a something bad happens in the server farm (docker micro-architecture) and so I get a 502 Bad Gateway.

Do we know if a database transaction will roll back in such cases? This is especia ...

Score: 0
Eurasia-Lab avatar
Checkout Flow Submit Pane Form Checkbox to Boolean Field
br flag

I create a Checkbox in the Checkout Flow, CheckoutPane. How i can send the Value of the Checkbox to a Entity in the User-Profile or the Order.

Description: I need a Checkbox in the CheckoutPane, when the Customer select the Checkbox and click submit i must save the value in a Field in the Order or Profile of the specific user with the date. When the customer select the checkbox first time, its hi ...

Score: 1
mauzilla avatar
Unable to have user role permissions correctly applied
cn flag

I have a multi-language site managed by different admins. We want to create a news editor role and apply it so that a) the person can only modify content applicable to their language and b) can only modify content type "news"

I am using the translation module and also installed the "content access" module.

Under permissions, I have the permissions correctly configured under "node" in user permission ...

Score: 0
computed field inside field collection
de flag

I have two fields (field_a and field_b) which are inside the field_available_water_s field collection. I want to set the field_c computed field, which is also inside the field collection, to the sum of those fields.

I tried using this code, but it doesn't work.

$entity_field[0]['value'] = $entity->field_a[LANGUAGE_NONE][0]['value'] + $entity->field_b[LANGUAGE_NONE][0]['value'];

What code should ...

Score: 0
Pass a PHP array to Twig?
ph flag

I want to be able to access an array in my Twig template that is built in PHP but it always appears blank, am I missing something?

mytheme.theme

function mytheme_preprocess_page(array &$variables) {
  $variables['myvar'] = 'foo';
}

page.html.twig

{{ myvar }}

works as expected but if I pass an array this doesn't work:

$variables['myvar'] = ['foo', 'bar'];

just outputs nothing

Score: 0
richirm avatar
Several "from" addresses
in flag

I would like to be able to send multiple emails that my site sends from different accounts. Is this possible in Drupal? I use Drupal 8 and SwiftMailer.

Score: 0
SlowCheetah avatar
How do I get the values of multiple fields?
us flag

I'm using Drupal 9 and created a module for a custom schema.

Is there a way to simply get all the values for entity fields?
Is it efficient to access each value one by one?

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.