Latest Drupal related questions

Score: 0
Bavramor avatar
Composer update Error after Composer-Update from 1 to 2
sg flag

My Linux had a Composer upgrade to Composer version 2.1.9. No problem with the newly set up Drupal. Only I still have an older Drupal lying around, which I now also wanted to update Composer 2 and Drupal 9.

I have now oriented myself to the following documentation: https://www.drupal.org/docs/develop/using-composer/preparing-your-site-for-composer-2

With a "composer update --dry-run" I get the fol ...

Score: 2
David Gilmore avatar
Error while trying to create a local task for user order history
br flag

I am attempting to add a local task here (/admin/commerce/orders/{order#}). This local task should contain a view that takes the userid from the current order and displays that users order history.

I believe I have the view set up correctly and I can successfully add a local task here (admin/people/%user/orders) by adding the following to my links.tasks.yml:

  custom_module.people.user_orders:
    ro ...
Score: 0
How to programmatically append a Paragraph to another Paragraph?
in flag

I have a node (e.g. a business "company") with a paragraph referenced field (suppose business "sector", with multiple fields). This paragraph has in its fields a reference to another paragraph (suppose "employee" with multiple fields, one of this is a reference to a taxonomy term). In a hook_form_submit(), with $form and FormStateInterface $form_state as parameters, I need to programmatically associate m ...

Score: 0
Matoeil avatar
how to select for revisions of one language?
za flag

the node revision delete module do not distinguish the language of the revisions.

The sql query for candidate revisions of each node is :

SELECT t.vid AS vid
FROM
(SELECT r.vid AS vid, r.revision_timestamp AS revision_timestamp
FROM
node_field_data n
INNER JOIN node_revision r ON r.nid = n.nid
WHERE (n.nid = '7459') AND ("changed" < '1644848132') AND ((n.vid > r.vid))
GROUP BY n.nid, r.vid, r.re ...
Score: 0
Kartagis avatar
How can I remove PDF download button?
lu flag

I am using the pdf_reader module and showing my PDF on the node. Now, I am supposed to hide the download button. For this purpose, I wrote the below javascript file:

jQuery(document).ready(function($) {
  document.querySelector('#download').style.display = 'none';
});

It's also in my theme's libraries.yml file. The last thing I did was write a hook_preprocess_node implementation and put in the below c ...

Score: 0
How to stop cron process without rebooting my server?
br flag

I have tried the following:

drush php-eval "\Drupal::lock()->release('cron');"

This had no effect. I'm still seeing "Attempting to re-run cron" errors pile up in the log.

I also tried the mysql query:

DELETE FROM semaphore WHERE name = 'cron';

The query ran fine, but had no effect. I'm still seeing "Attempting to re-run cron" errors pile up in the log.

I also checked the processes:

ps aux | grep c ...
Score: 2
Can routing use parameters already in the URL?
cn flag

I'm actually using D9 to build a system with entities using sub-entities. The main entity system use the following path : /item/{item} Each sub entity is related to a main entity and use this path : /item/{item}/sub_item/{sub_item}

So to access the edit or delete form, the following pathes are required :

/item/{item}/sub_item/{sub_item}/edit /item/{item}/sub_item/{sub_item}/delete

For example : /item/1 ...

Score: 0
nathan111777 avatar
How do I fix these issues I get on a cloned site?
fr flag

I am maintaining a Drupal site using Docksal, at work. During the weekend, I wanted to work on it at home, from my computer.

  • I cloned the repository

    git clone [email protected]:user/project.git folder
    
  • I pulled up all the branches

    git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
    git fetch --all
    git pull --all
    
  • I ran the following commands ...

Score: 0
Search View location filter not working after change from Solr to DB server?
cn flag

I have a search view that allows the user to filter a list of people by distance from a location the user can input. This uses the 'Location: latlong pair' as the filter.

Unfortunately we've had to temporarily switch from a Solr server to a DB one, and now it seems like this feature no longer works. All results will still show no matter what, though the other filters still seem to work.

Is there a w ...

Score: 0
Is there a way to improve the entity autoselect especially for multiple entities?
jp flag

The entity autoselect is a strange UI element that lets you type something, if you select a match, it puts that text in. If you want to include two items you need , to separate them.

  • What if there are commas in the title of the selected entities?
  • It's very easy for the user to hit backspace (or similar) and leave the entity improperly specified.
  • Expanding on the last point, if a selected entity is  ...

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.