Latest Drupal related questions

Score: 0
Sergey avatar
Geolocation Geometry (Geometry) field cannot be edited in taxonomy term
us flag

I have a taxonomy type with Geolocation Geometry (Geometry) field type. I use custom Geolocation Geometry Lat/Lng to WKT widget (but the problem occurs with other widgets too).

The problem is that after filling in latitude and longitude and saving the taxonomy term I cannot change the field value anymore.

How to reproduce.

  1. Create a new taxonomy type with "Geolocation Geometry - Geometry" field ty ...
Score: -1
Monster971 avatar
Get the value of a field to do an if statement Twig
id flag

I am trying to generate a PDF with Entity Print. Until then all is well.

In my Twig page, I try to make conditional displays. But I can’t get the conditions to work.

I render my fields using {{ content.field_custom }} and that also works fine.

But the condition don't work , when I do something like :

{% if content.field_custom == 'John' %} ...

or

{% set field = content.field_custom %}
{% if field = ...
Score: 0
How can I avoid double line breaks (

) in a text field (field type: text unformatted long)?
ke flag

How can I avoid double line breaks (<br><br>) in a text field (field type: text unformatted, long)?

Users write text into this text field. When they hit Enter twice, the result is: <br><br>. But <br><br> is not themable with css, the height of <br> can NOT be set with css.

Therefore <br><br> should be avoided and paragraphs <p> used instead o ...

Score: 1
LeraA avatar
How can I customize breakpoints in USWDS base theme?
cz flag

I'm using the USWDS_base theme as a base for my custom theme. Version 8.x-2.10

In this file: web/themes/custom/my_child_theme/sass/_uswds-theme-utilities.scss I find the tokens used for the breakpoints (see screenshot).

In the comments, I can see what size those tokens represent. I can't find anywhere where those numbers are set so that I can override them. I've been combing through the theme for h ...

Score: 0
Sidney Sousa avatar
How to add index to paragraph template
af flag

I want to use paragraphs to implement a carousel, and for now, I have the outer paragraph called slideshow, and the template is paragraph--slideshow.html.twig. Then, inside this paragraph, I can add slides, and the template is paragraph--slide.html.twig.

At the moment, I only have the default paragraphs template which looks like this:

{%
  set classes = [
    'paragraph',
    'paragraph--type--' ~ par ...
Score: 0
Adi avatar
Show pop-up form after every drag and drop
um flag
Adi

I'm working on functionality based on the Homebox module. Whenever a drag and drop operation is performed, I want to show a form in pop-up. Does anyone have experience with it?

Score: 0
Extect avatar
With sites/default/files not part of the git repo, which content will be used in dev?
cn flag

I am using a composer managed Drupal install and want to use git to move it between development and production environments. From what I understand, the only directory that is not supposed to be in the git repo is sites/default/files. Everything else incl. modules, themes, composer files etc. would be in the repo. Composer would only be run in local dev, but not in production.

What I don't unders ...

Score: 0
How can the Webform element Form display defaults be set?
cn flag

Every webform element has a little section like this:

Form display section with Title display, Description display, and Help display all set to " - Default -"

Where can one set these defaults, for Title display location, Description display location, and Help display location?

It does not appear to be in any of the webform overall settings or webform specific settings.

If it's the default for the element type, is there a programmatic way to override the default (but not if set for an individual ele ...

Score: 0
H M avatar
Integrating jQuery Auto Height with Views Infinite Scroll
mw flag
H M

I have a views block with an infinite scroll (using Views Bootstrap and Views Infinite Scroll modules). The block displays cards and I want them to have the same height. jQuery Auto Height does that well. However, it only happens for the initial load. Auto Height has no way of knowing to fire on subsequent Ajax calls. What is the best way to integrate them so that Auto Height is called on each infinite ...

Score: 0
Josh avatar
Underscore JS Not Loading
yt flag

I am writing code that uses Underscore JS in Drupal 9 that should be loaded from /core/assets/vendor/underscore.

I am using Chrome DevTools to see the sources and though jquery, jquery-once, and modernizer are all loading from /core/assets/vendor/ the underscore library is not.

I am almost positive that this was working last week. I have updated my code since then but it is the same use of underscor ...

Score: 0
peterbe avatar
FillPDF not displaying 'foreign' characters
in flag

I'm using the fillpdf module with the online FillPDF service to render the PDFs. Most everything is working great; however, if a database field I'm displaying on the PDF contains certain 'foreign' characters, those characters don't display at all.

Notably, this occurs with the circumflex (ĉ) and caron (č) characters. Other foreign chars display fine (eg ö, é, è ...).

Not sure if this is an issu ...

Score: 0
Managed_file with table of uploaded files
lc flag

Adding a file field to a custom node type results in a nice UI with a table appearing for all uploaded files, with a Remove button for each. But simply adding a managed_file to our own forms, eg:

$form['attachments'] = [
  '#type' => 'managed_file',
  '#title' => t('Attachments'),
  '#description' => $descriptions,
  '#upload_validators' => $validators,
  '#upload_location' => $this->get ...
Score: 0
Gabriel Fernandez avatar
How to handle large queue process
cn flag

I'm using the QueueWorker plugin to do some update/create node process in the background. On local there isn't an issue, it completes the whole queue process. However on the aws server it usually stops at some point. I'm assuming because of the resource consumption on the server. Whats the ideal way to optimize my QueueWorker?

Here is my code:

$offset = 0;

while (TRUE) {
  $nodes= \Drupal::entityQuer ...
Score: 0
steevee666 avatar
How to replace the default page and tab of profiles in the user account?
in flag

I installed the "Profile" module on my "Drupal 9" website. When I create a profile type, the module automatically creates a tab in the user account for each profile type.

For my profile type "projects" the user account tab displays the page for this profile type, with this path :

/user/ID/project/list

Here is the view added by the module :

enter image description here

Here are the tabs created in the user account :

enter image description here

I created ...

Score: 1
matsbla avatar
How can I provide my own replacement patterns to be used in config form?
pe flag

I want to give a configuration form where user can configuration text on a widget, like the description and button label, however I want to provide a replacement pattern to be used, like {{count}} so the user can write for instance "{{ count }} images remaining". How can I provide replacement patterns to be used in the configuration form?

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.