All Questions

0
votes
0answers
5 views

Commerce 2: “Manual” payment method still requires user to enter name and address info. How can we remove this requirement?

In Commerce 2 we are using the "Manual" payment method to allow certain users to select this option as a "Bill Me Later" method. However, when this Manual method is selected the user is still required ...
0
votes
0answers
21 views

Stop css file renaming when working locally

I've followed this guide to setup settings.local.php: https://www.drupal.org/node/2598914 And in my custom subtheme I have a stylesheet style.css which is working correctly. However when I look in ...
0
votes
0answers
21 views

Use Drupal languageManager() to Get Unicode v11 Language Names?

Is there any way to get Unicode v11 supported script names from Drupal data? I would like to use '~@(\p{Language}+)~u', but Drupal provides different language names such as "Russian" and "Mongolian" ...
0
votes
0answers
15 views

Get the field for a value of a “List (integer)” field using entity_load()

I am trying to get the label for a value of a List (integer) field using entity_load(). With the code I am using, I'm able to get the field key with $flagging->field_form_status['und'][0]['value'],...
0
votes
1answer
39 views

Get raw and relative path of a file uri

I have a file with an uri and I want to get its raw and relative path. Uri: public://videos/Test Video.mp4 Path: /sites/default/files/videos/Test Video.mp4 I found already a way to do this: $...
0
votes
0answers
12 views

Hide “empty” menu parents

I have the following scenario: I have a sidebar that contains my mainmenu. Menuparents are linked to route:<nolink>. Those parents can be expanded using superfish (accordion). When a user has ...
0
votes
0answers
18 views

Site seems to miss the “private” wrapper, how can I fix it?

I can not enable the private folder getting the warning as below: Warning: file_exists(): Unable to find the wrapper "private" - did you forget to enable it when you configured PHP? in ...
0
votes
1answer
23 views

Get fields of referenced entity in view

I have two content types, Project and Resource, I have a view displaying fields from Projects, and I would like to display fields from resources referenced by projects in that view. If I Twig ...
1
vote
0answers
19 views

Assign template to a view

I am using the latest version of drupal and trying to assign my custom created template to a view. I have created a view with machine name designers and followed this article to create custom template ...
-2
votes
0answers
14 views

Solution to import csv to multiple tables

I have 0 experience in Drupal but a client asked if it's possible to import a csv to his drupal site. The problem is that each csv row must be stored in multiple tables and each table has some extra ...
0
votes
1answer
14 views

Get Entity ID when is saved

I need to capture the entity_id when the entity is saved. The ID will process and insert in a custom field. I use hook_entity_presave(), but when is a new entity the ID is void. Is there any way to ...
0
votes
0answers
19 views

Custom workflow with commerce 2 [closed]

I need to create a shop with the commerce module to generate memberships. A user must be able to order multiple memberships for different people. I need to know your opinion on how to create these ...
0
votes
1answer
9 views

Installation fails with missing “file” -plugin error

We are creating our own D8 installation profile from previously built site. We exported config and split it to modules, so that our custom modules are defining their own configs. We've had a lot of ...
1
vote
2answers
30 views

Customize title template based on page

I know I can customize the template by overriding page-title.html.twig but I'm looking for a way to have more than one title template. in my case, the suggested name form my path is ...
0
votes
2answers
25 views

How to render author custom fields info on comment and node twig template?

I am trying to render the author Full Name and other authors customs fields information in comment.html.twig and node.html.twig. But not any of the fields that I made for users such as "First Name", "...
0
votes
0answers
5 views

updating the contents by using module “scheduler”

I have a problem with updating the contents by using module "scheduler". When updating the current contents and set the publish schedule,but the updated contents are published at once. It looks doesn'...
-1
votes
0answers
5 views

Module sitemap not showing in page

i install module site map in my localhost but when i enter to http://mywebsite.com/sitemap.xml i don't see anything but when i click in ctrl+u to see source code i find map xml but i want when i ...
1
vote
0answers
25 views

