All Questions

Filter by
Sorted by
Tagged with
-2 votes
0 answers
13 views

How to put the result that return function form the .module file to the method of the class that is in the file of the src folder?

In my module file custom/entity_product_admin/entity_product_admin.module there is a function: function _entity_product_admin_get_product_min_price($custom_product_id) { // code } Which returns an ...
  • 1
0 votes
1 answer
8 views

Getting error "PHP files in the Drupal files directory can be executed." in Security Review v.7.x-1.3

I am on Drupal 7.92. When I run Security Review I get the error "PHP files in the Drupal files directory can be executed." in Security Review v.7.x-1.3. The sites/default/files directory is ...
  • 263
0 votes
0 answers
11 views

Why does placing a menu block on a page stop the page from being cached for anonymous users?

If I show a menu block on a page, that page will never be cached for anonymous users. Is that expected behaviour or is it caused by something else on our site? If it is caused by something else, ...
0 votes
0 answers
18 views

Printing the node title instead of the file name from a field

I have a block view, which is an unformatted list which prints my content type. All content has a field_file which I access using views-view--download--field-file.html.twig. This prints a file link ...
-1 votes
0 answers
18 views

How to install a npm package on Drupal 8/9

I want to use ntp-client on my Drupal site. What is the proper workflow to install and maintain this or any other npm package for that matter under Drupal? Thanks
  • 406
0 votes
0 answers
5 views

How to apply Views bulk operations on nodes related with layout builder settings?

I have a number of nodes of a particular content type with Layout Builder enabled. Layout Builder has an option to revert to the default for each node of a content type. How can we expose this ...
  • 836
0 votes
0 answers
11 views

How to direct content to individual users rather than posting on homepage in Drupal 7 [closed]

I have created a content type called MEMO in drupal, after creating the MEMO i want to send it to individual users on the Drupal page and not post it on the homepage for every user to see. Any module ...
-1 votes
1 answer
18 views

D8 Console Error | fontawesome in libraries.yml | mime type ('text/html') is not supported stylesheet MIME type, and strict MIME checking is enabled

Im just trying to add Fontawesome to my new custom theme in libraries.yml but im getting: mime type ('text/html') is not supported stylesheet MIME type, and strict MIME checking is enabled. global-...
-2 votes
0 answers
18 views

Why does the site redirect from https to http when I do some modification?

Browsing through my site is working fine, but when I do some modification on my Drupal site, it goes to http instead of https, which gives "Connection timeout". The Drupal site depend on ...
-2 votes
0 answers
23 views

Update translated media object name programatically [closed]

I'm programatically adding translations to media entities and I'm not able to update the name. $photo_es = $photo->getTranslation('es'); $photo_es->name = $title_es; $photo_es->field_body->...
  • 17
0 votes
1 answer
18 views

How do I make the default content View filterable by multiple content types?

Below is a clip from the content list admin page in Drupal 9, showing the Content type field drop-list, allowing admin users to filter the content list by content type. Is there any way to alter this ...
  • 3
2 votes
0 answers
45 views

Field formatter with twig editor in settings form

I've created Drupal 9 module with custom field formatter for many field types (string, entity_reference, image etc). I'm trying to implement twig editor in the formatter to control output. I need to ...
-3 votes
0 answers
39 views

html to drupal conversion [closed]

Someone might say that my question is too broad or out of scope, but please read my post carefully and try to understand what I am asking. I want to convert an html template to drupal. There are ...
  • 435
-4 votes
0 answers
22 views

jQuery modules are missing [closed]

Probably by mistake I have deleted jQuery modules. vendor/bin/drush updatedb [error] (Currently using Missing or invalid modules The following modules are marked as installed in the core.extension ...
-3 votes
1 answer
32 views

How to remove a module with command line?

After uninstalling all relevant modules with drush un I have tried the following input and got the following output, but I don't think I did it correctly. composer remove vendor/panels vendor/panels ...
-2 votes
1 answer
31 views

How to set an email recipient in Webform? [closed]

I need to list one recipient for a contact form I've created with Webform module. I tried to look for this in /admin/structure/webform/manage/contact/settings but didn't find where to list a recipient ...
0 votes
0 answers
20 views

How to set visibility or hidden for the user registration form custom fields using hook function in drupal 9

I am new to Drupal. I have created new two custom fields via the admin panel in the user registration form. For example, I want to show only the "DOB" field should be visible only on the ...
  • 1
0 votes
0 answers
11 views

Filter by two fields in a paragraph

I’m trying to add an exposed filter to a content type, containing a paragraph than can have multiple entries. This paragraph contains two taxonomy fields with hierarchy. And I’ve got a view with ...
-3 votes
0 answers
39 views

Your message has been sent. WITH Unable to send email. Contact the site administrator if the problem persists [closed]

Drupal 9.4.6 with Webform module. I have created a simple contact form but when sending it I get both messages: Your message has been sent. Unable to send email. Contact the site administrator if the ...
0 votes
1 answer
16 views

How to remove or hide the Subject field for comments?

I have added a comment field to a content type. It is of the default comment type. I don't want my commenters to fill in a subject, rather, just a comment body. Trying to remove the Subject field, I ...
-5 votes
0 answers
22 views

How to remove Olivero empty area? [closed]

If you install Drupal 9 with Olivero and check the website from desktop display, you may see the following empty area in the rightmost or leftmost part of the window. I want to remove that empty area ...
1 vote
0 answers
23 views

How do I recreate Ubercart's product attributes?

While rebuilding an old D7 site with Ubercart into a new D9/Commerce installation, among other problems, I stumbled upon this one. In Ubercart I can add as many product attributes as I want and make ...
  • 11
0 votes
0 answers
55 views

What might cause nodes to save very slowly when multiple terms are selected in the default tags field? [closed]

Drupal 9.4.5 I have 4,457 tags I imported using migrate_plus and migrate_source_csv There is no hierarchy. In the article content type I have the default tags field with a tag style autocomplete ...
  • 129
0 votes
2 answers
41 views

How can I translate Olivero default search string? [closed]

In the default theme for Drupal 9 (Olivero) I have the following string in my search box field: Search by keyword or phrase. I have tried to change it by going to admin/config/regional/translate (...
0 votes
1 answer
20 views

JSON:API fundamental permissions and access restriction question

Intro JSON:API is declared as a must-have for decoupled Drupal websites. While I completely (well, I hope so) understand the built-in Drupal permissions/access restriction system, I have a specific ...
0 votes
1 answer
22 views

Hook menu alter - Restrict access to edit block - wrong page is shown

I want to restrict the editing of a block to users whom have X or Y permissions. I have tried access arguments and access callback. function MYMODULE_menu_alter(&$items) { $items['admin/...
0 votes
0 answers
46 views

I've just installed drush and am getting this error. What to do?

So I've just installed drush 11.2.0 with Drupal 9.4.6 and the first time I executed drush si, I got PHP Fatal error: Declaration of Drush\Application::setLogger(Psr\Log\LoggerInterface $logger) must ...
  • 547
-2 votes
0 answers
16 views

Adding HTML to page via module

I'm trying to inject some HTML into my DOM when I have my custom module enabled, because I'm want to add a block of HTML so that I can use it for popups controlled via javascript at a later point I'm ...
-3 votes
0 answers
17 views

Google couldn't fetch simple XML sitemap [closed]

I have created a simple XML sitemap and I can access it from example.com/sitemap.xml. The sitemap has many webpages indexed: Number of URLs in this sitemap: 92 When I try to notify Google about this ...
  • 5
0 votes
0 answers
32 views

What could cause these fields to be reverted to unsortable?

I've been working on this view for some time. I've 5 page and 5 block displays and have a table in each. I click the table settings, sort every field that needs to be sorted, then save the view, ...
  • 547
0 votes
1 answer
28 views

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "news" entity type does not exist [closed]

I am a Drupal newbie and I've been struggling with this since two days. I had an original Drupal project where I was playing around, adding content-types, contrib and custom modules etc. Then, I ...
0 votes
0 answers
17 views

Salesforce Suit - Duplicate User Creation Error During Salesforce PULL when Mapping ID differs [closed]

I am using Drupal 8 version. When Salesforce mapping ID changes for profiles, getting user duplication error when SF pull running to sync the profiles which is NOT considering existing profile with ...
  • 172
-2 votes
0 answers
10 views

How to implent correctly amp-form with webform

I have the goal to put some webforms into the AMP version of my Drupal site, so I use this code for webforms (twig amp for the webform): <form action-xhr="{{ url('<current>') }}" {{ ...
0 votes
0 answers
23 views

How to create a sitemap with XML sitemap module?

I understand that XML Sitemap module is the near-standard way to create a sitemap for a Drupal site. The Readme file isn't clear to me about how to create a sitemap. Install as you would normally ...
  • 5
2 votes
0 answers
22 views

How to manage the order (or dependencies) of entity creation for a module that defines multiple new custom entities

I have a module I'm building that creates and uses multiple custom entities. For each entity I've created a relevant file, new_module/src/Entity/modulename_entity1.php, new_module/src/Entity/...
0 votes
0 answers
15 views

How to display a block view based on certain items in a field?

I have a member content type for my site which has a field of field_member_position which has 3 options available to it: Member Mentor Both I've created a block view which I want to be displayed in ...
-2 votes
0 answers
16 views

How can I send notifications to content editors to review content after a specific time interval?

I need to send content review email notification to content editors when a content is not updated for a specific duration. For example I have two content types, Article and Blog. If an article content ...
-1 votes
0 answers
52 views

How to layout blocks?

How to layout blocks? How to split a block into two or more sub-regions (sub-layouts) responsively, without involving any CSS coding by the end-user? We would get, for example: |-| |-| Or |-| |-| |-...
2 votes
1 answer
63 views

How can I make route parameters optional in a routing callback?

I needed to create a route in which the path of the route would be completely dynamic and so I created a routing callback. <?php namespace Drupal\uber_affiliate\Routing; use Symfony\Component\...
  • 836
1 vote
0 answers
19 views

Facets not working with Algolia search

I am implementing Algolia search and using the following contributed modules Search API Algolia Facets After configuring the modules, the content/data indexing is working fine and is reflecting on ...
-4 votes
0 answers
30 views

How can we copy files from public file system to encrypt file system programmatically?

I have a drupal 9 site. There is a zip file in public folder(sites/default/files/), I have extracted the zip and kept it inside public folder(sites/default/files/). This extracted folder contains a ....
-1 votes
1 answer
21 views

How to create a view of the most popular nodes?

How to create a view of the most popular nodes? I went through the filter criteria looking for something such as "most read" or "most visited" or "most popular" but I ...
0 votes
0 answers
11 views

Help with using migration_lookup with paragraph migration

Drupal core 9.4.5. Paragraphs 8.x-1.2 I am attempting to migrate Drupal 7 books to Drupal 9 paragraphs. I will use custom SQL source plugin which provides all the data I need. I have two D9 ...
0 votes
1 answer
12 views

Is there a way to see the date of when webforms were opened and closed?

I'm using Drupal 9 and would like to know when a webform was closed to check that we haven't had a security breach and received submissions after the form was closed.
-1 votes
1 answer
20 views

How to install a theme with the command line?

I am trying to install the theme Adaptivetheme. I have tried this composer require drupal/adaptivetheme and then: vendor/bin/drush theme:enable adaptivetheme But I got: Unknown themes: ...
0 votes
1 answer
48 views

How can I catch a login event in a subscriber?

I've got an event that is triggered on hook_user_login in a module. $event_dispatcher = \Drupal::service('event_dispatcher'); $event_dispatcher->dispatch('mymodule_user_login', $event); I also ...
  • 798
0 votes
0 answers
13 views

How do I insert the corresponding text content from source into email based on selection?

I have run into a wall trying to find a solution to this problem and am hopeful someone here may have some feedback or ideas. (I'm on Drupal 8 btw) A department in my organization wants a form with a ...
0 votes
1 answer
28 views

Why does ckeditor_config make it impossible to update Composer packages?

I've got a Drupal 9.4 site that I've upgraded my database stack (XAMPP dev stack) to the latest version that is using php 8.1, but now have package incompatibilities showing up when I try to run "...
0 votes
1 answer
28 views

I cannot update packages because https://www.drupal.org/9/packages.json cannot be downloaded

Trying to do a simple composer update of my core Drupal packages to the latest recommended version, and I'm being hit with a 404 and it won't update. The error Composer spits out when running composer ...
0 votes
0 answers
20 views

How do I remove the view container from Drupal 9 custom theme for a particular view

I am new to Drupal theme development and would like to know how to remove the view container divs that hold views-element-container, view and view-content. I tried to change the template file ...

15 30 50 per page
1
2 3 4 5
1730