Latest Drupal related questions

Score: 3
How are the Ignored and Undefined config schema classes supposed to be used?
by flag

In Drupal\Core\Config\Schema there are two classes Ignored and Undefined, but they're empty.

How are they meant to be used?

Score: 0
nschildre avatar
How to recover 1 missing view and webform out of many after moving to another server?
ng flag

After moving my Drupal 9 site to a different server I see all views in the Views UI, but one. Same with one webform. All are there, but one. I looked in the config database table and the view and blocks are listed there. I don't know if this is a mismatched UUID problem or what. Anybody have any pointers, how I can get that view and webform to show up? I just imported the same Database that was working  ...

Score: 0
Codium avatar
How to set bee / bat unit timeline to be unavailable by default?
us flag

As in question. I'm using bee (based on bat) module. Currently all time is green, available for booking. My task is to allow user to select availability period first, then allow bookings only in specified time slots.

Score: 2
ersincebi avatar
How can I update an entity with a .yml file?
gb flag

I see that EntityDefinitionUpdateManager::applyUpdates() has been removed.

Every time I add a new field to a .yml file or I add a new node.type.yml to the configuration directory in a module I am developing, I reinstall the module to see newly added fields.

Introduction to update API for Drupal 8 shows an example where hook_update_N() reads .yml files one by one. It would be very inefficient 100 ...

Score: 0
Jorn Reed avatar
Twig debugging does not work
il flag

I tried to enable twig debugging, to be able to use {{dump(var)}} I followed the drupal docs exactly. Copy the default.services.yml, Change the copy it's name into services.yml. And set debug on true.

When I click on Clear all caches, and I try to reload the page, it won't stop loading. I wonder what is going wrong.

Score: 0
fallenturtle avatar
Get term custom field value from referenced entity
au flag

I have a node with a taxonomy term reference field. That taxonomy is a list of names can be assigned to the node and it has its own field with an email address in it. I'm trying to create a rule that when a person/term is selected and the node is saved it will send an email to that person letting them know the node has been assigned to them.

I've see a few places where this situation has been ans ...

Score: 1
Is there a way to default sort by date when no search keywords have been used, but default sort by relevance for all searches?
pe flag

At present, my project has default search pages for sections of the site. They are per-content type. When the user goes the "search page" for the content type, they see a views-generated search result page unfiltered by any keywords. In other words, it displays all the items for that content type. The view:

has expose form in a block enabled settings on the exposed form has 'input required' disab ...

Score: 0
sonfd avatar
How can I load the transitions for a particular workflow?
in flag

I want to load the transition objects for a Workflow. In Drupal 8, I see a Workflow::getTransitions() method, however it seems this method was removed in Drupal 9.

Score: 3
Kevin avatar
Properly storing an array in a config object
in flag

In a config object, I want to store an array of values. The keys matter. The stored value is coming from a checkboxes element, so the array would look something like:

['article' => 'article', 'page' => 'page']

Here is the config schema:

mymodule.settings:
  type: config_entity
  label: 'Mymodule Breadcrumb Settings'
  mapping:
    node_bundles:
      type: mapping
      label: 'Bundle machi ...
Score: 1
Kevin avatar
Add simple config object as a cacheable dependency?
in flag

I am building a custom breadcrumb that has some admin settings from a module in Drupal 9. When that settings form is saved, I want any breadcrumb cache that was built with this builder to be invalidated.

I tried passing my config object into the builder as such:

$breadcrumb->addCacheableDependency($this->config);

Only when I save the form, the breadcrumb serves the cached version until I clear it.  ...

Score: 0
What is the token for an original image URL?
br flag

The is the token to get the url for a "large" image style:

[node:field_image:large:url]

What is the token that will give me the original file URL for the image? That is, not an image style preset, but the original image.

I have tried the following:

[node:field_image]
[node:field_image:url]
[node:field_image:default:url]
[node:field_image:original:url]
[node:field_image:none:url]

None of these work. I ...

Score: 0
Rob avatar
Error: Call to a member function getTranslation() on null
cn flag
Rob

I'm trying to migrate/rebuild my Drupal 7 site in Drupal 9. Started with an empty Drupal 9 site set to minimal rather than standard installation and used Migrate / Migrate Drupal / Migrate Drupal UI to upgrade the site. On the new, drupal 9 site, it looks like the content and content types came over (though I have not figured out/rebuilt Views, Contexts, or Taxonomies yet).

If I click on 'create  ...

Score: 1
entity_generate process plugin issue with node generation
in flag

I want to use use entity_generate plugin to create a node for each row of source I'm migrating. I'm getting 'title' source field and want to create a node in some my_content_type, with that title. My migration looks like:

  # Field to populate
  my_content_type:

    plugin: entity_generate
    source: title
    entity_type: node
    bundle: my_content_type
    value_key: title
    bundle_key: nid
 ...
Score: 0
Any Context PHP Condition Plugin going forward
au flag

The context module relies on the now deprecated php filter module for the PHP conditions. Basically, if you want to write a context with condition based on PHP, you must install php filter.

Since php filter is now deprecated, is there any module replacing that?

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.