Post update hook fails to run via Drush, but works via update.php

I've implemented hook_post_update_NAME to bulk import some files into Drupal (creating file and media entities for them). This hook runs correctly when I use update.php. But it seems to silently fail ...
0
votes
0answers
9 views

Price resolver and cookie cache context vs cart order item prices

I have custom Drupal commerce price resolver that changes the base price for a product based on the value of a cookie (or absence of one). The resolver adds appropriate cookie cache context to the ...
0
votes
1answer
13 views

In Commerce 2, how can we allow users with a role to bypass payment during checkout (bill me later)

We have a Commerce 2 site that we need to be able to assign users a role ('Bill Me Later') that will allow the user to select the payment option 'Bill Me Later' during checkout. I have not found a ...
0
votes
0answers
21 views

Cannot login as admin

I cannot login as admin anymore on my Drupal 7 installation. I tried: Generate a new password with user_hash_password; Generate a new password with SQL Query; Clearing the sessions table; Clearing ...
0
votes
2answers
31 views

Get node's view mode within template_preprocess_page

We have to get the current node's view_mode from within the mymodule_preprocess_page(&$variables) hook. When we tried the following we could not get the view_mode after performing some validation ...
1
vote
1answer
42 views

Abstract Base Class versus Service with Queue API

I'm trying to figure out the best way to structure a custom module that uses the Queue API in D8. I'm new to D8 and a bit rusty with OOP so forgive me if I'm breaking some recommended design pattern ...
0
votes
1answer
35 views

drupal_get_path function for third party PHP includes files

I am trying to add some PHP includes files into Drupal 7 site. The files are on this page - https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/...
1
vote
1answer
18 views

Create config object with array containing key-value pairs

We have a custom module, mymodule, that we want to use to create a config object for so that it can contain an array of key-value pairs. We need to be able to click button Add More on the form that ...
0
votes
0answers
28 views

Pager twig can't access to my javascript file [on hold]

I want to change an element color on my page depending on the view's pagination. If i click to previous my div will be green, if i clicked on next my item will be red. I created a view in Drupal. I ...
0
votes
0answers
16 views

Pulling Custom Content Type field value into a token

I need to create a custom token for a custom content type in Drupal 8. there is a field, e.g 'field_image' I'm trying to use Token Custom module to pull the value of the filed and into the token. ...
0
votes
0answers
15 views

Display users with quiz results and users who didn't take the quiz

Views shows only users that took the quiz and shows their score from the Quiz module. If I create Users views there is no relationship for Quiz fields and if I create Quiz view it shows only users ...
0
votes
0answers
6 views

Webform response - user permissions

Using Drupal 7 I have created a webform where submissions are entered by any authenticated user. The goal is to have one user (not an admin) have the ability to see the submissions and respond in the ...
0
votes
0answers
11 views

DevDesktop InnoDB Error [closed]

When launching my site in Acquia DevDesktop, i'm getting the following error. The website encountered an unexpected error. Please try again later. Looking at the logs in DevDesktop (mysql.err) shows ...
0
votes
1answer
33 views

Two different editor in one content typ

is there a way in drupal 8 to use two different editors (CKeditor with two different buttonpanels or two differently allowed html tags) in one content type? I have created a content type of a text ...
-1
votes
0answers
9 views

Custom field in checkout D8 / Commerce 2 [closed]

The module https://www.drupal.org/project/commerce_fieldgroup_panes is not compatible at this stage. Happy to hear if there is another module compatible with D8 that will work
-1
votes
0answers
23 views

Any way to provide a UI to blur only a part of images?

Users can upload photos (using the core Media module). Is there some way to provide a UI to allow users to selectively blur parts of the image upon uploading? Example: User uploads a chat screenshot,...
0
votes
1answer
12 views

Node is flagged, node author comes back to the site, how to show how many new flags since last visit?

I created a "new activity feed" view page in which a user can see how many new comments have been posted to his own nodes since his last visit Eg : since you last last visit : - 21 new comments have ...
-1
votes
2answers
42 views

