All Questions

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

Why Authenticated user not able to submit webform and only admin can submit?

I am creating a webform with just two fields and displaying it on modal popup with Ajax submit. But the issue I am facing is, this webform can only be submitted by Administer role user not by ...
0
votes
1answer
21 views

How can I change the items order in a pulldown list of filter in views?

Hello Drupal community. I have a question about Views. I have a “People” view with a role filter and the pulldown list for this filter look like this: Administrator Editor Approver I would like ...
-1
votes
1answer
26 views

How do I show multiple values from an entity reference?

I have a content A that uses reference from users. Users, basically, have more than a content A. I have view that shows users and adds a relationship from the field used in content A. I added a field ...
1
vote
2answers
36 views

Filter on boolean with NULL (unset) value

Client wants to hide some published content from specific Views displays. Unpublishing the content is not an option: it needs to remain accessible. I added a boolean exclude_from_view field to ...
0
votes
1answer
12 views

MiniOrange SAML SSO Drupal Module – Multilanguage Support

This is my first post at Drupal StackExchange. Please feel free to redirect it to the proper forum if this is the incorrect one. How do I configure Apache Server so that MiniOrange SAML SSO Drupal ...
3
votes
1answer
183 views

Is there any convention about the form IDs?

Is there a convention for the form IDs? I see that core sometimes uses module_name.form_name and sometimes module_name_form_name. In my case, I'm using module_name.form_name.
0
votes
1answer
25 views

Setting up multilingual nodes

I am trying to set up a D8 (8.7.9 to be precise) multilingual site and hitting some weird bug. I have a node type basic page consisting of the title field and a body text field. Initially I create ...
0
votes
1answer
67 views

SASS for module CSS?

I have worked in Drupal projects where SASS was used to generate CSS files in a theme (with gulp or compass). I have also worked in Drupal projects where a lot of the CSS (without SASS) was living in ...
0
votes
0answers
25 views

How can I customize the calendar view template?

I am using the Calendar module in Drupal 8. I want to customize the layout of the calendar. For this, I created the views-view-fields--page_week.html.twig template, where page_week is the machine ...
0
votes
0answers
18 views

Access Denied for Password Reset link [closed]

Our users are getting the password reset link and getting "access denied" when trying to access the link. As far as I know, we have not made any edits that would affect this. I tried adding the ...
1
vote
0answers
25 views

Styling page-wide sections of an arbitrary page

