All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
28 views

How to change dompdf dpi? [closed]

I use Drupal 8 + entityprint to generate PDF with dompdf engine. By default, dompdf uses 96 dpi hard coded here: vendor/dompdf/dompdf/src/Options.php private $dpi = 96; For print PDF I would like to ...
-2
votes
0answers
33 views

How can I allow only one selection using checkboxes, not radios?

Maybe I'm reading documentation wrong. Shouldn't this code: $form['packet_pickup_checkboxes'] = [ '#type'=>'checkboxes', '#options' => [ 'self' => 'I will pick up my own packets',...
1
vote
1answer
30 views

How do I remove the text “webform content” at the top of a block?

I have several Drupal 8 webforms, some of which are embedded as blocks. At the top of each webform, I'm getting the "webform content" text. How do I safely remove that text?
0
votes
1answer
17 views

Display a view in search results

I have Search API SOLR running on my Drupal 8 site and I'd like to know if there is a way to have view pages display in my search results. As an example, I have a database content type that allows ...
0
votes
0answers
15 views

Variation injection into product view

Problem Our requirement is a promotion slider on product canonicals that promotes similar products. We also have the stock module installed, and show a little banner that says "currently out of stock"...
0
votes
0answers
35 views

AJAX view doesn't work [closed]

In Drupal 8, I created a view which uses the table format and a pager. I selected Use AJAX in Advanced Tab, but the pager doesn't work. I want to display data in pager AJAX mode.
0
votes
1answer
28 views

Set a Document File in a webform submission programmatically

I have writen a PHP class that saves a pdf file programmatically. The class contains a function that returns the Drupal path private://documentA.pdf I would like to attach the file to a webform ...
0
votes
1answer
25 views

Show teasers from both content type and Users together in a view

I would like to be able to create a page to show teasers from content created with a certain content type, say "Company" together with teasers from Users content. Until now, I just managed to create ...
0
votes
1answer
13 views

Database Abstraction to Fetch published content of specific content type throwing error

I'm attempting to grab all published content of type 'homepage_slide', as currently my slider loads all content unpublished or otherwise. Here is my current Abstraction query. if ($variables['...
3
votes
1answer
126 views

How can trusted host patterns be set dynamically?

I'm working on a site which uses the Groups module that will allow users to create groups on the site. The site will then allow for users to point custom domain names at the site, with the content for ...
-3
votes
0answers
16 views

Hanged and keep loading once it loaded [closed]

I have installed Drupal from https://github.com/acquia/lightning and once it done it redirect to config and then after success of configs it's redirect to landing page. it's hanged and keep loading ...
-2
votes
0answers
23 views

How do I show related content in custom template? [closed]

Hello I am having problem displaying related content (for example related articles for article content type) in custom template. I've found how to do it in view, but have not found anything how to ...
1
vote
2answers
43 views

How do I remove the appended string from image and Javascript URLs?

I have a Drupal 8 website. I have installed the Advagg module. The URL for the JavaScript file has a string appended. https://example.com/libraries/superfish/superfish.js?pzw4cp https://example.com/...
0
votes
1answer
21 views

Serve aggregate CSS/JS files from S3 instead of local storage

I have enabled aggregate CSS/JS from the backend. It stores the aggregated files in the local system. How do I make them accessible through the S3 bucket? I have already installed the S3fs module. ...
1
vote
1answer
24 views

Exposed filter autocomplete has TID with taxonomy term

I created a view from taxonomy terms of different country names. I added an exposed filter to allow the user to enter the country, but when the user selects the country, it automatically adds the ...
0
votes
0answers
15 views

Access Denied when Sellers add new product

We created a store with Drupal 7 Commerce. Because we wanted to let specific users create new products on our store, a user role Seller was also created with the following permissions: Create, edit, ...
0
votes
1answer
24 views

Search Solr View with exposed filter fullsearch return no results

I setup a Solr search index (Solr 7.7.1 and Search API Solr 3.2) with custom entities. I have several fields indexed and 2 of them are fulltext. Additionally : I setup the view with an exposed filter ...
0
votes
0answers
26 views

What token should I try to get only the term name independently from the default display set for the vocabulary?

Basically, on my webform, I have a multi-value term reference field for terms in the skills vocabulary. The webform field machine name is framework_skills. Owing to the fact that I have set up (and ...
0
votes
1answer
21 views

Simplified Installation from Configuration in Database

I am considering the best way to allow users to try out a Drupal 8 installation with some given content. I know that the standard way to do this would be to create a Distribution or perhaps an ...
0
votes
0answers
21 views

Customized copy of whole site in subdirectory

I'd like to implement a website with multiple, slightly different versions of the whole site available under a single domain. The separate versions of the site should be accessible under different URL ...
-1
votes
0answers
26 views

Checkout guest email

I'm just starting with the Drupal and I'm trying to setup online store with commerce 2 and Belgrade theme. At the checkout page when I try to checkout as a guest it automatically fill up the email ...
0
votes
1answer
48 views

Pass field value of original node in webform

I'm using Drupal 8.7.8 and Webform 5.4.0. I have multiple section nodes that are displayed on course nodes. These are 2 different content types. I'm adding webforms to sections, via the twig file ...
-1
votes
1answer
42 views

How do I generate a 32 characters unique identifier for rows in a custom table [closed]

I am looking to create a unique 32 char URL-safe string identifier either hexadecimal or base64. What would be a good way to do this in Drupal 8? What I want to do is to have a mapping of the serial ...
0
votes
0answers
22 views

How do I combine 2 or more fields in an exposed filter?

I am using the Combine fields filter to search in 3 fields. A referenced image name. Media ID And the image alt text. I had to use a rewrite in the alt field. The Combine fields filter searches the ...
1
vote
2answers
56 views

Does hook menu accept a wildcard as argument 0?

In a custom module I have implemented hook_menu() using the following code. function MYMODULE_menu() { $items = []; $items['%/review'] = [ 'page callback' => 'review', 'page ...
0
votes
0answers
27 views

SweetAlert doesn't display content markup

The SweetAlert modal is not displaying the content as passed in the option array when returning a response from the controller. Please see the code config below: //$options = ...
1
vote
1answer
39 views

.htaccess rewrite doesn't work [closed]

I have custom module with page at /page wich expects $_GET['id'] to do it's job. Here's .htaccess rewrite rule that works on empty website RewriteRule category+/(.*)$ page.php?id=$1 [L] On Drupal ...
-5
votes
0answers
19 views

Click to exit modal at bottom of image or graphic? [closed]

I think I may have made a mistake by creating the button to click out of the modal lightbox in the graphic before figuring out how to code it. it's small, roughly 50 pix wide at the bottom center. ...
0
votes
1answer
22 views

restrict page callback url?

With this callback code - is it possible to restrict url just to be example/page1 (2 arg) but not example/page1/321 or example/page1/abc/efg...? // hook_menu example function example_menu() { $...
0
votes
0answers
25 views

How to Resolve CORB Issue using Drupal Docker Container

I'm running the latest version of the Drupal docker container. I'm trying to make a GET API call via Javascript and I'm receiving back CORB (cross-origin-read-blocking) errors in the Console when ...
-6
votes
0answers
31 views

How can I make core menus collapsibe?

I am still new to using Drupal 8, but I wanted to know if the core menu of Drupal can be made collapsible as currently the menu is collapsed completely. I have been trying to find menus that can do ...
0
votes
0answers
12 views

Exposed Filter Reset URL Error

I have a view that is formatted in a table style. The page is Ajax enabled and the view is used as a block on the page. I have a few filters and i am using Exposed Filter Module. I have included the ...
0
votes
0answers
22 views

Webform Multi-step validation

I have a multi-step/page webform. It works fine. I have on one page two date fields. One field must be on or after the other and thus I want some validation. No problem I followed the tutorial ( How ...
-5
votes
0answers
27 views

error in drupal bootstrap theme [closed]

plese cheack image,I installed bootstrap_library module also,but there exist proble
-3
votes
0answers
21 views

Did “Simulate checkout completion” link get lost on cart edit?

In D7, when editing a "cart" order, there was a link to "Simulate checkout completion". Did this feature get lost in the porting to D8?
0
votes
0answers
23 views

How to remove 'page not found' error in block [on hold]

I made a custom module with a blockform. I put the blockform into Drupal and made a page for it in block settings under 'page.' I know it's probably not a good idea to set a page for a blockform that ...
1
vote
1answer
44 views

Override a theme template variable with a module

I created two variables for use in my theme's page templates. I used variables because I wanted that value to be flexible. function mytheme_preprocess_page(&$variables) { $variables['var1'] = '...
2
votes
1answer
47 views

notify user account creation?

I can't seem to find documentation for notifying a user via email after their account has been created by a script. $user = \Drupal\user\Entity\User::create(); $user->setPassword('xxx'); $user-&...
0
votes
0answers
42 views

PHP title request inside block returns no value [closed]

I need some help. I'm trying to add this link to a block (button) that shows up only on certain pages. However the PHP does not return the head title when using the code in the block. I've added ...
0
votes
0answers
28 views

Broken css/image links after moving

I've been trying to fix an issue with moving my drupal installation. Some first information: I am using the Open Social module; I used a localhost a DNS to connect my Xampp to the same subdomain as ...
1
vote
0answers
17 views

Geolocation: How do I set conditional markers on the Leaflet view?

I'm using Geolocation to list about 20 pubs / restaurants, but I'd like the user to be able to know if the address is a restaurant or a pub just by seeing the icon. When I created my content type, I ...
1
vote
1answer
32 views

Generate PDF with wkhtmltopdf after batch finished

I would like to generate a pdf with wkhtmltopdf at the end of my batch. I integrate the generation in the callback function but it does not offer me the download of the file This is my finished ...
0
votes
2answers
28 views

Hide contextual filter parameter from view url

I'm using Views to create a view which shows list of contents. The requirements of the view is something like this: The page display url must be /mycontents The contents must be filtered by current ...
0
votes
1answer
28 views

How to add a local image file to an image field programatically

I have serveral image files in the folder /sites/subsite.example.com/files/blog.dir/1/gallery1, and I need to add these files to a node programatically. I think this is the right code: use Drupal\...
-1
votes
0answers
36 views

Unable to get submitted input value into international format using intl-tel-input and webform [closed]

As mentioned in the documentation here : https://github.com/jackocnr/intl-tel-input I can display and also get a submitted value with an international format using the option "separateDialCode". ...
0
votes
0answers
19 views

Create view with node titles that where posted on same day the previous years [on hold]

I created a view in order to display node titles that where posted same day on previous years. So for example if today is 31.10.2019 I would like to display articles of 31.10.2018-2017-2016... till ...
0
votes
1answer
37 views

Hide certain field on form alter using AJAX

I have a webform created using interface, and need to hide some fields through button. Using form_alter I have added that button added AJAX call with it. Now I want to remove/hide certain element ...
0
votes
0answers
19 views

Set default/restrict text formats based on node type [duplicate]

In Drupal 8 (not D7) as noted here How do you limit a text input to only specific content types/fields. For example, I create a new input type here: admin/config/content/formats and call it "...
1
vote
1answer
39 views

How to stop download in hook_file_download

I'm building a page with different download buttons linked to private zip files. Users have to log in to download. I am using module Permissions by Term to manage who can see which button. I added a ...
0
votes
1answer
12 views

Content Moderation: Editorial workflow not installed and broken/missing handler on the moderated content view

I'm having troubles enabling Content Moderation Module (content_moderation) on a Drupal 8.7.8 site. During installation everything seems fine, drush en content_moderation finishes without errors, ...

15 30 50 per page