All Questions

0
votes
0answers
32 views

An issue with multiple routes with its own twig template of custom module

First time I am creating a custom module in Drupal 8. I have some pages having only HTML markup and JS code. Assume I have 3 pages flow and user goes to 1st page (next button) -> 2nd page (next ...
-2
votes
1answer
32 views

How to trim title for mobile devices?

I am working with Drupal 8 website, on my view I have a list of contents. Some titles are pretty long, what is fine for teh desktop view, but for mobile version I need to trim the tite up to 30 ...
0
votes
1answer
21 views

How can i add ajax callback to checkbox in drupal form?

I am using taxonomy manager module I want to add ajax callback to checkbox tree view for checkbox is checked condition but it is not working can some one please suggest me. I have modified the code ...
0
votes
1answer
13 views

How can one Rewrite results of a view using a Group By

I have created a view and then added a group by a certain field. Normally one would just add a new field then rewrite the results with custom html using replacement patterns. How would I go about ...
0
votes
0answers
10 views

Ubercart Coupon for specific attribute (variant)

I have an Ubercart coupon (OFF50) on my website has 50% off for a specific product with SKU 1234. And It works fine when I applied the coupon with the product. But the same product has 4 variants, ...
0
votes
1answer
37 views

How to handle exceptions in a batch process

I have some special configured content entities in my system which are protected in a pre-delete hook against entity deletion. There is also a batch process (VBO - entity delete) where they can be ...
0
votes
0answers
16 views

The drush command 'variable-get' could not be executed

Command variable-get requires Drupal core version 6 or 7 to run. The drush command 'variable-get' could not be executed. drush st Drupal version : 8.7.3 Site URI ...
0
votes
1answer
16 views

How to use CiviCRM contact data latitude and longitude in drupal gmap formatted view

Environment Drupal 7.67 civicrm 7.x-5.13.4 GMap Module 7.x-2.11 Location 7.x-3.7 Views 7.x-3.23 What is working I have CiviCRM contact data for organisations which has been successfully geocoded ...
0
votes
1answer
30 views

Site migrated to the new server with PHP 7.2 and I can't log in

We're preparing to get our Drupal infrastructure moved from PHP 5.6 to PHP 7.2. In order to start testing, I migrated a Drupal 7.67 multi-site from our current production server to a test server ...
-2
votes
1answer
27 views

in drupal i want to change the form element value ,if the user clicks on other option in select list in drupal [closed]

i am new to drupal 8 , i have a drupal 8 custom form and it has one radio button form element , whenever the user click on other option i am displaying the hidden user input element , the issue i ...
0
votes
1answer
37 views

Migration via phpmyadmin

We are moving to a Drupal distribution. From all the research we have done, there is no easy path to do Drupal 8 to Drupal 8 migration. We are looking to copy some content via phpmyadmin. Data we ...
0
votes
0answers
17 views

How to “link” Views exposed filter (fulltext search) with Facet API block (on a specific field)?

Using Drupal 7.67, Search API, Search API Database Search, Views and Facet API. I have built a search engine page with Views and Search API (with a server linked to the Drupal database tables). Two ...
0
votes
1answer
45 views

How owerride entity node delete core function

I'm doing a headless drupal cms. I need to check the entities before they are deleted. I need to do it globally as the deletion of entities can take place via api (already written) or by using the ...
0
votes
0answers
23 views

PluralTranslatableMarkup does not return plural value

The code bellow should return plural. use Drupal\Core\StringTranslation\PluralTranslatableMarkup; $trans = new PluralTranslatableMarkup(12, 'singular', 'plural'); $output = '' . $trans; $output1 = $...
-1
votes
1answer
22 views

How to remove arrows from views Select list field

I have a content type which has a select list field. I created a view where select list field was added under filter criteria. How can I remove the arrows/slider?
0
votes
0answers
19 views

How to move js in header from footer in D8 [duplicate]

I am using twitter bootstrap theme in drupal 8. By default bootstrap.js and jquery.js loaded in footer. I want to override the order of these js and place in header. Please let me know if its ...
0
votes
0answers
8 views

TCPDF generated PDF is not sent as email attachment

Below is my code for generating a PDF and attaching to email using drupal_mail_system. I am using TCPDF library and in Drupal 7. I am able to generate the PDF, but unable to send that as an attachment ...
0
votes
1answer
12 views

Rules to clear commerce cart on adding new item of a different product type

I've several product type with corresponding product displays. The scenario is a case where there is only a product type per time on the cart. That is, you cannot have multiple product types at the ...
0
votes
1answer
18 views

D8 | Custom Form managed_file field limit number of upload files

I have a custom form in D8. Form has managed_file field. I am facing challenge regarding the limit of number of files upload to this field. I have to make this managed_file field to upload only 3 ...
0
votes
1answer
10 views

Creating 'index' content views for L1-LX within a taxonomy

Note: This is a follow-on question from Creating a displayable 'index' of content nodes within a path Ok, starting to find my feet again within Drupal, and still getting up to speed with views. What ...
0
votes
1answer
23 views

Close webform modal and redirect to entity

I have a webform that opens inside a modal. Everything works fine. Then I had the problem of closing the modal after the form was submitted. I fixed that to with the help of the following link: https:/...
0
votes
1answer
29 views

How to get the enabled manage displays per node type?

I have an admin form and need to check if a node, e.g. article has a specific manage display enabled. How do I get the data? Found out to get an array of all available displays in general and there ...
0
votes
0answers
29 views

Skip updating certain themes/modules on composer update

My setup is composer driven. I have overridden some module with patches and customised a contributed theme (boostrap_sass). Now I want to avoid overbidding these modules and theme when I perform ...
0
votes
0answers
14 views

How to fill a multi-value term reference field in a ajax callback in a node add/edit form?

The machine name of the term reference field is "field_persons", using the autocomplete_deluex widget. function zwznertags_form_alter(&$form, &$form_state, $form_id) { if($form_id == '...
0
votes
2answers
23 views

How do I get the form submitted data in a custom module? [duplicate]

I have create a webform in Drupal 7. I want to access the submitted data in a custom module. I used my_module_form_submit($form, &$form_state) but no data has been found. Please Help.
0
votes
2answers
30 views

How to get and display menu items except the parent item?

Let's say my menu tree is like below: Parent Sub-Parent Child I want to get the Sub-Parent title and all child's title and url. How can I do it in Drupal 8? I have looked at this answer but it ...
0
votes
0answers
11 views

Installation on Oracle database using the Oracle driver

I have been trying to install/host Drupal 7 on Oracle Database as the primary database for last few days without any luck. Here is the Oracle driver link that I have looked at https://www.drupal.org/...
0
votes
0answers
25 views

Extra Content Appears Below Footer

I have an issue where I have the page for a specific role showing up on every page and additionally an error message. These show up below the footer on the pages. I've gone through the theme files ...
-2
votes
0answers
33 views

CKEditor text area grows taller than screen when text is long

This may not be specifically tied to Drupal, but it seems to be connected, so I'm posting here first. In a node edit form, when I save long text in CKEditor and return to the form, the CKEditor text ...
-2
votes
0answers
22 views

How to prevent generating drupal admin menu id?

For few days I was styling in CSS a large menu, and I almost finished, but now I see that I have a huge problem. I was styling logged as admin, and I was using to style elements ids of them: #rm-no-id-...
0
votes
0answers
32 views

How can I display a block to public?

I created a view block and placed it in the content region. There is no role restriction. That means all users can view the block. However, only authenticated users can view the block. I am not sure ...
-4
votes
1answer
25 views

How to create view texonomy matching to user profile texonomy

I have 3 levels in user profile fresher/prathama/prarambhik. I have craeted texonomy fresher/prathama/prarambhik. In drupal quiz module diiffrentiate questions using texonomy fresher/prathama/...
0
votes
2answers
26 views

just want to change checkbox value while submit

I am using drupal 7: $form['title']['#tree'] = TRUE; $form['title']['node_first'] = array( '#type' => 'checkboxes', '#options' => array( 'value' => $value->title, ), )...
0
votes
0answers
38 views

How can I block bots after a number of failed Captcha attempts?

I am seeing hundreds of daily spam submissions that try to bypass Drupal Captcha module. I am already using honeypot contrib module, keyword blacklisting (rules) and I have added quite a number of IP ...
0
votes
2answers
38 views

Is there a way to run drush updb without going to maintenance mode

I have a live site which runs on drupal 8. I am using drush 8.5.3 with the installation. Whenever I run drush updb the site automatically goes to maintenance mode. Is there a way to do this without ...
1
vote
1answer
31 views

How do I force Twig output from my custom module, instead of from the theme? [closed]

I'm new to Drupal, I create a module including block and twig. I want to call out my twig(modules/custom/footer_block/src/templates) and store data in there when execute build() in block. However, it ...
0
votes
1answer
36 views

Display Themed 'username' in Block

I am trying to display the themed username in a custom block. MyCustomBlock.php: public function build() { $usersData = \Drupal::service('user.data')->get('my_module'); $usersFromQuery = [];...
0
votes
0answers
28 views

Config import failed “Duplicate entry”

I really want to like the configuration management system in Drupal. Over time, I've learned to tamp down my expectations in how it can be used to develop against a production config. On production, I'...
1
vote
0answers
66 views

Why is @? used when referring router.request_context?

In core.services.yml we have: calls: - [setContext, ['@?router.request_context']] But router.request_context is also defined in core.services.yml (and it depends on request_stack alone which doesn'...
0
votes
0answers
9 views

Accessing submitted values in Drupal commerce checkout form alter

I have added a checkbox to the Drupal commerce checkout form using hook_form_alter. I have also added a submit handler to the form but when I try to use $form_state->getValues() in the submit ...
0
votes
0answers
22 views

file_exists with 'replace' or 'use existing' not working when a variable is passed

Can somebody point out the fault in this snippet for downloading a file entity. I am trying to replace or use existing file dynamically using migrate_plus. When I give a variable it doesn't seems to ...
0
votes
0answers
22 views

Drupal facet search exclude filters

i have a situation with Search Facet and some excluded taxonomies from the filters on Drupal 7. Here is my scenario content is tagged with tags - taxonomies on the user profile, there is "Denied tags"...
0
votes
0answers
16 views

Override imported data on node creation

I would like to transform some data I am getting from an RSS feed. I get a set of items and create nodes using the data I get, so far so good. However, some of the data fields contain relative URLs, ...
1
vote
1answer
34 views

Alter user's entity label method

By default the label() method of the user entity returns the username. So everywhere on the website where user references are used, the username is displayed. I need to alter this method so ...
1
vote
0answers
55 views

Drupal\Component\Plugin\Exception\PluginNotFoundException: The “<whatever>” plugin does not exist

After updading a Drupal site from 8.6.16 to 8.7.1 (PostgreSQL 9.6.13 , Nginx) I get this error in almost every operation (creating a view , installing a module, creating a content type, creating a ...
0
votes
0answers
16 views

Limit number of node publish by user and delete automaticaly old publication

Is there a way by Flag or Rules or other to limit the number of publication for exemple to 500 by user order by date AND delete by cron the older post The module Node limit just limit work great for ...
0
votes
1answer
6 views

How do you get Product Variation Type fields and display modes to show up when displaying Products in a View?

I've created a Product Variation Type for all my products, all of which have the following custom fields: Display Title, Subtitle, and Top Rated Product? (boolean checkbox): When setting up a View to ...
0
votes
0answers
14 views

Conditional logic within multiple Checkbox entity references

Hi I am using Entity check boxes referencing taxonomy items. I want to create a condition within checkbox entity. Eg. let say my taxonomy has 5 items. A,B,C,D,E. I want to create a condition that when ...
0
votes
0answers
28 views

D7: user_check_password() returns false but password didn't change

We've been having quite an unusual issue with Drupal: at seemingly random times it decides the password hashes for all users are invalid, and they have to do a password reset to be able to log back in ...
0
votes
0answers
16 views

Using Geocoder in a Functional Test

I am writing my first test in Drupal 8's API and for some reason, I am unable to geocode. When I run my code in a controller, it works fine, but when using a test, $addressCollection evaluates to ...

15 30 50 per page