Latest Drupal related questions

Score: 1
Custom Flag not appearing in "Configure Relationship: Flags"
ae flag

I am building a community site to link former co-workers. I have used the Flags module to allow users to tag locations/teams. I am trying to use views to now list all the users who have flagged a location/team. When I try to add my flag to "Configure Relationship: Flags" it is not an option. Can anyone explain this?

EDIT I started with a list of users, those users have flagged the node with a cust ...

Score: 0
ice70 avatar
Workspace: paragraphs created in stage are unpublished on live
cn flag

On Drupal 9.3.5.

I appreciate workspaces is currently experimental. I am not sure if the behaviour I am seeing is intended or if there is a way to change it.

Paragraph refers to the module: https://www.drupal.org/project/paragraphs

  1. In the live workspace, create a new node and add a paragraph.
  2. Save/published the node
  3. Switch to stage workspace
  4. Edit the same node, add another paragraph, saved
  5. Published ch ...
Score: 0
beta-developper avatar
Get count of related entities
ye flag

I have two entities, Post and Category

A Post belongs to a Category via a entity_reference field type name category_id

I want to get a count of posts belonging to a category (To prevent deleting a category that has posts)

My solution is this:

class PostDP{

  private string entityTypeId = 'entity_post';

  private EntityTypeManagerInterface $em;

  public function __construct(EntityTypeManagerInterfac ...
Score: 0
Francesco Marchetti-Stasi avatar
Term weight is a string?
iq flag

I am getting a taxonomy through a REST plugin, and I return it as an array keyed by id, since I also have to access it by id. But when I display the values in an HTML select, I have to order it by weight, so I am ordering it in a javascript function. I got unexpected results, and I traced it to the fact that Term::weight() apparently returns a string rather than an int, or at least this is what this tes ...

Score: 0
Dipti avatar
How can improve performance?
in flag

I have a very complicated form with 7-8 tabs and 150 elements on forms. The form initially loads very slowly and it will take 30 - 40 seconds to load and sometimes gateway times out error. When I used small forms then loading fast. Is any way to improve webforms performance? While adding elements/add pages also taking time. I have installed webforms 6.2.0-beta1 version. Please suggest possible solutions ...

Score: 1
Stephan Sutter avatar
Use AJAX not working when view is rendered programmatically
in flag

I have a view that is being rendered like this

$view = Views::getView('view_id');
$view->setDisplay('block_1');
$view->execute();
$render = $view->render(); 
$html = \Drupal::service('renderer')->render($render);

The $html variable is being returned in the build method of a Block

public function build() {
    return array(
      '#theme' => 'theme_template',
      '#view' => $ht ...
Score: 0
Dylan avatar
Ajax only binding once
kr flag

It looks like Drupal changed to a different, non jQuery version of once, and now all of our code that updates the DOM and needs to reattach the events for AJAX elements no longer reattaches them; Drupal.attachBehaviors() no longer works.

Score: 1
ymdahi avatar
Separate templates for flag links on views and node page
in flag

I have a flag called bookmark. The link to this flag is available on a View and the node page.

On the view, I would like this flag link to only display as an icon as the link.

On the node page, I would like this flag link to include an icon and some text (like Add to bookmarks")

When I create a custom template for it, like flag--bookmark.html.twig, this template alters the flag link in both (all) spot ...

Score: 1
liquidcms avatar
Why isn't config for Views plugin module translatable?
us flag

I am trying to write up a patch for this module: https://www.drupal.org/project/readmore. There is a patch for it: https://www.drupal.org/project/readmore/issues/3055200 which adds configurable text for the "read more" and "read less" links provided by this field formatter. But the configuration for these new settings are not translatable.

I noticed that the readmore.schema.yml did not include entri ...

Score: -1
rukya avatar
How can I pass more variables/trigger preprocess to plugin block?
id flag

The block opigno_documents_last_group_block is located in opigno_learning_path/src/Plugin/Block/DocumentsLastGroupBlock.php, which looks like this:

<?php

namespace Drupal\opigno_learning_path\Plugin\Block;

use Drupal\Core\Block\BlockBase;
use Drupal\Core\Url;

/**
 * Provides a documentslastgroupblock block.
 *
 * @Block(
 *   id = "opigno_documents_last_group_block",
 *   admin_label = @Trans ...
Score: 1
Stefan Korn avatar
Use deriver in Drupal Migration yml
in flag

I am trying to use the deriver key in a migration yml to have dynamically build migrations for each bundle of an Entity Type (Drupal 9).

I read this and I am trying to use the deriver key to point to a Deriver class in my migration. However it seems that the deriver key is just ignored.

Is there something else that I need to do beside using the deriver key and create a deriver class that inherits fro ...

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.