Latest Drupal related questions

Score: 1
Ex0r avatar
Multiple forms on page
cn flag

I am trying to get multiple forms to work in a views display. All of the forms uses AJAX, but they appear to be interfering with each other.

One form is the Views Bulk Operations form that turns the views table into a 'viewsForm'. The second form is a 'quick edit' form available on each row in the view. The problem is when I submit any of the forms from the quick edit, it tries to also submit the ...

Score: 0
Print the "title" variable in unformatted views twig
gb flag

I am trying to do something like this in views-view-unformatted-something.html.twig:

<h3 class="{{ title }}">{{ title }}</h3>

...but something goes wrong. Nothing is injected into the class.

Score: 0
Joseph avatar
Using FileSystemInterface::EXISTS_REPLACE in a form to replace files if they already exist
cn flag

I have a form set up in the admin menu that allows a person to upload a file, like a picture. That file is then used in the custom module elsewhere. I want to be able to replace that file if they upload it again. I believe I can use FileSystemInterface::EXISTS_REPLACE in the form to do this, but I can't find documentation on how to exactly. Is there any examples of this being implemented? Please let  ...

Score: 2
Lambic avatar
Dependency injection in FieldItemList
ph flag

I'm creating a few custom classes that extend FieldItemList and they need some services injected.

I've had a look at core classes that extend that class and none of them do dependency injection, they all call \Drupal::service().

Is there a way to inject services here or should I follow the core pattern?

Score: 1
How to create a Solr search with partial matches and autocomplete?
cn flag

I configured a search box for a drupal site and am a bit confused on how to get a search working with partial matches and a sensible autocomplete.

Some basic details:

  • Drupal: 9.3.9
  • Modules: Search API, Search API Autocomplete, Search API Solr
  • Solr: 8.11.1

The search searches through different fields from several types of content. At first I set the field types to "Fulltext". Then I noticed that only c ...

Score: 0
What does "Entity API >= 8.x-1.0-alpha3 module is now a dependency and needs to be installed before running updates" during drush updatedb mean?
in flag

I am doing a Drupal 8.6.18 to 8.9.19 update via composer.

After upgrading the packages via composer, I updated the database, which shows a warning:

$ vendor/bin/drush updatedb
<a href="https://www.drupal.org/project/entity">Entity API >= 8.x-1.0-alpha3</a>
 module is now a dependency and needs to be installed before running updates.
 (Currently using Media entity Entity API missing)     ...
Score: 0
emma avatar
Drupal Views filter on a Date field does not work as expected
ro flag

I have a Drupal7 view which includes a field of Date type (let's say "activity date") via a relationship. I want to filter this field by "today" (show only activities with activity date equal to today). (The module Date Views is installed.)

So I created a Filter on this field and this relationship, choose the Operator "is equal to" and the option "An offset from the current time such as "+1 day"  ...

Score: 1
How to check which module db updates have been applied?
cn flag

For a specific module, how can I check which database updates have been applied in Drupal 9? I've downloaded a database from a server and I want to check what the current module schema is.

In Drupal 7, this was in the system database table, but that no longer exists.

Score: 0
Nathan Rona avatar
Modify cart view to allow direct quantity updates
ad flag

In want to modify the cart view so that when costumer change quantity of item in cart, it will update cart and total price automatically and immediately through AJAX (instead of when pressing button update cart through page reload).

Score: 0
Does the "Simple OAuth (OAuth2) & OpenID Connect" module support integration with 3rd party Authorization servers?
es flag

Does Drupal "Simple OAuth (OAuth2) & OpenID Connect" module support authenticating Access Tokens (in JWT format) generated by a 3rd party Authorization server? We are using Client credentials grant.

Score: -3
ilechcod avatar
How do I read element attribute from $form_state?
in flag

I am trying to hide entity id from my autocomplete fields. I downloaded a jquery script that removes the bracketed id and updates the autocomplete element with the new element. It then writes the entire value to the element's data like this

$(event.target).data('real-value','6');

I even updated this to use attr instead of data, I cant read this information from my Drupal form_state.

I set a data attribut ...

Score: 0
jayaprakash R avatar
I cannot load some pages after configuring CiviCRM Webform
pk flag

I installed Drupal 9.3.5 and configured Webform 6.2. When I try to load the setting and other pages, I get this error.

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "webform.config.libraries" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Drupal\Core\Routing\UrlGenerator->getRoute() (Line: ...

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.