Latest Drupal related questions

Score: 0
Mat avatar
Module Broken Link – installation fails
za flag
Mat

The ›Broken Link‹ module yields an ›unexpected error‹ during installation. Afterwards everything seems to be fine and the module is listed as installed, but a node Administration->Configuration->System->Broken Link is missing.

What am I missing?

The error seems to be:

Type    php
Date    Thursday, February 17, 2022 - 10:39
User    me
Location    https://mydomain.at/admin/modules
Referrer  ...
Score: 0
WebmasterPF avatar
Set a multiple twig condition in views
jp flag

In a field, I wan't to display only results iltered by an if statement like this. But actually nothing is displayed.

{% if  ( nid == '16' ) and ( node.field_video_externe | default ) %}
{{ field_video_externe }} 
{% endif %}

Thanks for tips.

EDIT: if I add a empty field to rewrite the entire output and accessing to the fields via token, I could do something like this, but the video for other nids aren't  ...

Score: 2
Scott B avatar
How can I change the format used for ?
ng flag

I'm using Drupal 9 to display a RSS feed with the Aggregator module. For the imported items, the date for <pubDate>Wed, 24 Nov 2021 20:05:46 +0000</pubDate> is showed as 2 months 3 weeks ago.

The timestamp fields are already set to use the long format for the date, which is set to M j, Y.

There's no display settings for the Aggregator module. I'm trying to change it with a preprocess hoo ...

Score: 0
quantumized avatar
What could cause some managed private files to not be on the server even though Drupal shows the file is being used?
ng flag

We have a custom Drupal 9 form with a managed file field that allows users to upload a (private) file to the Drupal Commerce order. This works well except that about 5-10% of the time the file is not on the server even though the "Files" report shows the file in the DB and that it is used in 1 place as expected.

The missing files show "permanent" status as expected.

There are no errors in the logs a ...

Score: 0
Wayne Foster avatar
How to add multiple items to the cart in one go - whilst including "order item type" with extra fields - Drupal9
in flag

I had this working using multiple AJAX cart submissions in D7 - using AJAX_Cart and https://www.drupal.org/project/commerce_add_to_cart_extras I'm now trying to find an elegant way to achieve the same using Drupal9 and Commerce 2.0.

I've tried: drupal/commerce_pado - but the custom order items are not included when the products are added to cart. I've also tried drupal/commerce_cart_flyout - but sam ...

Score: 0
Modifying the alias of a field in a drupal 9 view
co flag

I have a small problem that I can't solve from the drupal 9 configuration.

When creating a view and adding a field to it, it is possible to create an alias to that field within its configuration. But it does not allow me to add a blank space to that alias, that is, it forces me to add a _ or some other character.

For example, I would like the alias to be: Term_name, but drupal forces me to be: Term_ ...

Score: 0
create a child node via api
kr flag
Mat

Running Drupal 9.3, I have two content types, job and and Job detail. Every job has many job details.

Lets say i created a job with node ID of 5. I have a field in job detail called "field_job_id" that will take the node ID of the parent, in this case "5".

When creating a job detail node, i have tried inputting the node ID as a int, as a string and nothing works.

    "_links": {
    "type": {
      "href ...
Score: 1
Fetch and combine values from nested fields: present all copyright credits in one block
jp flag

I have a content type using media fields, and using Paragraphs which also have media fields.

A typical page might look like:

  • node
    • field_media1 (one value here)
      • field_copyright
      • field_img
    • field_paragraphs (several values here)
      • field_media2
        • field_copyright
        • field_img

I'd like to pull out all the rendered field_copyright content in hook_node_preprocess and stick it in a variable to be re ...

Score: 0
thiokol avatar
Event called when an order line is removed
cn flag

In Drupal Commerce what event do i need to subscribe to when an order line is removed?

This questions talks about an order being removed/deleted: Which events are invoked when an order is removed or cancelled?

The Commerce documentation also only refers to entire orders in terms of events: https://docs.drupalcommerce.org/commerce2/developer-guide/orders/workflows/react-to-workflow-transitions

Howev ...

Score: 0
Mat avatar
How do I display a view block next to the branding block in the header?
za flag
Mat

I have created a view (Slideshow) containing a Flex Slider slideshow I want to display in the free header region right of and next to the branding block. I'm using the Bartik theme; I was disappointed to learn that seemingly blocks in the header always come out above or below each other. (I'd prefer blocks to overlap partially and use the view as a kind of background, but for now that's another cup of te ...

Score: 2
How to automize the config export to a custom distribution
kp flag

We use a custom Drupal distribution on our websites. There are also our custom modules in the distribution. The modules contain configurations.

When I change some configurations in Drupal Administration and export them with drush cex, they are updated only at the config/sync folder, but not in the distribution. I have to find the configs, copy them to the custom distribution modules and delete uuid and  ...

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.