All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
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 ...
-3
votes
0answers
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 ...
0
votes
1answer
16 views

How to add a custom module to a menu?

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 ...
0
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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 %} {% ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
1
vote
2answers
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 ...
0
votes
0answers
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 ...
-1
votes
0answers
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 ...
0
votes
0answers
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/...
0
votes
1answer
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. ...
0
votes
0answers
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....
0
votes
0answers
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'...
-2
votes
0answers
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
2
votes
1answer
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 ...
0
votes
1answer
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 ...
1
vote
0answers
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 ...
1
vote
1answer
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 = \...
0
votes
0answers
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 ...
-3
votes
0answers
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 ...
-1
votes
0answers
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 ...
-1
votes
1answer
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.
0
votes
0answers
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 ...
0
votes
0answers
22 views

How to access protected property in feed object?

When I try to access protected property in feed object I am getting error (Error: Cannot access protected property Drupal\feeds\State::$messages) Feed Object: Anybody know How to get protected ...
0
votes
2answers
40 views

Is there a Grouped Product listing type in Drupal Commerce

I have a Magento site I would really like to migrate to Drupal Commerce. The one must-have feature is Grouped Product. A grouped product will have a base product from which the product listing will ...
4
votes
1answer
115 views

What is the right way of loading a service?

when trying to use a service in drupal actually there is 3 ways , what is the preferred way to use a service and why : passing dependencies directly through the constructor: public function ...
0
votes
1answer
11 views

Webform file upload with condition

I have a webform with file upload element. This works fine as long as the file upload element does not have a condition tied to it. Without the condition, one can see that the selected file was ...
0
votes
1answer
21 views

How to add class to field--item element generated by paragraphs

I have a paragraph type called "Grid Item". I've created a file called "paragraph--grid-item--default.html.twig" where I print all my required fields. It all works as expected, but I need to add ...
0
votes
0answers
27 views

Can you add a new state to Drupal 8 Workflows module through custom module?

Is it possible to add a new state (and transitions) to an already existing Drupal 8 Workflows through a custom module? And can we were to apply this to all workflows available? Or is it possible to ...
0
votes
0answers
8 views

Elysia Cron not running cron tasks that were previously paused

I have 2 cron jobs that are scheduled to run every two minutes. When I first added them, they worked as expected and ran normally. We ended up needing to pause these cron jobs for a few weeks and so ...
0
votes
1answer
29 views

Cron timeouts at 60 seconds, but all the related timeouts are set higher

We're getting 504 Gateway Timeouts on AWS from a Drupal 7 site at 60 seconds, but everything AFAIK is greater than that. The timeout is specifically during running the feeds_source_import in Ultimate ...
1
vote
2answers
30 views

How to get a machine name of a custom block

I have a custom "Slider Items" field type, as well as the custom "Channel Slider Block Type" type block (created using "Custom block library"). Also, I have several "Channel Slider Block Type" blocks....
-1
votes
0answers
24 views

How to bulk update path using drush and pathauto?

Is there a way to bulk update paths, using pathauto and drush in Drupal 7?
0
votes
0answers
10 views

Unable to get Log messages from feed object

I am trying to get the feed error log messages by using below code: /** * fedd After Import result. */ public function afterImport(ImportFinishedEvent $event) { $msg_obj = $event->...
2
votes
1answer
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 ...
1
vote
1answer
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 ...
0
votes
1answer
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 ...
1
vote
1answer
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 ...
0
votes
0answers
15 views

Core system fast 404 doesn't display when page not found

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['...
0
votes
0answers
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 ...
0
votes
0answers
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\...
0
votes
0answers
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 ...
0
votes
0answers
33 views

What kind of hook_entity can be trigerred by a migration on this entity?

I have a custom content entity on which I can run a dedicated migration from csv with a form. The form is used to upload the csv file launch the migration The submit part of the form: $fileId = ...
1
vote
1answer
46 views

Error while set a paragraph field to NULL during cron run

I am using Drupal 8 and I have implemented a hook_cron to set a node field to NULL. Here is my code: if ($lesson->field_lesson_ended_at->value < $current_time && $session_id &&...
-2
votes
0answers
15 views

How can I programmatically add a checkbox with a description textfield to a file field? [closed]

I need to add checkbox field with description text box once I upload any file from Drupal dashboard. I need a same functionality like description text box, I need to display this checkbox once I will ...

15 30 50 per page