All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
48 views

Extend a form from a custom module

I'm newbie with Drupal 8. I was entrusted with hanging a custom module to a Drupal 8 default login form. Together with these fields, I would like to see those of my form, which should be ...
0
votes
2answers
33 views

Why 'Failed to start the session' when RedirectResponse is sent?

When this code is executed, I have an error message logged. The code is in shared_node_access(NodeInterface $node, $op, AccountInterface $account) if ($node->get('nid')->value == 1) { if ($...
-2
votes
1answer
38 views

Installing drupal/recommended-project fails at installing coder

running composer install with the Drupal 8 recommended setup fails when installing coder with authentication message or similar. Does somebody else have this behavior? Workaround was to run composer ...
0
votes
1answer
20 views

How can you get the route name/path of groups?

I am new to Drupal 8. I am working on groups module and want to assign different themes to different groups.So i need route name of groups. how to find route name of groups. Thanks in advance. /** ...
0
votes
1answer
23 views

What's the best way to add an element to a form AFTER submission?

I have a form that I'm trying to build that is semantically identical to billions of others on the net: First GET request returns an empty form with no results displayed. Submitting the form POSTs ...
0
votes
1answer
30 views

How to restrict taxonomy term reference with certain terms?

In a node edit/add form, I need to show a field with dropdown/select list options (Cardinality unlimited). I do not want all the taxonomy terms of that vocabulary to appear. I want to show certain ...
0
votes
1answer
24 views

How do I conditionally add a class to my page title within page-title.html.twig?

I have a boolean field within my Page content type called Hide Title. I need to conditionally add a class to h1's to visually hide them if this field is checked. I have the following within page-...
0
votes
0answers
25 views

Setting Views contextual filter values dynamically with Twig in Webform

I am attempting to embed a view in a webform whose contextual filter value is set based on a user selection. I have created a view of nodes with a contextual filter, and a webform with a select ...
0
votes
1answer
25 views

Source entity type and id in webform node

Im looking for a way to set the source entity type and id to a webform that is inside a webform content type (webform_node) I followed the modal convention: the address of the webform is /webform/14?...
0
votes
0answers
38 views

Access a page.html.twig template variable in another twig template using a preprocess function

Drupal core 8.8.3 Version Using a preprocessor function as below function subtheme_bs_preprocess_book_tree(&$variables) { $variables['page_id'] = code here to read the node.nid variable ...
0
votes
0answers
6 views

Drupal 7, views, organic groups, how to create a view of groups user belongs to and what their role is

I have built a view following this link Using Views to List a Member's Organic Groups (7.x-2.3) It list the groups the current user has subscribed to. I have been trying to also add a field ...
0
votes
2answers
36 views

Geting values for multipart form elements using Twig

Whereever you are, I hope you're fairing well under the circumstances. To some of the hardest hit areas, we are thinking of you constantly. Webform Advanced Elements I am having difficulty ...
-1
votes
0answers
17 views

Theming responsive and off-canvas menu [closed]

I need help to theme mmenu (librarie) items and item from responsive_menu module. I use drupal 8.8.3 and Responsive and off-canvas menu 8.x-2.6 with mmenu v7 When I change my css no change, but I ...
0
votes
0answers
20 views

Could not initialize PECL extension even though memcached installed

I am migrating a site from one remote server to another. I have set up the new server will all the prerequisites installed memcached server and its extension too. But when I try to run drush cr I get ...
0
votes
1answer
23 views

How to disable watchdog table entry?

My drupal 8 watchdog entry running very vastly. I want to stop the watchdog entry for few times immediate basis and resolve the issues. Please suggest.
0
votes
0answers
9 views

How to change librarie's css from xxx.theme or hooks

I want to alter the path of the css of the mmenu library (jquery.mmenu.css and jquery.mmnenu.all.css) which are in (/libraries/mmenu/dist/jquery.mmenu.css and / libraries / mmenu / dist /jquery.mmenu....
0
votes
0answers
13 views

Allowing user to login with their User ID to access webforms

Drupal 8 question... So the way authentication works at my organization is that users typically log in with their organization credentials in order to access Webforms... I'm looking for an ...
0
votes
0answers
50 views

How is one supposed to subclass PagerSelectExtender? [closed]

After reading the assumably-outdated Drupal docs page* on Database API extenders, I have the following code in /var/www/mysite/web/modules/custom/my_module/src/QueryExtender.php: <?php namespace ...
0
votes
0answers
5 views

Display only the variations of a specific product when I create a new content

I'm working on a videogame website. I use Drupal Commerce with Druapl 8 to manage games. For example : (Sonic the Hedgehog) is the Product, and (Mega Drive - EUR) and (Mega Drive - JPN) are the ...
0
votes
2answers
28 views

How can I fetch the Inviter in Rules

How can I fetch the Inviter of a user in Rules? I'm using Drupal 7 and the invite-by-email module (part of the invite module https://www.drupal.org/project/invite), to allow users to invite others. ...
0
votes
1answer
35 views

How might a user configure which video is shown on page without editing the page?

A Drupal 7 site has an embedded YouTube video on the home page. It is not always displayed. Sometimes the video being displayed is changed. The home page is arranged by a Page Manager Variant, and the ...
-2
votes
1answer
17 views

How to alter entity field in drupal 8?

I add field (select list) in Group form (form_id = 'group_drupalcamps_add_form') with UI. Now i want to alter/target that field and pass variable to it. Any idea will be appreciated. Thanks in advance....
0
votes
0answers
11 views

How to automate click the “ Click to Calculate Shipping ” button upon filling up the Delivery Information

I've been struggling for days finding for the right answers . I want to achieve a function that when a user fill up the billing / delivery information , the " click to calculate " button will be auto ...
0
votes
0answers
22 views

Strange behaviour in twig template

I am trying to render image in custom field.html.twig template but following snippet not working: {% for item in items %} {% if not loop.first %} <div class="image-gallery-image"&...
1
vote
1answer
18 views

Why do D7 form builders have a $form parameter?

In Drupal 7, the first parameter of a form builder function is $form. When implementing a form builder function, one has the option of either adding stuff to this existing array and returning it, or ...
0
votes
0answers
17 views

How to get an Url object with correct interface language?

I'm trying to get an Url object with correct interface language. use Drupal\Core\Url; $language_manager = \Drupal::service('language_manager'); $url = Url::fromRoute( "entity.node....
-1
votes
0answers
25 views

How to embed Vimeo video on Drupal 7 block body?

Embedding a youtube video is super easy like: [youtube:23km5H4K9Eo5] inside the block body with full html. Is it the same format with vimeo? [vimeo:GD34fsAf53], because that doesn't load for me. Sorry ...
0
votes
0answers
12 views

Why are doctrine annotations not loading for Drupal unit tests?

I’m trying to run the Drupal CMS unit tests. It is using doctrine/annotations:1.8.0. I am seeing many errors similar to: Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The ...
0
votes
1answer
15 views

Get the values of a checkbox field in node when evaluating in block condition plugin

I have a field that is a checkbox with multiple values... I'm trying to do an evaluation in a condition plugin where I'm checking against the checked values. For a boolean field, the syntax is: $...
0
votes
0answers
28 views

Why my Scheduled Task Action does not run in Business Rule?

I have a business rule (Entity Insert) that is supposed to run a scheduled task action after 3 months when you create a new node of certain type. This action have another action inside that is in ...
0
votes
1answer
8 views

how to create custom template for a product type in drupal 8 commerce

I want to have separate twig templates for each product type in drupal 8 commerce to customize them. is there any way to do that?
-3
votes
1answer
40 views

Local Drupal issue

Receiving the following on my local machine. Any suggestions? Warning: include(/app/drupal/vendor/composer/../../docroot/core/lib/Drupal/Core/DrupalKernel.php): failed to open stream: No such file or ...
0
votes
1answer
15 views

How to get bundle machine name when viewing the creation form?

From the creation form (any bundle), I need to get the content type label/name to use it in a link (in a block, for example) and pre-filter the View opened by this link. Example : The user wants to ...
0
votes
0answers
15 views

How to write the update hook when adding columns to a custom field type?

I have a custom field type that's been in use on several sites for a while now. I have updated this field type to add two additional columns to the schema. I'm struggling to find the correct way to ...
0
votes
0answers
11 views

Multistep sign up, force user to create node before they can access site?

Im using Drupal 7. I want my users to either create a node or flag a node before that can access the rest of the site. I have created a view of content, and added filter either current user is node ...
0
votes
1answer
22 views

How can I change the 'type' of Drupal script tags from text/javascript to text/plain?

I could use some assistance in figuring out a way to change script tags for a Drupal 7 site to be "text/plain" instead of "text/javascript" And additional attribute(s). I can tell already that ...
-3
votes
1answer
39 views

How to include or hit a php file from custom module in Drupal 8

I am working on a custom Drupal 8 module. I have a seperate php script as a .php file. I want to include that file in my Drupal 8 module, in simple words I want to hit that .php file by running my ...
-1
votes
0answers
7 views

Is it possible to extend next payment date in moneysuite recurring drupal 7

Is there a way to extend the next payment date for the users who have recurring payment in moneysuite drupal 7. We are using authorize.net for the payments. Scenario : users have paid for viewing ...
0
votes
0answers
21 views

Is it possible to add “Options” to an User Reference

I have an Content Type called Account. My website Users are then linked to the Account entity using an Entity Reference field on the Account content type. I want to be able to assign different ...
0
votes
0answers
18 views

how to save field data on form submission programmatically in drupal 8?

I alter the form with hook_form_alter and created field in it. Now i want when i submit the form data/configuration stored in database of that field. how it will be possible below is the code. Thanks ...
0
votes
1answer
32 views

I want to call ajax callback function from another module's controller in Drupal 8. is it possible?

I am giving the code of my main form and the controller of another module where the ajax callback is written. Actually this ajax callback function will be used in different forms. So I want to create ...
0
votes
1answer
25 views

PDOException: SQLSTATE[HY000] [2002] No such file or directory in lock_may_be_available() (line 167

I have Drupal 7.2 application site and have upgraded from php 5.6 to php 7.2 since it reached its eol, also upgraded to rhel 8 from rhel 6.5, but while connecting to rds I am getting following error, ...
1
vote
1answer
21 views

Splitting exposed form filters amongst several blocks

I have a views search page in D8 where I'm I have exposed filters that are shown in blocks. I'm also using search facet blocks. What I want in the sidebar is the exposed filter text search field, ...
0
votes
0answers
33 views

Is it possible to update/remove/install 1 package with composer without updating everything?

I have seen a few posts answering this and saying that "composer require package" or "composer update package" will do this; but absolutely everything i do with composer attempts to update everything ...
0
votes
1answer
34 views

How to set in my own module dependency on a composer package?

I have some of my own modules written on Drupal 7 that use composer packages. These composer packages are downloaded with the module Composer Manager. How can I set explicitly the dependency on a ...
0
votes
0answers
15 views

No results on Solr More Like This Block

I'm looking for help with Solr More Like This block on my Drupal 8 site. I have the view set up and the block is configured. I can see the view title but I never get any results back. All my nodes are ...
0
votes
1answer
44 views

Block user upon one webform submission

I'm using Drupal 8, and I'm trying to block a user after submitting a certain webform. I have the below scenario: Only authenticated user can submit and use the webform Webform submission is limited ...
-1
votes
0answers
21 views

How can I render webfrom submission individual in webform-submission.html.twig?

Basically I am trying override webform-submission.html.twig. In this twig, I have these elements I want to render my webform submission with HTML structure for the theme. But I am not able to access ...
0
votes
0answers
22 views

when i scroll to a webform in my site a CDN overriding my local CSS [closed]

I have created a form using webform for newsletter displayed in the footer of my site. During scrolling to the footer when webform arrives my local CSS gets overridden by this CDN https://cdn.jsdelivr....
0
votes
0answers
17 views

Is it possible to alter a field value in a Views filter handler? [duplicate]

I have a custom Views filter handler where I need to alter the field value within it. The filter is for a date field in the table that uses a non-standard date format and I need to change the value ...

15 30 50 per page
1
3 4
5
6 7
1644