Latest Drupal related questions

Score: 0
Divya K avatar
"InvalidArgumentException: Field taxonomy_vocabulary_15 is unknown"
cn flag

I am trying to publish a Related_article_link node, but I get the following exception error.

InvalidArgumentException: Field taxonomy_vocabulary_15 is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 587 of /mnt/www/html/pllfahcvvibjg/docroot/core/lib/Drupal/Core/Entity/ContentEntityBase.php).

I tried running update.php, drush cr, and drush updb, but I am still getti ...

Score: 0
Bavramor avatar
Not all tokens are replaced
sg flag

I like to work with tokens a lot. In the node view it works well with the tokens. All tokens are displayed correctly Now I have built a view and in the header of this view I would like to work with tokens. Therefore I built a "contextual filter → Provide default value → Content ID from URL" in my view. Unfortunately it doesn't seem to display all tokens correctly in this view. Tokens like [current:d ...

Score: 1
Belba avatar
Get the node title field value in the form_state
pe flag

Drupal version 9.3.9.

This is a process of Ajax callback, where the value of the title field is required. In the form node add, the title is displayed. It seems that the form_state does not apply to the title field. When I inspect the variables, the title field is also not reflected in the values.

function my_custom_module_field_widget_process($element, \Drupal\Core\Form\FormStateInterface $form_state ...
Score: 1
Thakur avatar
How can I retrieve information about the current request's URL?
us flag

I need help finding a way to get the current request URL in a controller and, based on that, change the webform name in the controller.

My code:

'#url' => Url::fromRoute('entity.webform.canonical',['webform' => 'form1'])

In this line of code, how can I switch between form1 or form2 based on whether the request URL contains a particular path?

Score: 0
sea26.2 avatar
How to reset webform field validation state?
om flag

Not sure if I'm asking the question correctly. Here is the configuration:

  • I have a form that contains conditionally hidden fields.
  • The conditionally hidden webform fields are marked required.
  • On the "condition", I've selected "clear values when hidden".

enter image description here enter image description here

Repro steps

Step 1

Navigate to the page with the form. The form is initially displayed, the field (a checkbox) upon which the condition is con ...

Score: 0
Kojo avatar
How can I display user information along with its choices?
de flag

Usually, polls are anonymized. We need to process total votes, percentages... Now, in the context of Ukraine invasion, an institutional client wants to enhance an Advanced poll existing implementation, in order to collect citizens' data about their possibilities to host families, help with donations, and so on. And of course to reach out to the people who answered the questions...

While this could ...

Score: 0
How should I use hook_cache_flush() or hook_rebuild() in a custom module to execute JavaScript code when the cache is cleared?
jp flag

I'm trying to create a module that executes some JavaScript code when the cache is flushed (via administrator menu or otherwise). I believe I can implement either hook_cache_flush() or hook_rebuild(), but I'm not quite sure how. I'm not necessarily looking for this to be done for me, but if I could be given a starting point and direction to head in, that'd be great.

Score: 1
Reload commerce_cart_form view
kn flag

I'm coupling Drupal commerce, DC add to cart ajax and commerce flyout modules.

This is my view configuration :

enter image description here

On my /cart page, I have the initial form (the view) to change the quantities, delete the items etc...

I also have a slider of product, which thanks to the "ajax add to cart" module, I can add several product to the cart.

The expected behavior :

  • Whenever I update the quantity or remove an i ...
Score: 0
Delty avatar
Webform Submissions settings, "Convert anonymous user drafts and submissions to authenticated user" doesn't seem to work
br flag

In a webform I've built, under the Submission settings I have enabled, "Convert anonymous user drafts and submissions to authenticated user," and the help for it says, "If checked, drafts and submissions created by an anonymous user will be reassigned to their user account when they login."

This webform is configured to create a user account after submission using the Webform User Creation handle ...

Score: 0
Drupal Webform REST
jp flag
Rdb

I am trying to use Drupal Webform REST. I got an error "The 'restful post webform_rest_submit' permission is required." on browser console. I have enabled modules and REST resources as mentioned. I used Authorization, the Auth generated in Postman, using basic auth. I am struggling to use 'x-csrf-token' in postman. I want to use submit the form by an anonymous user. Do I still need Authorization, ...

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.