Latest Drupal related questions

Score: -2
How do I automatically generate documentation for my site?
hk flag

I am working on a complex Drupal site with a lot of custom modules, custom entities, custom classes, custom views, custom events, custom event subscribers, custom forms, custom controllers. In short, a lot of custom code.

It is a big challenge trying to keep the technical documentation for the system updated when we keep making changes to the application on an ongoing basis.

Is there some way to gen ...

Score: 0
Checkboxes in Webform Custom Composite Table
us flag

I've been testing Drupal 9 and Webform 6.2.0-beta2. After researching a few hours, my understanding is that the current Webform doesn't support checkboxes in custom composite fields tables. Is that correct?

For instance, a field type "checkbox" with multiple options like "red, yellow, blue, and black". Once the form processes, these options don't appear on the page.

enter image description here

Score: -4
Dealing with tens of thousands of 404's when migrating from MediaWiki to Drupal
jp flag

I have a MediaWiki 1.36.1 website with nearly 2,500 content webpages (generally all of these are either article or Category:) which I consider to migrate to Drupal.

Moving each piece of content from MediaWiki to Drupal isn't feasible due to heavy usage of MediaWiki syntax inside the source code of each article and I either can't or don't want to translate it to Drupal CKEditor syntax.

I might bac ...

Score: 0
How to hide / modifiy ['operations']['#links'] edit / delete under structure -> menus in D8
ng flag

I am trying to hide the edit and eelete links in the operations menu under structure -> menu for specific roles.

I was just trying to hide the operations dialog at all by this code but it returns an:
Error: Cannot unset string offsets in my_menu_form_menu_edit_form_alter()

/**
 * @Implements hook_form_FORM_ID_alter().
 */
function my_menu_form_menu_edit_form_alter(&$form, FormStateInterface ...
Score: 0
Aurora avatar
How to get node object from entity referance in paragraph twig template
cn flag

I created a content type named "programs", with an image, short description field. Then I created a paragraph type and added a field as entity reference of programs.

Now in the paragraph twig template or in the field twig template, how can I get the value of image, and short description field?

In the field paragraph twig template

item.content

has only title and node id.

Score: 0
AJAX callback not fired in hook_form_alter()
br flag

In Drupal 7, customer wants to add a button to the user_profile_form. So in my custom module, I create the button and its companion callback. But while the button appears on the form, I see no evidence the callback is being fired.

function member_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == "user_profile_form") {
     
  $form['send_reset'] = array(
          '#type' => ' ...
Score: 0
vctlzac avatar
Migrate PHP version - The "" plugin does not exist
in flag

I'm using Drupal 9.3.11 on PHP 7.3. Site is running perfectly. I need upgrade to PHP 8, but I am getting this error.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist. Valid plugin IDs for Drupal\Core\ImageToolkit\ImageToolkitManager are: gd in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core\lib\Drupal\Component\Plugin\Discovery\Discov ...

Score: 0
Perform and store a calculation from a common field in two different nodes
us flag

Summary

I am collecting survey results - one for a pre-test and one for a post-test and I am looking for a way to automatically generate a calculation on a numerical field in two nodes (one pre-test, one post-test) and store that calculation.

For example in a content type "Survey Result", I have the following two nodes:
Node A:

  • field_participant_id: 111
  • field_pre_or_post: pre
  • field_mean: .5

Node B:

 ...
Score: 0
Anton avatar
Wrong user page loaded after user_login_finalize()/user_logout()
de flag

I have a third party login custom module that calls user_login_finalize() after authentication, and user_logout() upon logout. Both of these functionalities work except if the user logs in/out from the /user path in Drupal, the page loads the version of the /user page that should have rendered prior to login/logout. So when logging in, the page shows the unauthorized warning that was there at first, unt ...

Score: 0
How to add the domain to the Link field?
cn flag

I activated the Link module that is part of Drupal core. I want to add on the user profiles fields with links to social pages and limit the domain used in the link.

How can I add such restriction to the link field?

I also tried the Social Media Links Block and Field module, but it uses a third-party library for the icons and it does not suit me.

I would like to make the link form elements appear  ...

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.