Latest Drupal related questions

Score: 1
Grayson Cooper avatar
Git branching strategies with a small team to develop a Drupal site
in flag

We're a small team (5-6 developers) building a Drupal 7 site. Previously, we've used Features (https://www.drupal.org/project/features) to export our configurations from development to production. We've relied largely on assigning developers discrete, unrelated tasks.

Our upcoming work has distinct, but related development. For example, I anticipate we'll need to add fields that will be used by two d ...

Score: 2
Rubix05 avatar
Shared Facet between Taxonomy and Content Field
cn flag

My search page needs to show results from both content types and taxonomies.

Both the content type and taxonomies that I am searching on have a field called training_location. The training_location field is also a taxonomy with only two options: "Remote" and "In-Person".

Is there a way to merge a facet so that I can filter results for both a content type and taxonomy that has the training_location ...

Score: 0
J.g avatar
How can I view the list of referenced nodes when viewing a node?
us flag
J.g

I have a content type with a Related pages field, which an entity reference field for nodes.

How can view those nodes while still on the current node?

I tried to achieve this by creating a block view, but this shows all the nodes, whereas I want only the nodes referenced by the Related pages field.

screenshot

Score: 1
How to set default value on Select2 Autocomplete via hook_alter
nl flag

What's the best way to set a default value to a Select2 autocomplete field widget on form load (I'm using a reference view to populate options). I've tried a ton of different variations from within form_alter with no success, such as...

$form['field_name']['widget']['#select2']['id'] = 12

I can set the hidden <select> element with...

$form['field_name']['widget']['#default_value'] = 12

...b ...

Score: 1
Format of callback arguments in YAML files
ke flag

For instance, for the Filter module, in filter.permissions.yml, custom permissions are defined:

permission_callbacks:
  - Drupal\filter\FilterPermissions::permissions

That looks like a static function, but it isn't. How does that work? Is the format for this kind of callback argument documented or defined anywhere?

Score: -1
Programmatically create a new image style
us flag

I'm creating my own module and I need to programmatically create an image style to use with a new media type.

I found the core/profile/standard/config/optional/image.style.max_1300x1300.yml file whose content is the following one.

name: max_1300x1300
label: 'Max 1300x1300'
effects:
  04caae9a-fa3e-4ea6-ae09-9c26aec7d308:
    id: image_scale
    data:
      width: 1300
      height: 1300
      upscale:  ...
Score: -1
steevee666 avatar
How can I re-organize the user account tabs?
in flag

I have a Drupal 9 site. I can't find how to rearrange or rename the user account tabs.

How can I re-organize the user account tabs?

screenshots

Score: 0
A new field doesn't show on the page
cn flag

I recovered a site from a backup which had run on Drupal 7.7. I upgraded it to Drupal 7.80 on another instance. Now, we need to add new fields to content types and add new nodes. I added a field as an administrator. I can't see the added field on either the old site or the new one.

What I have done so far:

  • I checked the node is published
  • I checked the permissions
  • I flushed the cache
  • I verified t ...
Score: 0
HazeDesigns avatar
Prevent webform from submitting when clicking button in markup component
in flag

I have a very complex webform in a Drupal 7 website I've inherited. I have added a markup component which builds a button and added some JS that links this button to trigger a modal window to open. In the modal a block is displayed which contains a view listing some user profiles.

When I visit the webform everything functions normally and I can click the button to open the modal, but when revisit ...

Score: 1
hotwebmatter avatar
Configuration overrides have unpredictable results
nr flag

I'm setting up configuration splits with Drupal 9 and encountering unexpected results.

None of my splits are marked as Active in the active configuration or the exported configuration YAML.

I want to set the default Local split in settings.php and then use settings.local.php to override it on dev, stg, prd environments.

My local development environment is DDEV-Local v1.17.5. The three remote envir ...

Score: 0
Pin avatar
Limit avaliable dates in a event where user can sign up mutiple people in multiple dates in one single form
cn flag
Pin

Problem context

I'm bulding a site where parents can sign-up their childrens for a summer camp. Parents can choose one or more weeks for sign-up one or more children in the same form.

There are 20 seats for each week, and 8 weeks to choose, so parents should know how many seats are avaliable in each week to manage to sign-up their children (usually they prefer their children go together but if is not p ...

Score: -1
StefanYYC avatar
Access a user entity reference in a commerce-product template file
cn flag

I have a field_intervenantfield which contains a user entity reference. In the commerce-product template file, I want to access the description field of each intervenant.

How can I achieve it?

I tried reading the following values, but none of them returns what I am looking for.

  • product.field_intervenants.entity.field_description
  • product.field_intervenants.0.entity.field_description
  • product_entity. ...
Score: 0
steevee666 avatar
How do I modify the permissions assigned to a comment type?
in flag

On my Drupal 9 site, I created 2 types of comments:

  • comment_type_a
  • comment_type_b

When I go for permissions, there are only permissions for all comments in general.

How do I modify the permissions assigned to a comment type?

I want for comment_type_a only admin role can comment.

I want for comment_type_b all roles to be able to comment.

Score: 0
Tomáš Bažant avatar
Send an email to a group of users after new content has been created
de flag

In Drupal 9, I need to notify all users belonging to a role by sending them an email about the new created content.

Everything's fine, but I don't know how to put together the email addresses of these users in the Send to data selector of the Rules module.

Score: -1
Extect avatar
How to send email verification link with webform?
cn flag

I am using a webform for anonymous users (logging in is not an option). Once a webform is submitted, I want to send out an email asking to click on a confirmation link. Only once this link is clicked, I want to take further actions (i.e. trigger an email handler or change the status of the webform).

How can I achieve this or something similar?

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.