messenger()->addMessage not working after a $form_state->setResponse

In the submitForm of a custom form, I have this: switch ($form_state->getValue('suscribe')) { case 0: $iStatus = 1; break; case 1: $iStatus = 3; $sFileName = 'sites/default/...
0
votes
1answer
22 views

Import image with migrate tools changing its name

I’m trying to migrate some data from a remote rest/api (json) using the plugin source url. My problem is in the json i consume the image name field comes with an incorrect value. In imageName comes '...
0
votes
2answers
16 views

How to filter content on the view based on nid?

For my Drupal 8 website, I need to create a view page, where I would like to list only 4 specific nodes of "Basic page" content type. How could I handle it? Under filter menu there is no option to ...
0
votes
1answer
23 views

File upload through form type file

My Drupal version is 8.6.10 I am trying to upload a file through the file_save_upload function and the function is looking for the file in Symfony\Component\HttpFoundation\FileBag Object $...
0
votes
1answer
18 views

How do I programmatically set the preferred language for a user?

I would like to update the preferred_langcode of a user as soon as he changes the language in a language switcher block. I'm already aware of the getPreferredLangcode method mentioned in https://api....
0
votes
0answers
40 views

Why is a ISO:8601 date within a time tag converted to zeroes?

I've been attaching Timeago script to my themes and it requires dates to be formatted like this. <time class="timeago" datetime="2008-07-17T09:24:17Z">July 17, 2008</time> In a view, I ...
0
votes
0answers
16 views

Making a Display Suite Block field visible only to node author

I've been stuck with this issue for two full days. I've created a view including a VBO field and want to put that on a specific node type making it available/visible only to the author of each node. ...
0
votes
0answers
10 views

get all order promotions

How do I get all discounts on an order? Is it possible to get all promotions applied on an order: $order_id = \Drupal::routeMatch()->getParameter('commerce_order')->id(); $order = Order::load($...
-2
votes
0answers
25 views

My site got hangup [closed]

I have a query on a website that usually has heavy traffic. Problem: Site got hangup two times with different errors. 2019-03-08T16:16:27.401498Z 0 [Warning] InnoDB: Table mysql/innodb_table_stats ...
1
vote
2answers
9 views

How do I add a minipanel to a panel page?

In D7 I've created a new minipanel and would like to add it to a panel page. However, when I go to add it I cannot find it. It's not under the category I've set it in and it's not under the Mini ...
1
vote
0answers
10 views

How do I add custom pages or view pages to search index?

Suppose I have a custom page built in a custom controller. Or similarly, a view page the displays the list of nodes, such as the classic "admin/content" page. I want certain user roles to be able ...
1
vote
1answer
34 views

Upon submitting a webform, set a date field on the article node equals to “current time” + “X minutes”

I am using the Field Timer module to display countdown timer on my article node. This module will take the value of the date/time field (my case: field_article_datetime) and convert it into a ...
0
votes
1answer
10 views

Drupal 8 : Add Product SKU as search filter for Orders view of the Commerce module

I like to achieve below solution using Drupal configuration instead of code. The commerce module has been installed for one of our Drupal CMS site. In the admin interface there is an Orders view for ...
0
votes
2answers
29 views

Can not update drupal/core with composer

Can not update drupal/core to 8.6.11 composer prohibits drupal/core:8.6.11 shows webflo/drupal-core-require-dev 8.6.10 requires drupal/core (8.6.10) How can I solve it ??
0
votes
1answer
29 views

Why are my if/else statements in page.html.twig ignored?

in my theme template of page.html.twig (theme is a subtheme of classy core theme), my if statements to render a region or not are completely ignored by twig template engine. The regions (e.g. the ...
0
votes
2answers
15 views

How can I get rid of Contribute 8.x-5.0-beta3 module?

What's wrong with Contribute 8.x-5.0-beta3 module? After 8.6.10 update I have a problem with Contribute module. First it's marked as outdated/not supported but on some sites I can not remove it fully ...

15 30 50 per page