Latest Drupal related questions

Score: -1
How do I stop a Fieldset on a node that contains an EVA from displaying the label?
in flag

I have a Fieldset on a node, for an EVA, that displays a label even when empty.

a) The fieldset is NOT checked to "Display element also when empty"

b) The EVA is set to validate an ID, and there's no ID that validates

enter image description here

enter image description here

Score: 1
sonfd avatar
How can I load a migration in a KernelTest?
in flag

I'm trying to test a migration with a KernelTest, but I'm running into an issue when I try to load the migration plugin.

My migration is defined in my_module/migrations/my_migration.yml. In my KernelTest, I've listed my_module and migrate in the $modules static property.

In a custom form, I use the following to load a migration plugin:

/** @var \Drupal\migrate\Plugin\MigrationPluginManagerInterfa ...
Score: 1
Free Radical avatar
How do I get the value of Markup::$string?
kz flag

I have the following code in a custom submit handler:

$status = \Drupal::messenger()->messagesByType('status');
foreach ($status as $delta) {
   // Here I want to extract the text string that is in $delta.
}

The variable $delta now contains this:

delta => stdClass Object
(
    [__CLASS__] => Drupal\Core\Render\Markup
    [string:protected] => Article request My article has been created.
)
 ...
Score: 0
bem22 avatar
How to render fields in nested paragraphs?
in flag

I'm trying to create a paragraph that will allow me to display several children's paragraph fields.

I added the children-paragraph to the parent paragraph via Entity reference revisions.

I created 3 template files in order to render my entities: paragraph--parent-paragraph.html.twig, paragraph--child-paragraph.html.twig and field--field-child-paragraph-reference.html.twig

With the children referenced ...

Score: 3
Free Radical avatar
How to not show the "has been created" message?
kz flag

I want to remove the message that is output in the message area when a new node is created. A typical message may look like this.

"Article My article has been created."

I examine the node in hook_node_insert, and when certain criteria is met, I want to delete the message or prevent the message from appearing.

I've tried to put the following in hook_node_insert:

 $messages = \Drupal::messenger()->a ...
Score: 0
Filter or sort Multivalue Field of referenced Media items to their boolean field
in flag

I have a list of users who can add audios to their profiles via an multi-value entity reference field. The media/audio has an additional Boolean field to check if it's a primary or normal audio.

In a view, I list the users (coming of an Search API index) and show 5 audios per user. It should show the primary audios first.

It is easy to accomplish with the Views Field View module. View 1: contextual  ...

Score: -2
NSTK avatar
Configure composer install path
id flag

Trying to install drupal via composer on a shared server.

The complete path to my website looks like this :

/srv/data/web/vhosts/mysite.tld/htdocs/

i have (limited) terminal access and write permissions on the two last directories :

mysite.tld and htdocs.

htdocs is the directory accessible through the web browser.

I installed composer then ran the following command from within mysite.tld directory : ...

Score: -1
thiokol avatar
Order workflow based on shipping method
cn flag

I need a custom order workflow that is dependent on the customer address.

I know I can define different order types with custom workflows, but this doesnt help as ultimately this is dictated by the products.

Basically I need to have a shipping method with a condition of postcodes, if a customer is placing an order and this shipping method is selected then the order needs to be received as pending fo ...

Score: 0
Interlated avatar
How do you use 'basic markup' in a webform default value?
km flag

How can you use 'basic markup' in a webform default value? The goals is to format the default text.

Steps

  1. Create a Basic HTML element
  2. Edit the element
  3. Using the 'advanced' tab set the default value.

Only plain text is allowed in this field. Any markup is rendered as markup not as HTML

Markup element default

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.