Latest Drupal related questions

Score: 0
ymdahi avatar
Views Block Language Detection
in flag

I have a site with two languages (EN/FR). I have a Content Type (Article). I have a Block built with Views that is displayed on the Article Node page. This Views Block has a translation.

When the user switches to FR, all other Blocks and UI components detect and render in this language. Even if the user visits a node that does not have a FR translation, it will render the rest of the site in FR.

How ...

Score: 0
sea26.2 avatar
Commerceguys/addressing missing locality in for some countries
om flag

I spent the weekend digging into this one. Pretty sure that the issue is a bug (or missing data) from https://github.com/commerceguys/addressing

I've installed a clean version of Drupal 9.3.6 Installed address module 8.x-1.10 Commerceguys/addressing v1.2.2

Added "address" as a field to a new (and only node).

Some countries display locality (e.g., state/province) others don't. I've filed a report in the  ...

Score: 0
May  avatar
how to customise view template for template provided by views addon module
zw flag

With core views, I just copy paste the views template to my theme, and am able to override. for example by calling views-view--my-view.html.twig.

If I am using an add on module for example, views show more. Which provide a load more page, the module has this views template. view-show-more-pager.html.twig. Now if I try to override this template, there does not seem to be a way. A copy the template ...

Score: -2
Free Radical avatar
How to check and disable one of the checkboxes in a form?
kz flag

I found this snippet in the code for a form ($roles is an array of roles).

$form['config_options']['roles'] = [
  '#type' => 'checkboxes',
  '#options' => $roles,
];
// Check and disable the 'authenticated' role.
$form['config_options']['roles'][RoleInterface::AUTHENTICATED_ID] = [
  '#default_value' => TRUE,
  '#disabled' => TRUE,
];

What this does is to check the checkbox for the 'aut ...

Score: -1
turpentyne avatar
Should I use an entity reference for nodes or taxonomy terms?
tr flag

I'm dealing with a plant content type that currently contains a paragraph field. The paragraph contains an entity reference to Common name and an Origin text field (with the setting to create if it doesn't already exist). My reason is that common names can apply to numerous plants.

Before I add data, I'm wondering whether taxonomy terms are better for common names. Do nodes take up less memory than ...

Score: 0
thiokol avatar
How do I set the expiration value for tempstore.private service?
cn flag

I am using the tempstore.private service, which uses an expiration time of one week. I need to change this; changing it globally is fine.

There is an $expire property, but I've no idea how I'm supposed to set it.

Score: 0
Leo avatar
Filter by multiple terms of the same vocabulary using JSON API
ng flag
Leo

I am trying to filter a Drupal content type JSONApi feed by multiple terms in the same vocabulary? (E.g. Content which has been tagged with both 'England' & 'Scotland')

This thread mentions the issue and claims a fix although I can't get this to work - https://www.drupal.org/project/drupal/issues/3066202#comment-14426136

The issue is mentioned in this video here too - https://youtu.be/SqZdFAz4Tvo?t=23 ...

Score: 2
lazarcelic avatar
robots.txt file per environment
cn flag

We are using Drupal 8.9 and we have an EC2 stage site and our main site, which use the same code base.

Is it possible to have a different robots.txt file for each site (environment)?

We don't want the stage site to appears on search results.

Score: 3
Multi-lingual Content Moderation
az flag

I have two languages (English and French). I want to:

  • Explore options to create/review/approve/publish English content as its own workflow
  • Explore options to create/review/approve/publish French content as its own workflow
  • There should be no dependency between English moderation flow and French moderation flow
  • After published, if there's any need to modifify the content, the content can be again send ba ...

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.