Latest Drupal related questions

Score: 0
SMTP module cannot connect to smtp.gmail.com
br flag

The SMTP module stopped working about a week ago. It is no longer able to connect to smtp.gmail.com. I have tried commonly recommended remedies:

I am still not able to send emails. This seems to have happen ...

Score: 0
Dragan Petrovic FSD avatar
Cant install Provus via Docksal
cn flag

I have a problem running Provus on local env via Docksal. Provus

> git clone https://github.com/promet/provus.git ppd9
> cd ppd9
> fin init

Errors via installations


[error]  Drupal\Core\File\Exception\NotRegularDirectoryException: public://geofieldmap_icons is not a directory. in Drupal\Core\File\FileSystem->scanDirectory() (line 665 of /var/www/web/core/lib/Drupal/Core/File/FileSyst ...
Score: -1
What security configuration should I use in order to allow deployment?
ph flag

During the deployment of a container in the AWS Fargate ECS cluster, although the Docker container remains in Running state, when I open the public IP of the service where the site should load, I get this message.

The provided host name is not valid for this server.

This is an intranet site that runs on Drupal 8.

What security configuration Drupal should have in order to allow deployment, taking ...

Score: 0
Lambic avatar
Disable content creation outside group context
ph flag

I'm using the group module.

I have a content type for which nodes should only ever exist as members of groups.

Is there a sensible way to disable creation from /node/add/{content_type} so that nodes can only be created from group/{group}/content/create/group_node:{content_type}?

Score: 0
Display images from private files to public
bd flag

Is it possible to display private files/images to the public for example with tiwg tweak?

I've tried examples from here: https://www.specbee.com/blogs/twig-tweak-in-drupal-9-functions-and-filters which was the best I could find relating to my issue.

In the article from above I found:

{{ drupal_field(field_name, entity_type, id, view_mode, language,access_check) }}

And this is the code I used, whi ...

Score: 2
How to show content that is not yet translated (Untranslated Content)
cn flag

I am fairly new to Drupal – spent the last 3 months getting to know my way around. I have one question. I have to create a multi-language site for English and German users. I'm the site administrator and all the content editors are German. They will upload content in German. From both our sides we will upload content in either German or English and then it should be translated into the other language. ...

Score: 0
cameron cameron avatar
How to get low resolution image urls from json:api?
sz flag

The json:api put provides a link to file--file node types, but the url is to the original image file.

How can I get a lower resolution image file via json:api to avoid users from downloading a MB+ image file?

Score: 0
mazman avatar
Including modules in Git repository
us flag

Non core third party modules are maintained in modules directory in the Drupal root directory. Should this directory be added to the .gitignore file?

If a module is upgraded in a Staging system then why would the module be managed in a site specific Git repository when no changes are intended and the module is maintained by a third party? Surely if the module is required in production then it is a ...

Score: 0
Ex0r avatar
views-form twig template
cn flag

Is there a way to override a views-form template? I am using views bulk operations and attempting to add in some custom functionality into it via hook_form_alter, but part of the functionality requires me to create a custom template/override on the views-form it generates, and I can't seem to find a template that would allow me to override the template.

When adding VBO or creating a views data field wit ...

Score: 0
liquidcms avatar
How to add a boolen attribute to a form?
us flag

I am trying to add the boolean attribute "novalidate" to all my forms.

I have tried numerous approaches in my theme_preprocess_form function but no luck. I see in some preprocess functions, $variables['attribute'] is an object and has methods like addClass() and setAttribute(). But in _preprocess_form it is an array. Plus setAttribute doesnt sound like it will do boolean attributes anyway.

I tried t ...

Score: -1
n34_panda avatar
How to reference submitted Salesforce ID with webform mapping?
in flag

The Drupal Salesforce Suite and webform documentation state:

The ID of created/updated records are stored with the submission, and can be used in subsequent record updates in the same submission

Source: https://www.drupal.org/project/salesforce_webforms

Sadly I just don’t know how to reference it in the mapping. I first log a Case for the submission and in my second mapping I am trying things lik ...

Score: -1
Monkeybrain avatar
How can I migrate a font library?
in flag

I have a Drupal 7 multi-site platform which contains a sites/all/libraries/fonts/<fontname> directory, where there are several font files.

I am porting one of the Drupal 7 sites to a new Drupal 9 platform, where I have created a Drupal 9 version of the theme. I want to use these fonts on the Drupal 9 site.

Where should I copy these font files? How do I tell the Drupal 9 theme about them?

Score: 0
Render Submitted Fields of a Form to Email with Title + Value
in flag

I have a quite complex form based on \Drupal\Core\Form\FormBase with many (partially nested) fields and want to send the full contents in an email on submit.

Currently I have

public function submitForm(array &$form, FormStateInterface $form_state)
{

   foreach ($form_state->getValues() as $key => $value) {
     if (!empty($form[$key]['#title']) && $key != 'images') {
       $valu ...

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.