Questions tagged [8]

Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.

Filter by
Sorted by
Tagged with
-1
votes
0answers
23 views

Help my rest api display decimal [closed]

I create rest api custom module. use Drupal\rest\ResourceResponse; I need output "data": { "image": "data:image/;base64,", "name": "Name", ...
1
vote
0answers
24 views

How do you flag stores when they are updated with a specific input method?

I installed the following module on my site : https://www.drupal.org/project/form_mode_manager I have created an "Input Modes" in "Display Modes" for the store type with the ...
0
votes
1answer
22 views

How can I inject relevant/filtered ads every 5th result in a view?

I have a view that displays filtered results of Business Offers and Events as "cards". Now my boss wants to inject relevant custom ads into the results based on the user selected filters (...
0
votes
0answers
13 views

User interface crop image to defined size and download image from html or generated image [closed]

I'm new with Drupal 8 and would appreciate a lot some help, I'm trying to create a form with two text fields and one for uploading an image, for the image upload, the user (not authenticated) should ...
0
votes
0answers
66 views

How do I pass dynamic parameters to a service?

Is it possible to pass dynamic parameters when calling a service? mymodule.services.yml services: my_module.default: class: Drupal\services\DefaultService arguments: ['@entity_type.manager'] ...
0
votes
0answers
16 views

How to display discount for each product in checkout page?

I am trying to display in checkout table the initial price, the discount and the final price of each product. I followed this and this but with no result because I cannot find the fields mentioned in ...
1
vote
0answers
11 views

Translate configuration values in custom webform handler

I created a Custom Webform Handler, which uses the email and name data from the form input to subscribe the user to a newsletter service through the vendors API. Ich created a configuration form with ...
0
votes
0answers
24 views

Do these modules integrates with each other?

I'm using the Webform Access module (which is part of the Webform module) to allow multiple groups of users review webform submissions. The Webform Access module contains a block, Webform access group ...
0
votes
0answers
31 views

How do I check node access permissions in a module?

I am building a custom module, where the company employees need to access the website without logging in. They will enter their employee ID in a form and store it in a cookie. When the cookie is valid,...
-1
votes
0answers
23 views

How can you show node image field in default search results?

How to render node image field in default search results (Drupal 8). What i have tried so far: function mag_api_node_search_result(\Drupal\node\NodeInterface $node ,$hellotest = NULL) { //$image =...
0
votes
0answers
20 views

The alias /store/my-store is already in use in this language

I have a store type that contains a paragraph field. When I create a store, it works perfectly. But when I update the store by adding a paragraph, I have an error in the form : The alias /store/my-...
0
votes
0answers
24 views

How to take a migrated site live, when content is being added to the old site

After you migrate content from an old site (currently the live site), images users, etc.. into a new Drupal site. And the new site is still being worked on by developers, it is not ready to go live ...
0
votes
1answer
27 views

Billing address missing for recurring orders

I'm using Datatrans module as payment gateway. Module does not fully support recurring payment, so I had to add some missing functionality. I added method createPayment: public function ...
0
votes
0answers
51 views

How can I programmatically insert/update thousands of nodes?

I have to insert 2k nodes with my custom module but it takes forever. I know there is a way to delete a lot of nodes with only one operation: $storage_handler = \Drupal::entityTypeManager()->...
0
votes
1answer
47 views

How can I update the block content programmatically?

I have created a block plugin. /src/Plugin/Block/Myblock /** * Provides a 'Download component' block. * * @Block( * id = "my_custom_block", * admin_label = @Translation("My ...
-2
votes
0answers
28 views

Downloading a file after a batch process using BinaryFileResponse

We need to download a file after a batch process. We tried using the BinaryFileResponse for downloading. But it is not working and also not showing any error. The code is as follows <?PHP ...
0
votes
1answer
28 views

How do you programmatically get the current user's status?

I'm trying to get the currently logged-in user's status (active or blocked) in template_preprocess_user. I tried the following with no luck. function MYTHEME_preprocess_user(&$variables) { $user ...
0
votes
1answer
54 views

Callback to Drupal site after curl call to 3rd party site doesn't resume authenticated session if more than 120 seconds elapsed since authentication

UPDATED SITUATION: A user authenticates on my site. The user selects items to purchase and is sent via curl call (see below) to a payment site. The payment site does its thing and returns to my site ...
0
votes
1answer
22 views

Issues trying to understand and debug simplesamlphp error

Simplesamlphp used to work on the site. Something changed and now it does not. The IDP remote config has been verified, including the cert The SP cert and pem in the simplesamlphp/config folder have ...
0
votes
0answers
10 views

Display feed of two or more entity types in a single view (e.g. node & comments)

I'd like to create a Views Block that displays the latest nodes and comments in a format like: User 1 posted [ContentType]: [NodeTitle] in [Term] 10 minutes ago User 4 posted comment on [Node:Title] ...
0
votes
1answer
13 views

Custom ordering flow

I was wondering if it's possible to replace the default commerce flow with my own custom flow. As far as I know the default flow is following: Add individual products to cart on Product's detail page ...
0
votes
0answers
14 views

Autocomplete submit on selection of suggestion

How to make an autocomplete submit on selection of suggestion for an exposed form in views ? The scenario is as follows: the user types two letters, the suggestions appear, when he clicks on a ...
0
votes
1answer
51 views

Is there a way to change how a form button looks?

I know how to add a class to a form element and how to add a form submission button, but there are classes that are automatically added to these buttons in my Drupal 8 install. The form I am editing ...
0
votes
1answer
47 views

How can I make views exposed filter case-sensitive?

When I use the exposed filter, if I search for "IMAG" all results showing image show up. Is there a way to have the exposed filter search case sensitive? UPDATE I added a screenshot to ...
2
votes
1answer
36 views

How to limit the terms of the view to the terms used?

On the product I created a "tags" taxonomy terms field. I have created a hundred "tags". My products use around 10 "tags". I created a pageview of my products with an ...
1
vote
1answer
20 views

How do I create custom layouts for Panelizer?

I was wondering how do you create custom layouts for Panelizer in D8? In D7, I can easily create my layouts, and just add a couple of lines on my .info file to let Drupal know where my layouts are. I ...
-1
votes
0answers
42 views

Remove language suffix from url for main language

I have a website in Drupal 8 with multilingual modules activated, with a few langages on it. Thus there are langages suffixes after domaine name (for instance, website.com/fr-fr/ and website.com/de-de/...
-2
votes
0answers
31 views

What should I use instead of hook_init()? [duplicate]

Please help me I need to run my module on initial time. I do same thing I drupal 7 but I am stuck in drupal 8. In drupal 7 I am using hook_init but In drupal 8 having limited hooks and deprecated ...
-4
votes
0answers
30 views

Browser caching issue [closed]

We are facing browser caching issue for few users. We have disabled Drupal application cache and we are also not using any server side caching. Still, we are facing issue. When users try to log out, ...
0
votes
0answers
49 views
+50

“Customer information #number” option appeared for sellecting shipping address?

After implementing ShippingOrderProcessor: https://gist.github.com/jsacksick/fde031197df92236ef5a916775e17a2e which I needed to show shipping costs on cart and order overview page (order summary block)...
0
votes
0answers
42 views

Is it possible to save HTML source code as it is with indentation etc.? [closed]

Is it possible to save HTML coding on Full HTML content as it is? I would want to save all the indentations, line breaks and spaces.
-1
votes
0answers
67 views

How can I limit access to static pages in my project? [closed]

I have a site I created with Drupal 8, lets say https://example.com/. I have "embedded" a static site (a bunch of static pages linked to each other) as a "subsite" of example.com, ...
0
votes
0answers
27 views

Can't get referenced node to appear in view block

I have recipe and food nodes, and recipe nodes (e.g. My Favourite Cake Recipe) link to parent food types (e.g. Cake). This link is done via a Parent Food content reference field on the recipe node ...
1
vote
1answer
42 views

What is the purpose of rerender FormState property?

I am trying to understand With a taxonomy term view Exposed form in block has incorrect action URL /taxonomy/term/all, not taking into account term id and breaking filtering without AJAX/JS and in the ...
0
votes
0answers
32 views

What is the best way to export a content type and its fields? [duplicate]

How can we export a content type, including its fields, and import it into staging or production?
1
vote
1answer
48 views

Custom form calls different form in modal, submit/ajax callback of second form not called

I created 2 forms: dms_gift_voucher/src/Form/GiftVoucherForm.php ... /** * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { .... $...
0
votes
1answer
18 views

Expiration date on product variation

How can I set an expiration date on a product variation? I am building a webshop and my goal is to have an expiration date on a product variation, meaning the after a scheduled date, the product would ...
1
vote
1answer
23 views

How to limit country list for address form drop-down?

In my store I defined list of supported billing and shipping countries at store settings. This list is respected during checkout process - limited list of countries is shown when customer is entering ...
0
votes
0answers
18 views

Filtering by User Reference with JSON API

I try to filter some data by User Reference. My problem is, it return me an empty list "data": [] It only works if the authenticate user own's the data... My request : {{url}}/api/node/...
0
votes
0answers
41 views

Cannot use another class in my class [closed]

I am using the following code. use \Drupal\drupal_moodle_integration\Services\CourseService; // Class method. public function submitForm(array &$form, FormStateInterface $form_state) { $c = ...
0
votes
0answers
28 views

Webform is not sending body as HTML

Within the e-mail handlers I've selected the body as 'twig template'. But no HTML is sent. I've activated Swiftmailer to send attachments ... is that the problem? <p>Submitted values:</p> ...
-3
votes
1answer
25 views

How can submitted values be translatable? [closed]

Like for the node, we can add the translations and the same node ID can hold all language translations. In a similar fashion, is it possible in Drupal 8 webform?
-3
votes
0answers
30 views

Need help with Installation Porto theme [closed]

I have installed the basic Porto theme but I need to install the template files, from the documentation video that I have it needs to create a new database and add(d8_main.sql) but when I try to do ...
0
votes
0answers
28 views

Issue using Config Split on content types

I'm working on setting up Config Split to share content type config between a number of multisites. Currently each site has its own config for various content types but, since they should be identical ...
0
votes
0answers
30 views

User own account, cancel account button not showing on edit form

I'm using Drupal 8, on my website I have 2 users roles, both can delete their own data, on role 1 cancel account button show on the edit form in both languages, Portuguese and English(default), but on ...
0
votes
0answers
14 views

Configurable Action Form Builder Not Called by Views Bulk Operations

I have a configurable Action that I implemented back in VBO 8.x-3.8, and it was working fine. <?php namespace Drupal\my_module\Plugin\Action; use Drupal\Core\Action\ConfigurableActionBase; use ...
0
votes
1answer
30 views

Load Bootstrap CDN only if not is loaded before from another project

I want to load Bootstrap CDN but only if is not loaded before. How can I do this? Today I'm loading on Libraries.yml like this: And it works. But the problem is: in some cases the Drupal site already ...
0
votes
0answers
8 views

Image can't be removed from widget after validation using entity validation api

I have created new media type(movie image). In that media type, I have two fields image and boolean field, I have referenced the movie image in content type and set upload limit of images to 10 and ...
1
vote
1answer
37 views

ShippingOrderProcessor not registered well?

I'm trying to implement @jsacksick solution which should force displaying shipping costs on cart page (normally it doesn't exist at that step yet). I created a new module for this and it's structure ...
1
vote
1answer
28 views

How to exclude contributed modules from being upgraded when we run composer install or composer update?

I want to exclude contributed module Ubercart from being upgraded when we run composer install or composer update ? What change should I add in the composer.json so that it ignores ubercart ...

1
2 3 4 5
301