# All Questions

81,657 questions
Filter by
Sorted by
Tagged with
28 views

### Alternative for Code Per Node on Drupal 8

I'm looking for an alternative to the Code Per Node module on Drupal 8. I've tried Asset Injector and it has an issue that deletes all configuration files whenever the caches are cleared. Does anyone ...
35 views

### How to generate a number for Drupal Commerce SKU?

I have a site on Drupal 8 and Commerce 2.16 with a marketplace (several merchants with several stores). Each merchant can fill in the SKU field with their product variations. The problem is that the ...
16 views

I am using Drupal 7. I have just built a wonderful custom module. Now I need to add it to my main menu, under the parent item "Tools and Resources." I know I can go to the homepage and click on the ...
60 views

### Render paragraph reference field in page.html.twig

In page.html.twig I want to show a paragraph reference field which contains a left and right text_field. The name of the reference field in the node is: field_intro. That field is linked to a ...
19 views

### More options for page--node--edit.html.twig for content type

Using my Theme debug I'm getting the following themplate suggestions page--node--blogpost.html.twig page--node--edit.html.twig When I tried to use different template to edit a blogpost template ...
22 views

### Can we access paragraph field in views-view-unformatted.twig?

Is there a way to access the fields in paragraph in views-view-unformatted.twig. I want to perform checking on field of paragraph before print the row something like this {% for row in rows %} {% ...
30 views

### Configuration Import Error

I have a drupal8 in local system. I want to import my production environment configurations into my local. So i am running drush cim -y I got the following error. Unexpected error during import ...
40 views

### Drupal 7 Form API - AJAX updates for multiple file uploads

I have a Drupal 7 custom module form that uploads then processes multiple images. I have an ajax callback that updates page content with the processed images. BUT, the page update happens when all ...
25 views

### Drupal 8: how to generate options based on Ajax callback

In Drupal 8, I want to generate options of second select-box based on Ajax call of first select-box. The result generate a third new select box but I don't need to generate a new one. I want to ...
10 views

### More Images on home page will slow down the site? [closed]

I have a page that is set as a homepage. The home page is having around 50 images with different image styles added for it. Around 6-7 image styles are loading for all images displaying on the home ...
11 views

### Missing User in the Admin People tab

Drupal 8.6 I have only one user other than the admin user and it is active and working fine, but for some reason I can't see the user in the people tab in the administration panel, I only see the ...
34 views

### How to inject a service into a callback in ajax form? [closed]

I can't access to my injected service from inside a form #ajax callback method : this is the form element that triggers the #ajax callback ( which is an external class method): /src/Form/...
36 views

### Drupal 8 url after installation using drush site-install

I used Composer to download and install Drupal 8.8.1 on Linux and used drush site:install command for setup. Only the following lines/messages were shown after I entered drush site:install command. ...
16 views

### How to set all-day date value in a Rules Component

I have a node with a Date field set to February 8th, 2020 but when I try to set a Date Value as 'Data to Compare' but the date/hour keeps changing. How do I set the data value for all day? Drupal 7....
13 views

### Theme suggestion for file link in on commerce product page

I'm listing some files for download on a commerce product page and I want to customize the output. I'm trying to get a theme suggestion for file-link.html.twig but I'm failing to get them to work. I'...
17 views

### How to use Lighthouse Performance framework with Drupal 8? [closed]

I was looking into Google's Lighthouse framework, but wanted to see how i would use it programmatically in Drupal. I would like to call it and give it a url and then get the performance scores back ...
26 views

### Is there a way to generate dummy content for custom entities?

Since the Devel module allows to generate content only for core entities: Accelerate development of your site or module by quickly generating nodes, comments, terms, users, and more. Is there a ...
8 views

### social_auth_decoupled with oauth2token

I am using social_auth_decoupled to log in via social networks (google and facebook). The platform uses simple_auth, but social_auth_decoupled doesn't give me access_token and refresh_token, is there ...
17 views

### Page Content Type: Displaying error in Preview mode

Whenever I am creating or editing my page Content Type and go into preview mode I see these errors: And here is the code for it: The dark theme does not show up in preview mode though. However, if I ...
18 views

### Getting the workflow associated to a node type

How do i get the workflow entity associated to a certain node bundle? So far my approach has been to use EntityTypeManager to load the workflow config entity storage and trying to load the right ...
19 views

### how disable edit for a certain content type, and a certain role,

in a drupal 7 site i have been given to maintain, it seems that permissions are not working as expected. I check and uncheck the buttons for a certain user role, but that user role always has the ...
6 views

### How do I add an item to the Bootstrap Simple Carousel on Drupal 8?

I'm having problems configuring the Bootstrap Simple Carousel module on Drupal 8. I see that I can add carousel items at /admin/structure/bootstrap_simple_carousel and I've created the carousel block ...
33 views

### EntityQuery does not return values

I am trying to get some entities using the "entity.query" service. What am I doing: in my module (file "mymodule.module") I execute: function mymodule_preprocess_page(&$variables) {$query = \...
47 views

### Show admin field based on field value

In the admin of a certain Content type (node/31/edit), I Added a select list field field_hero with two key|value's: carousel|Carousel video|Video when the site editor select carousel, I want to ...
24 views

### how get I come previous node title on webform

I have a content type and there is a registration button and this button link to the webform, but I can't show what content is. There are lot of node and I get node titles on a select list but I want ...
18 views

### Webform error in webform_submission entity type

I am getting this error on a migration of a site from server to development. I can see there was some work to patch this but cannot find a solution. views module Update limit_operator_defaults ...
31 views

### What are the differences between Drush 9 and 10

We are using Drupal 8.8 with Drush 9. What are the main risks and benefits of upgrading to Drush 10? The official release description is rather vague.
26 views

### Dependent and multiple selection using taxonomy terms in Drupal 8

I need to create a dependent dropdown with multiple select options using taxonomy terms in Drupal 8. I tried using the SHS module, but it isn't working in Drupal 8. The widget doesn't appear on trying ...
22 views

38 views

### Using drupal-scaffold correctly

I am in the process of starting new projects using drupal/recommended-project over the Drupal composer project template. One of the differences I have noted is that the Drupal scaffold tool fires ...
18 views

### How to use non-english language in code

I'm italian and I've to develop a multilingual drupal site but english translations of strings (that should be added in code or templates) will be done in the future. Is there a way to use in code a ...
25 views

### More template suggestion for views exposed form

Using the debug function I have found only one template suggestion for view's exposed form: form--views-exposed-form.html.twig I need to make changes to particular view, but I dont have other ...
25 views

### Add a class to an element after AJAX

I have a view of nodes with an AJAX on scroll set up. Everytime a person scrolls down the page new elements inside a view show up (e.g. nodes). I'm trying to add a new class only to new nodes that ...
15 views

In Drupal 8.7 After uncommented the lines in settings.php for displaying a fast 404 page. $config['system.performance']['fast_404']['exclude_paths'] = '/\/(?:styles)|(?:system\/files)\//';$config['...
32 views

### Variables in drupalSettings get cached

I am using the value of a field in the page as a variable. I am trying to use it in the page somewhere else but I think that there is a problem with the cache because the value is sometimes available ...
24 views

### Render a controller template from a custom module in a theme page

I have created a custom module whose routes are defined as follows. bigdeal_infos.infos_controller_infosScreen: path: '/bigdeal_infos/infos' defaults: _controller: '\Drupal\bigdeal_infos\...
15 views

### How to send email notification to multiple users? [closed]

I have a content type (content_type) which has an "Entity Reference" field to Users (field_creator), to list some people co-authors in addition to the author, who created the node (field_author). And ...