Latest Drupal related questions

Score: 0
How do I update existing paragraphs?
vn flag

I'm writing migrations to import source data as paragraphs.

This is the main migration (which is working).

id: resource_chapter_section_text
label: Import content from the resource.body column in the source database as chapter_section_text paragraphs.
migration_group: redacted_web
source:
  plugin: resource_chapter_section_text
  key: migrate_web
process:
  # a real value will be placed here by the res ...
Score: 0
Manage webform submissions
cn flag

What would be a way to handle webform submissions, where we have multiple people monitoring and handling submissions and would like to set some kind of status for each submission (i.e. "being handled", "finished" etc.)? Much like a view, but with the possibility to add a status (and maybe a comment).

Score: -2
How can make a string used by a view translatable?
cn flag

I have a Events view that is added from the Fullcalendar View module. Is there a way to translate specific strings used from that view?

Score: 0
Atam Dhillon avatar
reCaptcha on webform does not present challenge if user skips it accidentally first time
ca flag

So here is the flow.

  1. user fills webform
  2. misses to respond to reCaptcha and hits submit
  3. The error appears to attend to reCaptcha BUT - there is no reCaptcha challenge presented again while the data user provided is saved.
  4. User is left wondering how to resubmit Captcha.
  5. Refresh the page is an option, but that removes the data that was saved on original user interaction and user will have to fill all elemen ...
Score: 0
How can I enable autocompletion for media entities in Link fields? The Link field seems to "know" only nodes, but no media entities
cn flag

The idea is to create an inline link on some arbitrary text typed in CK Editor. That link should target a file uploaded to a Media file entity.

in basic terms - when I select "Link" and type the media name, I should have a selection of media files that match the typed name.

Score: 0
Sherry K avatar
How can I avoid that deleting fields from B deletes also fields in A?
cn flag

I have two content types: A and B. B has a entity reference field to A. There are some fields in B which autofill from values in A.

When any of the fields which are used to autofill are removed from B, this deletes from A as well. Also because of reusing fields, I can't change permissions to ready only.

Is there any solution for this?

Score: 1
CamelCode avatar
Webform custom input mask
ve flag

I'm trying to apply a custom input mask on a webform textfield
What I want is pretty similar to the built-in "Currency (+)" input mask, except I don't want the currency symbol.
However I can't figure out how to simply copy the currency input mask rule in order to modify it.
From the webform source code it seems that the regex used for this input mask is ^\$ [0-9]{1,3}(,[0-9]{3})*.\d\d$ but if I ent ...

Score: 0
Kakoum avatar
Change ajax effect on form
us flag

i am making a multistep form, and I would have liked the transition between the steps to be done by sliding from right to left.

The Drupal API offers "fade" and "slide", but the slide is done from top to bottom.

Does anyone know how we can modify this transition effect and if it is possible?

Thanks,

Score: 0
Tobias Krause avatar
Change a node's type/bundle keep the old type/bundle in field tables
cn flag

I need to change the bundle/type of some nodes. I tried https://www.drupal.org/project/convert_bundles but there was no way to select just a few nodes and change the bundle/type so I tried the very simple way:

  $node = Node::load(123);
  $node->set('type', 'new_type_name');
  $node->save();

This seems to work: the content type of the node changed. But when I look at the field's database tabl ...

Score: 0
Limit Webform Submission to 2 and update the previous saved webform on second time submission
za flag

I am working on a webform with the requirement to add a submission limit and also to update previous submissions if a user submits the webform a second time. The first part is done by webform settings, restricted to 2 submissions per day and user. But I am unable to update a previous webform submission. Is there a way to achieve this?

Score: 0
Mock user with fields to use in a functional test
bo flag

How is it possible to mock a user with some simple text fields (for example, First name and Last name) in a functional test (which extends BrowserTestBase) without creating the configuration for this in the config/optional or config/install directory?

Score: 0
rukya avatar
How can I debug broken pdf (using Opigno & entity_print)?
id flag

I use Opigno_certificate and after upgrading to 3.0 (and D9) my pdf's are being generated wrongly (both Wysiwyg and templates): enter image description here

How can I debug it? I went to entity_print/src/PrintBuilder.php and did "kint($content)" inside prepareRenderer function and it looks ok, what else can I debug to find out what is wrong?

Score: 0
C.A. Vuyk avatar
Have a view with 'sticky on top' while sorting other items by ascending publishing date
cn flag

When using a view to show a list of nodes, I try to have it sorting by 'sticky on top'. As second sorting option the list should be on published date, ascending.

But, doing so, the view ignores this second option's 'ascending' setting and sorts on date descending.

Am I doing something wrong or should I do something else to get the right order? (I am using Drupal 9)

enter image description here

Score: 0
Create a line break for a link field in views
pl flag

I have a table view with 5 columns and 3 of the columns is a link field. I realized some of the entries have a long title field which causes everything to be compacted and misaligned. Currently, I do see it automatically insert a line break when there's not enough space. Would it be possible to create a line break for a link field if it exceeds x amount of characters, it'll go to a 2nd line? I'm new to  ...

Score: 1
Yakimkin Roman avatar
How to create functional tests for testing REST requests that the site has?
jp flag

I'm trying to understand how to create tests for REST Endpoint that a custom module creates.

I managed to create a Unit Test for the Get method of the Rest-resource and now I want to create a Functional test for the REST-endpoint.

The idea of the test is the following. The test should create a user account with required roles and permissions, authenticate it on the site and send a GET request on beh ...

Score: 0
user agent avatar
"composer install" works during upgrade but the autoload file is missing in the vendor directory
eg flag

I am upgrading a Drupal 8 site to Drupal 9. I removed the core, vendor, modules, and contrib directories; I ran composer install. All went well, but when I refreshed the page, I saw the following error.

Warning: require(/app/docroot/../vendor/autoload.php): failed to open stream: No such file or directory in /app/docroot/autoload.php on line 16 Fatal error: require(): Failed opening required '/app/docroo ...

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.