Latest Drupal related questions

Score: 0
How does importing a contrib module's translations work?
cn flag

Drupal version: 9.3.13

Basically, I'm trying to understand how using a contrib module's translation works. I want to be able to download and use the translations from the Drupal infrastructure, and can't seem to get this to work.

I have a site with two languages, English and German (Default). I did run "drush locale-check" and "drush locale-update", and that imported the German core language file (w ...

Score: 1
How to get parameter from dynamic route in route subscriber
ng flag

I am trying to restrict access for non admin users on admin/structure/menu so that only admins can create any new links via admin/structure/menu.
Now I want that for one special menu with the ID "Focus" the "Add Link" button is available for another role too.

Here is a Screenshot of the actual backend with the "Add Link" still availabe. I want this to be gone for Hauptnavigation but not for Fokusnaviga ...

Score: -2
quantumized avatar
Is it possible to not have to clear the caches every time a twig template file is edited in development?
ng flag

I've got "cache" set to false in service.yml - but I still have to clear the Drupal caches for each template change I make. This is obviously time-consuming if you're doing some trial and error testing. Is there a way to bypass the template caching while developing?

Drupal 9.

enter image description here

Score: -1
Nafai avatar
Unable to add newly created term to the node
in flag

I want to add new taxonomy term to group of nodes that have specific terms already.

To retrive them I use this function

function getNodesByTaxonomyTermIds($termIds){
    $termIds = (array) $termIds;
    if(empty($termIds)){
      return NULL;
    }
  
    $query = \Drupal::database()->select('taxonomy_index', 'ti');
    $query->fields('ti', array('nid'));
    $query->condition('ti.tid', $term ...
Score: 0
Jude Hungerford avatar
Creating links in TableSelect rows
cn flag

I've created a module which defines a Form, but when I try to add a column of links, it is empty when I set the '#type' to 'link'. I am testing this on Drupal 9.3.x.

On the surface, this is the same as Add a link to a tableselect row, but the answer posted there does not contain the full working code, and I'm fairly sure the solution in my context is going to differ from the one posted there.

This is  ...

Score: 0
Brittany avatar
Title field returning ' where apostrophe should be?
ph flag

I have a series of fields on a View. For some reason, any node title field with an apostrophe in it is being returned to my endpoint as Jen's Cupcake Store instead of Jenn's Cupcake Store.

Any idea how I can fix this? Been at it for a few days now and I can't seem to find a single solid solution. Help is appreciated!

Score: 1
pglatz avatar
Can paragraph fields in a node be sorted?
in flag

I have a node content type with a paragraph field with multiple values. The paragraph has a date and a text field. When I display the node, I'd like to sort the paragraph values by date. I've tried doing this in twig with the sort filter to no avail. Can this be done somehow, maybe with preprocessing the field?

Score: -4
pglatz avatar
Installing console with php 8
in flag

I'm trying to install Drupal Console into a Drupal 9 installation, and get a php compatibility error:

% composer require drupal/console \
--prefer-dist \
--optimize-autoloader \
--sort-packages \
--no-update

...
drupal/console[v1.9.0, ..., 1.9.4] require php ^5.5.9 || ^7.0 -> your php version (8.0.8) does not satisfy that requirement.

Is Console compatible with Drupal 8? Is there a workaround?

Score: 0
Custom Simple Action after updating a node
cn flag

I am trying to create a simple way to execute certain actions on the database every time when I update a node.

I have been looking at Drupal's Action module, however I can't find any good manuals explaining how to use it. The ECA module works as a mechanism to launch my Action but I can't execute my Action and I don't know how to proceed.

I am currently creating my own module that will contain my a ...

Score: 0
pmagunia avatar
Changing the Moderation State Control Box input to a textarea
au flag

I wanted to change the moderation state control box input to a textarea like the image below shows. Currently the input only supports 128 characters but I believe log messages can hold much more in the database.

Moderation control input

Score: 0
How to solve "Mismatched entity and/or field definitions", specifically, "The URL alias field needs to be installed"?
cn flag

After migrating from 7.89 to 9.3.12 this warning appears:

ENTITY/FIELD DEFINITIONS Mismatched entity and/or field definitions The following changes were detected in the entity type and field definitions. File The URL alias field needs to be installed.

How do I solve this?

Score: 0
rd89 avatar
How to access node entity reference on comment save via rules?
tk flag

I have a content type with a user reference field on it, the users are populated here by a view.

When a user saves a comment, I want to access that field and send an email to user in the entity reference field.

Score: 0
liquidcms avatar
How to pass Block ID to a view?
us flag

I have a Custom Block type called HomeBlocks. This bundle has a paragraphs field which allows multiple paragraphs.

I then place (using Layout Builder) an instance of this block type on my home page (a node type called Landing Page). In the layout of the block type I have a View which lists some of the paragraphs added to that specific block. The view lists my paragraphs but lists all the paragrap ...

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.