Latest Drupal related questions

Score: 0
pepe199111 avatar
Recaptcha v2 module doesn't protect a custom forms
in flag

Recaptcha v2 as a standard has forms for protection: Comment, Contact Form, User Login (recommended for security), User Login Block (recommended for security), User Register (recommended for security). Customs forms aren't included and they have a protection under the captcha module. I added a custom form that has protection under the Captcha module, I found my custom form id and added it into the captc ...

Score: 0
Anshu Raj avatar
Drush Config import not working after Site-install Standard. There were errors validating the config synchronization
cn flag

I am Upgrading Drupal 8.9 to Drupal 9.2 and it's installed but when am I trying run -y config-import then getting error

[error] Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization. Cannot change the install profile from to standard once Drupal is installed. Unable to install the standard module since it does not exist. in Drupal\Core\Config\ConfigImporter ...

Score: 0
Tushar avatar
Getting validation error webp image upload
nz flag

I have added a image field to my "Blog" content type. In image field settings 'Allowed file extensions' section include webp format.

When I upload webp format image gerring below validation error. Am I missing somthing?

"The selected file hair-treatment-spotlight.webp cannot be uploaded. Only files with the following extensions are allowed: png, gif, jpg, jpeg."

Score: 0
Automatically import fontyourface fonts
dk flag

Is is possible to automatically import selected fontyourface fonts via config? Ideally, this would be just the fonts I've selected, not all from the source API.

I'm in the middle of a D7 -> D9 migration, and I keep having to manually press that 'Import from fontsquirrel_api' button each time I test the migration from scratch. And that entails downloading all 1021 FontSquirrel fonts, rather tha ...

Score: 0
user3717206 avatar
Unable to filter fields in Search API Solr index Query
cc flag

I'm trying to run a Search API search programmatically on my solr index. The issue is that the query is quite expensive so I'm trying to reduce the cost by filtering for specific fields. In Solr I would do this through the Field List Parameter as e.g. "fl=name,surname" but I'm unsure how to do this through a Search API Search. I've tried setting the parse mode to direct as well but I just get an error th ...

Score: 0
Site stuck in 'headers have already been sent' login loop after D9 upgrade
ru flag

Suggestions for debugging a site which is now stuck in a "headers have already been sent" loop after successful login (redirect back to login form)?

This is a production server for a site that's just been upgraded to Drupal 9. Session handling is absolutely fine on the development server so I'm sceptical about it being whitespace, closing tag issue (my one custom module is fine).

  • Comparing against defau ...
Score: 0
Lambic avatar
Entity reference field dependant on other entity reference field
ph flag

Drupal 9.

I have a content type with two entity reference fields.

The first entity reference field references group entities provided by the group module.

The second entity reference field references nodes of a certain type.

I want the second autocomplete to only find nodes belonging to the group selected on the first entity reference field.

What's the easiest way to accomplish this?

Edit: Still haven ...

Score: 1
Kevin avatar
Delete millions of unused Paragraphs and their data?
in flag

We have a site that after a few years has built up 10 million records in the paragraphs_item table. This is a result of lots of data migrations (where paragraphs are involved) and there are many orphans now (probably 90% of that).

Entity Reference Revisions ships with a Drush command now to 'purge' orphaned entities. This does appear to work - but with this many to look through it seems like it w ...

Score: -2
Read view field value in VBO action
in flag

I have a view grid that has custom actions to perform based on selected grid row. To read the view fields from the grid dpm-ed the below command:

dpm($this->view->result);

The above command returns:

enter image description here

I am trying to specifically read the "field_comment_id_comment_field_data_nid" and I get null every time:

 dpm($this->view->result[0]->field_comment_id_comment_field_data_nid);

Update: ...

Score: 1
GraphQL query to validate User Login
cn flag

I'm working on the Drupal decoupled project, where the client is VueJs and the backend is Drupal 9. I'm using Drupal's contrib module GraphQL 8.x-3.1 for the interaction between client and server. I'm new to GraphQL.

I created a GraphQL query to validate the user during login. Below is the query,

query{
  userQuery(filter: {
    conjunction: AND, 
    groups: [{conditions: [
      {operator: EQUAL,  ...
Score: -1
Matoeil avatar
How to configure upload of webform document files to public folders?
za flag

When configuring the storage location of a webform document file,i am not proposed to changed it from private to public.

That is problématic to expose that URI to a distant server.

enter image description here

Score: 0
How do I omit webforms submission number (serial) from results?
om flag

We have webforms that use Webform Entity Print (PDF) Attachment. These PDFs have Submission number show up right after form's headline. How do I hide this number so it doesn't show up in the results?

enter image description here

enter image description here

Score: 0
Joehoe avatar
How to prevend duplicates of content in a view?
tr flag

On a multilingual drupal website (version 9.2.10) A block duplicates content on the landing page when 2 of more languages are enabled.

The block shows random published content for a custom content type in a grid system with a cards layout.

Due to 2 extra enabled languages, for example Dutch and German, Dutch content is duplicated and showed 3 times in this views grid now.

This duplication of content di ...

Score: 1
Jean da Silva avatar
Custom Entity "changed" field is unknown
cn flag

I'm having a problem I really don't know how to solve, and need your knowledge. I have a custom entity that someone created, and forgot to add the "changed" field. So the objective is to add this field, and updated all entities to set the "changed" field to be equal to the "created" field.

Somehow even if I've updated the entity inserting this changed field, the database shows it, and when dumpin ...

Score: 0
Media Library: How can I pre-fill the caption when an image is inserted into a text area?
in flag

If I use Media Library to insert an image into a text area, the image's caption is empty and hidden.

Instead I want the caption displayed by default, pre-filled with text in the format: [Image entity name], by [username], eg '1960s street scene, by David'

(I'm migrating a site that uses D7 + the Scald module to D9 + core Media, and I want to replicate the old site's behaviour in the new site.)

Is there ...

Score: 0
drupal view how can i filter results for certain node ids
ca flag

i have created a view via the gui. I have tried to filter on the nodes i want, either with a normal filter and an or, and adding a few of them in a contextual filter. I face two issues: 1. i cannot add as a filter say 1000 nodes, and as a contextual filter as well.

  1. Even if i manage to get running the views for the given ids, i get timeouts, since i am searching against thousands of nodes.

Is ther ...

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.