Normally, the main content container is "centered" so that the page is, by default, not page wide. This works in 95% of the cases. Except for when design calls for a page-wide section (i.e. centered ...
1
vote
0answers
30 views

How to add custom webform email handler if submission is sticky/flagged

I use the bulk operation "Star/Flag selected submission" within webform views to process webform submissions which works nice. I would like to be able to send an email to the author if a submission ...
0
votes
0answers
18 views

Dependent fields

I have 3 content types; team, player and game. When adding a new game, I would like user to first select team, and have the player list loaded only for that selected team. Is there a module that would ...
2
votes
1answer
131 views

How do I get paragraph fields text data without the <p> tags?

I am trying to pass my paragraph field data from Drupal to a component that I have created in Twig. My component echos out data like so: <p class='my-custom-class'>{{ my_var }}</p> In my ...
0
votes
0answers
25 views

How to mark the fields of a view shown in a table as already read?

I have a view that displays the results as a table, and also contains an exposed taxonomy filter. I need a way to know when a certain field in a row has a value that has already been "seen". A row ...
1
vote
0answers
30 views

Make field required if entity reference field is filled

I'm trying to make some fields required if an entity reference field is filled. This is the code I currently have: $form['node'] = [ '#type' => 'entity_autocomplete', '#title' => $this->...
0
votes
1answer
14 views

How to provide a filter based on json:api for referencing nodes with a term reference field?

I am working with the Entity Share module to synchronize content between Drupal instances and I need a filter to define which content can be shared. My use case is almost identical to the one ...
2
votes
1answer
40 views

Different CSS file when in development mode

Using Gulp I create two css files. One style.css and one style.min.css. Is it possible to load the style.css when developing (locally) and the style.min.css when in production (remote)?
0
votes
1answer
36 views

Migrated content type fields not showing

I'm trying to migrate custom content types with attached fields from Drupal 7 to Drupal 8. Using drush migrate commands I can successfully migrate all content types, but I have problem with fields. ...
0
votes
1answer
45 views

How to know a user can access node/{nid} and node/{nid}/latest in fastest way

I have a view displaying list of latest node revisions. The view has title field. The website gives users permissions to access node/{nid}(shows latest revision if published default revision doesn'...
0
votes
0answers
19 views

How can I migrate a site to another site with a different installation profile?

How can be D8 sites migrated in Aegir between different installation profiles, and not only between platforms using the same installation profile? There is a solution in Aegir for D6->D7 and D7->D7 ...
0
votes
1answer
33 views

How can we check whether block is enabled or disabled in .theme file?

I am displaying a block in twig and i am passing twig variable from hook_preprocess_page. But the issue when i disable the block from backend still its showing up in frontend. Im not able to get ...
2
votes
1answer
34 views

How do I programmatically delete a node by internal url alias?

How do I programmatically delete a node with a specific internal url alias? Background: We are trying to delete this node so that it can be replaced during an update hook.
1
vote
1answer
27 views

How can I have Devel generate nodes with different terms and not always the same term?

I am using the Devel module to generate content (nodes) as a test. The content type has a field referencing a vocabulary that has terms already added to it. When 1000 nodes are generated, Devel ...
2
votes
1answer
25 views

Sorting a view on a taxonomy term with entityqueue

I'm trying to use an entity queue on a taxonomy to create a new sort order for an existing view. But I'm having trouble configuring it. I've created a dummy website with a fantasy role-playing game ...
-1
votes
1answer
18 views

How can I programmatically create a Profile 2 profile?

I am taking a look in the Profile 2 API documentation: http://api.drupalhelp.net/api/profile2/function I guess profile_create() or profile2_save() are what I need. But I have read somewhere ...
0
votes
1answer
20 views

voting entity reference field

I have two content types, game and player. Each game can have a number of players assigned to it. I would like to have the capability to give votes to each player in a game. What are some ways to do ...
0
votes
1answer
16 views

How to move block from a region inside of hook_preprocess_node?

I have added mycustomblock to the header region in our settings (/admin/structure/block). We are using the standard content block and displaying that in the Content region, which is displayed below ...
1
vote
1answer
29 views

Why doesn't the batch process start?

I've created a class that extend the 'FormBase' class to create a form where I can upload a XLSX file to import into custom DB table. To process the import I would use the 'Drupal batch process' to ...
1
vote
1answer
28 views

Is the tags section valid in the info.yml file?

I see in the devel.info.yml file a section named tags tags: - developer But I can't find it on the documentation page. Is the tags section valid in the info.yml file or is it just an error?
0
votes
0answers
7 views

Strong commerce order line items grouping

I need add to cart some Order Line Items grouped to don't allow the user to remove or change the amount of one of them without changing the other too. I can't do this with a unique Order Line Item ...
0
votes
1answer
15 views

Load Media File in Webform Mail Handler

I want to use a single webform to send download links with specific media files to visitors that fill out that form. For example on an URL like this: https://example.com/downloads?media=1234 The ...
3
votes
1answer
38 views

How can I disable meta tags provided by the Metatag module for a custom route?

I have created a custom module for displaying the players information. Module will create dynamic pages and each page will display players stats. With the help of the following links, I was able to ...
0
votes
2answers
21 views

How do i dynamically import changing feed links within a feed

I am uncertain how to approach this. I have a feed with housing cases that is changing constantly. The feed consists of a case number and a feed link to that particular house. Each house has so much ...
1
vote
2answers
31 views

Twig template print all comments but not the comment form

For context: in my template file node--some-node.html.twig i have a grid of items which have a custom comment form on them. The form creates a comment through an API. The form passes the ID of the ...
1
vote
2answers
33 views

How to change the date format in the date field as a select list?

On user registration page, I have added a date field in select list. In the manage form display tab, I can set the order of the dropdown fields like day/month/year or month/day/year But I am unable ...
0
votes
1answer
45 views

How do I print individuals fields in block.html.twig when is a node in a block?

How do I print individuals fields in block.html.twig when is a node in a block? The template is working fine. I can hard code some random text and it is displayed. I just can't display the field ...
0
votes
2answers
23 views

Views footer include twig

Is there any way to include an if condition in views footer. I have to check the total rows {% if [view:total-rows] > 6 %} <div class="btn">View AllEvents</div> {% endif %} But this ...
0
votes
1answer
18 views

Link to node in View with TWIG

I have a set of nodes, some of which are just a title, while others have body and other content. I'm trying to create a view, which lists the node titles. If the body of the node contains content, ...
0
votes
0answers
29 views

Dynamic meta tags and description in custom pages [duplicate]

I have a custom drupal module which will generates pages for players in my site. The players stat data is meant to be updated most of the time, so for ease of use, I have created a custom module for ...
1
vote
1answer
51 views

How can I display the block title when rendering a block using Twig Tweak?

Block title when using twig-tweak plugin, not showing. I created a block-type view. And using the module's cheat sheets, I called: {{ drupal_view('views_name', 'block_1') }}
1
vote
1answer
111 views

Notice: Trying to get property 'nid' of non-object

In Drupal\rsvplist\Form\RSVPForm->buildForm(), I wrote this to get the current nid: $node = \Drupal::routeMatch()->getParameter('node'); $nid = $node->nid->value; I get this error: ...
0
votes
1answer
26 views

How do I know when another contributed module deletes a block?

I have written a Drupal 7 module that adds about ten fields to the block administration configuration form and saves the values for those fields in its own database table. My module does not create ...
0
votes
1answer
28 views

Why would all theme background colors disappear after moving to different server?

A site using MAYO 7.x-1.2 was moved from a Windows IIS to a Linux server. Shortly thereafter, all background colors defined in MAYO settings (and also any custom CSS) have disappeared. Also gone is ...
1
vote
1answer
23 views

How to get a taxonomy custom image field URL value

I've created an image 'field_term_preview' field on the taxonomy vocabulary and trying to get this URL in my custom module: $terms =\Drupal::entityTypeManager()->getStorage('taxonomy_term')->...
0
votes
2answers
45 views

How do I programmatically save “2019-11-04 07:30:00+01”?

I have "2019-11-04 07:30:00+01" as datetime value. I am not getting how to handle the "+1" part in a Drupal 8 date field. I am using this code, but it's not giving me any value. use Drupal\Core\...
1
vote
1answer
49 views

Programmatically check the checkbox of an exposed filter

I need to check a checkbox on an exposed filter for a view based on the url. I can't seem to figure out how to do that. If x is detected in the url, I want to set one of the fields of an exposed ...
0
votes
2answers
26 views

Form submission handler is not executed

In a module, I am using the following code. function mysimple_form($form, &$form_state) { $form['#method'] = 'get'; $form['#action'] = '/buy/{_val_}'; $form['search_location'] = array( ...
1
vote
1answer
57 views

How to store temporary metadata for the remainder of a request?

I am looking for a way to store some additional metadata for the remainder of a request, that should be removed after the request has finished. Sessions or SharedTempStore store persistent data across ...
0
votes
0answers
43 views

Redirect user to a specific page

I'm new to drupal. And I have a project that has a search block on the home page that redirects the user to a page based on the user search terms. Everything works fine but I have a FAQ page that ...

15 30 50 per page