All Questions

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

Invalidate cache of views block for anonymous users

I have a view display block that needs to be updated every 8 hours. I tried Views Custom Cache Tag module https://www.drupal.org/project/views_custom_cache_tag but I could not make it work. I set my ...
2
votes
2answers
22 views

Where is the node created timestamp stored in the database?

I need to create an SQL query that finds all nodes of a certain type created X days ago, so I can get their IDs. Due to the massive number of nodes in the database, I would prefer to use a direct SQL ...
0
votes
0answers
11 views

hook_default_rules_configuration can't debug it or force it to load

I am trying to debug a hook from title, here it says http://api.drupalhelp.net/api/rules/rules.api.php/function/hook_default_rules_configuration/7.2 "This hook is invoked when rules configurations ...
0
votes
0answers
19 views

Best Development Environment for Drupal 8? [on hold]

I'me coming from Drupal 7 and finally decided to hop onto Drupal 8. What is the best Drupal 8 development environment to work on? I am comfortable with command line and mostly do everything there with ...
1
vote
1answer
20 views

How to get the alt tag from an image field in twig?

I have a page of field images which are coming out quite weirdly when I kint their values. I can't seem to get the image url and the alt tag. The code in the twig file looks like this: field--field-...
0
votes
0answers
20 views

Ckeditor pasted url links become hyperlinks

We have disabled 'Convert URLs into links'. When you copy a url link from a browser url field like: drupal.org. Your clipboard contains the FQDN: https://www.drupal.org/. When you past this into ...
-4
votes
0answers
19 views

Need help on dialogflow chatbot integration [on hold]

I need your help to integrate the Dialogflow chatbot integration with Drupal 8. I followed some guides, but I failed. Getting one by one issues while integration. Please help me to get the proper ...
0
votes
0answers
25 views

How to create paragraph of particular type using JSONAPI?

I am able to GET the data using endpoint "site_url/jsonapi/paragraph/text". But I am not able to create a new paragraph of type text. Its always giving me error "403 forbidden". I have tried all ...
1
vote
2answers
32 views

Saving a webform programmatically in a custom webform handler throws “Entity validation was skipped.”

I am trying to save a webform submission inside the postSave in a CustomWebformHandler class. class CustomWebformHandler extends WebformHandlerBase { [..] public function postSave(...
0
votes
0answers
28 views

How to expose reverse entity references with GraphQL 8.x-4.x module?

Since Drupal 8 doesn't support bidirectional relationship, we need to query manually the reverse entity. Let's say we have 2 entities with a many to many relationship: We can add a field resolver to ...
0
votes
0answers
56 views

Drupal::request()->getSchemeAndHttpHost() returns https on a site without https [on hold]

I have a development site that is running on http but \Drupal::request()->getSchemeAndHttpHost() returns https. I see an issue that is potentially related - https://www.drupal.org/project/metatag/...
2
votes
1answer
54 views

Redirect from route when the controller has been changed [duplicate]

I'm trying to redirect to an external URL in a custom controller whenever I land on the 404 page. Right now I alter the controller destination in a route subscriber like this: public function ...
1
vote
0answers
45 views

How do I use hook_preprocess_page_title()?

I've just discovered that Drupal 8 Bootstrap theme doesn't implement all existent hooks. So, for example, hook_theme_suggestions_page_alter() works, but hook_theme_suggestions_node_alter() doesn't ...
0
votes
3answers
41 views

How do you deploy a change to a main menu?

We have a small D7 site. We want to deactivate a main menu item. On dev server I was able to deactivate it in /admin/structure/menu/manage/main-menu I believe The menu is stored in the DB, right. ...
0
votes
1answer
35 views

Array not displaying in twig template

Custom twig template is just this: <ul id="rows"> {% for product in products %} <li>{{ product.title }} <a href="{{ product.image }}">Image</a> {{ product.description }}&...
-3
votes
0answers
33 views

Views fields depended on published status. with AND/OR [on hold]

I am trying to build a view where specific fields are shown dependent on the publishing status. Field "image" should always be shown, but field "link to content" only if the content is published. How ...
1
vote
1answer
51 views

How can I pass an array from a controller to a template?

I want to render array to twig file I am able to render variables but not array. My php file : public function build() { $vid = 'Sectors'; $terms =\Drupal::entityTypeManager()->...
1
vote
1answer
54 views

Cache-Control response header includes “private”

Why does a vanilla Drupal 8 site add cache-control: must-revalidate, no-cache, private to all the pages? A Drupal 7 site adds cache-control: must-revalidate, no-cache. Is that addition of private ...
0
votes
0answers
29 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
18 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
24 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
28 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
11 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
169 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
21 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
61 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 ...
-2
votes
0answers
16 views

I want to write a custom module that gets the node title that is printed out by a custom view? [on hold]

Then pass it inside of a json object to a template that prints out the title.
0
votes
0answers
24 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 [on hold]

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 ...
0
votes
0answers
14 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
24 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
15 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
124 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
21 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 ...
0
votes
0answers
26 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->...
-4
votes
0answers
15 views

How to call a jquery function after a webform is successfully submitted via Ajax [on hold]

I have very little knowledge about drupal behaviours I need to call a jquery function after the webform is successfully submitted via ajax.
0
votes
1answer
13 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 ...
0
votes
1answer
25 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)? Thanks in ...
0
votes
1answer
31 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
40 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
18 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
24 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
31 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
26 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
22 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
16 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
12 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
28 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
26 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?

15 30 50 per page