All Questions

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

Extend twig template from differnt theme (parent)

I created a sub theme of the bootstrap theme. In one of my twig-files I would like to extend a twig template from the parent like this: {% extends '@bootstrap/menu/main--main.html.twig' %} This ...
0
votes
0answers
6 views

Add a class to a image for one specific views in drupal 8

I need add a class to a image for one specific views. I tried: - "theme_preprocess_field" but not work. - "theme_preprocess_image" but is for all image and i can not identify a one specific view. - In ...
0
votes
0answers
4 views

How do I programmatically modify the body field's markup/render after it's filtered “Allowed HTML tags” from “Content Authoring”?

I need to modify what is being rendered from the BODY field of a node. However, the filter for 'Limiting allowed HTML tags and correct faculty HTML' needs to be left ON. There is a certain tag I ...
0
votes
0answers
5 views

Dropdown to display multiple values

I am trying to display multiple values in a drop down and store it to the database. How could I do that? $form['options'] = array( '#type' => 'value', '#value' => array('PA' => t('...
0
votes
0answers
5 views

D8 - facet block is not getting display on search page created by view

I am using serach api with apache solr server for renering the search result. On my search page, Search result is rendering properly but facet block of content type is not getting render in defined ...
0
votes
0answers
12 views

Steps to update vendor files after pulling changed composer.lock file

Let's say I work in a group and somebody else did composer update and pushed changed composer.lock file. I pulled it and now I have to do update too, to match the files from changed lock file. In ...
0
votes
0answers
5 views

Using Payment with Webform and without Commerce?

Has anyone had any luck integrating Webform with the Payment module but without Commerce? I'm considering attempting to refactor Commerce Webform Order so that Commerce integration isn't needed ... ...
0
votes
0answers
3 views

Contextual filters - using search in custom block does not work

After a long time I started developing my second Drupal site. I'm currently creating a view with two contextual filter (postal code / locality). On my site, I have a block "Search" in which I set a "...
0
votes
0answers
9 views

How to show “custom field” a user profile in a Taxonomy view?

I have a view set to show the content where I show the taxonomy and fields of a Content Type. At this point I added a Phone field in the user profile in> "config/people/accounts/fields". How do I ...
1
vote
0answers
13 views

Why is the apostrophe converted to ' in account activation e-mail?

In admin/config/people/accounts, the body of Welcome e-mail is (my site in in French): user:display-name], Un administrateur sur [site:name] a créé un compte pour vous. Vous pouvez maintenant vous ...
0
votes
0answers
22 views

How can I redirect to a custom page only if cookie is set in age verification

I am using an age validation module that only allows users to access any page on the site as long as their age is above 18. The form controller has a checkage method and the submit which look like the ...
0
votes
2answers
32 views

Updating Drupal project using Composer fails

I have site (which is originally installed also with composer) with drupal core version 8.7.2. I'm trying to update it to latest 8.7.8. When I do: composer outdated "drupal/*" I get the list of all ...
-1
votes
0answers
18 views

Unexpected error occur when I render a views field in views twig file

I have created a User Profile block view and have an HTML template for this. The view is working normally without using a custom template but when I create a custom twig file name is views-view-fields-...
0
votes
0answers
16 views

Field replacement pattern not rendering

I am running Drupal 8.7.8 I've created a view and excluded my fields from display except for the last field which I have rewritten the results to output all the replacement strings in a certain ...
0
votes
0answers
14 views

How to apply length validation in following attached file with code [on hold]

I am trying to apply a length validation for the following form: How could I do that? I am also trying to display a multiple selected value of dropdown list. However, I am not able display it. How ...
0
votes
0answers
20 views

How to display Block content only to users that have submitted a specific webform

Background: Our Drupal website has different user types, lets say A, B, C, D, and E. We have private content that should only be accessed by A, B and C once they agree to the privacy terms, which are ...
0
votes
1answer
9 views

Cant send login request via json

I was following this guide https://www.drupal.org/docs/8/modules/jsonapi/what-jsonapi-doesnt-do to try headless drupal and in it they use this curl request to log in: curl \ --header "Content-type:...
-2
votes
0answers
19 views

Dev Desktop Webform Module Install

I'm new to Drupal and am trying to load the new module Webform from the Drupal site. I did exactly what I did for all other Module installs and with webform I get this error webform-7.x-4.20.zip ...
0
votes
0answers
23 views

is there a way to generate dummy content for paragraphs?

I am working in Drupal 8. Is there any way, with devel, to generate dummy content for paragraphs to visually get a feel for how things would look? Is there a module or script to accomplish that might ...
-1
votes
0answers
8 views

How to add a container that contains 2/3 column layout in Layout Builder?

At the moment I only can add a DIV container via HTML in editor for one column blocks. I want to add this for sections that have more blocks/columns.
1
vote
0answers
19 views

Custom module route to config form deleted, now the site is down

So I have a custom module Domaincheck which had an admin configuration form. Since that one is not needed at all, I decided to clean up and delete the form and route. That resulted in a Symfony\...
0
votes
0answers
20 views

How to add Conditional Fields in Paragraphs

I was able to add Conditional Fields in Paragraphs using this article https://agaric.coop/blog/conditional-fields-paragraphs-using-javascript-states-api-drupal-8#comment-209 But it controls and hides ...
0
votes
0answers
7 views

Drupal 7: how to prevent page refresh after a button click?

I know this question is already asked, but my problem is different. I have a code field created with Display Suite, that displays an audio player named AblePlayer, with a playlist of three tracks. In ...
-1
votes
0answers
12 views

Best way to add a subtitle to a view page

what is the best way to add a subtitle to a page view? Thanks
0
votes
0answers
7 views

In the “Add menu link” form, filter “Parent link” field to show only the menu I'm adding the link to

In the Add Menu Link form, the "Parent link" field has <Administration> and its children as options. This makes sense, as I clicked "Add link" from the "Operations" for the Administration menu. ...
0
votes
0answers
7 views

Adding a wrapper element to a field in Display Suite

We have a content type, Social Post, from the social_feed_aggregator. This content type holds social media posts that the module grabs from various social media platforms. We are using display suite ...
2
votes
1answer
27 views

Checking for an Acquia Environment variable

Trying to check for an Acquia cloud environment variable in my twig template, but its not working in Dev or in Production. Similar question is answered here, but I still can't get the twig syntax ...
0
votes
1answer
14 views

Select all checkboxes of an entity reference field on creating a node

Drupal 8.7.x For one of my content types I have an entity reference field referencing a taxonomy vocabulary. I have a lot of terms in this vocabulary which makes it tedious to check all the ...
0
votes
0answers
13 views

Translating text in custom modules

I'm working on a project with many custom modules and the need to translate some of the text in them. A lot of the text is repeated between them (error messages for example). What would be the best ...
1
vote
1answer
29 views

Fetch value from json in mysql drupal 8

I have a field in drupal "field_xyz". it stores json values. JSON looks like this: {"Id_-_SiteWasteProductAction":"34638393224", "Postcode": "CSF 12CF"} I want to fetch postcode value from this json ...
1
vote
1answer
57 views

How to call hook_theme_suggestions_HOOK_alter twice, if node is shown twice?

What I want to do is show the contact person responsible for a language in two different regions simultaneously, but with different twig templates. I therefore have two regions: footer and sidebar I ...
1
vote
1answer
23 views

Change the front page basing on the domain

I need to write a custom module to map some static pages used as front page to some specific domains. For example, If domain is www.abc.com, the front page should be static_page_1 If the domain is ...
-1
votes
0answers
19 views

Content list page not working after taking site live in drupal 8? [on hold]

after taking drupal 8 website live, site content list page is not working. I am not able to edit any node beacase of this issue. https://i.stack.imgur.com/MMiAn.png Please check above link Kindly ...
-1
votes
0answers
12 views

How to use custom submit handler in webforms

I'm trying to use a new submit action button on my webform and give custom handler functions to it, how to do it using hook_alter ..?
0
votes
0answers
13 views

Show workflow transition bar in all states

I've created a custom workflow using the workflow module with the transitions listed below and I've noticed that when going to the view page of a node the workflow 'bar' that lets you transition a ...
0
votes
0answers
5 views

Profile installation how to use myprofile_final_site_setup (example)

I'm trying to understand how to use this parameter offered by the Drupal 8 installation profile. What I need is to be able to perform some final operations after the entire profile has been installed....
2
votes
1answer
53 views

How to redirect on Access Denied

When getting a 403 error, Drupal is not redirecting to the URL configured in the Site Information settings. Instead, it keeps the URL in the address bar of the browser, uses the page template (page--...
-1
votes
0answers
7 views

Videos and PDF's not displayed on mapping with domain

I am using Drupal version 8.7.7 in which using vdieo.js and pdf.js to display embed video and pdf files. On VM IP both files are rendering fine but on mapping, with the domain, both viewers are not ...
0
votes
0answers
13 views

Replacement twig for the FOR/ENDFOR so autopopulate will work?

My webform accepts all the pre-populated fields from the URL and hangs on page one when I include the following in my page 3 computed twig: {% for value in data.itemsused %} {% set subval = ...
-1
votes
0answers
15 views

Remove webform results tab from node

I do not understand why, but my code does not work. What can be wrong? function module_menu_alter(&$item) { $item[node/$node/webform/results/submissions']['access callback'] = FALSE; }
1
vote
1answer
24 views

How to create node twig template suggestions for one content type?

I need to create a node twig template that is just for the basic page content type that based on a custom field on the content type. We have other content type like Article, Blog, Products that do not ...
0
votes
0answers
22 views

Invalidate local_task cache for a specific entity

Is there a way to invalidate local_task cache for a specific entity? The issue is that an additional local task is defined by a different module that has a custom access check. That custom check if ...
1
vote
1answer
28 views

Add textfield to system branding block form to specify link URL

I would like to alter the branding block to add a textfield in the block form to specify the URL it should redirect to. The URL is currently fixed to <front> in the Twig template. What I've ...
-1
votes
0answers
9 views

Updating data in a form (set arguments from form)

Help me please. I would like set two arguments to ServiceGit.php from my Form.php and then get this again in my form. My app work so: I have $target & $target_id in ServiceGit. To default both ...
0
votes
0answers
22 views

Migrate taxonomy terms

I am looking for a way to import Nodes to D8 from a source using Json Api The node is having terms referenced but i cant find a way neither a tutorial to import and then reference thoses terms to the ...
1
vote
0answers
23 views

How to log configuration changes in a sensible way?

In order to log simple configuration changes like a site-name change, contributed modules like contrib_log work fine. It just diffs the changes files in active configuration and logs it. But when ...
0
votes
0answers
16 views

Layout builder - Can't use hook_block_access()

I'm using hook_block_access() so I can apply custom contextual access rules to blocks based on a Node field value of the page being viewed. This works fine unless I build the page using Layout Builder....
-4
votes
1answer
17 views

I need to place content directly under the secondary block region of the Drupal theme. But, it does not allow me [on hold]

The diagram image shows what it is currently laid out like. I want column three to appear under the secondary block, not to be moved always to the left. The drupal theme block regions diagram ...
0
votes
1answer
30 views

“Username unknown” when programmatically creating user in hook_ node_presave

I have created content-type BookNow. In this I added field like Address, username, email, fullname.. I want to when submit booknow form than it can automatic creating new user which have own ...
0
votes
0answers
7 views

simpleSAMLphp Authentication or simplesamlphp-module-drupalauth?

I followed How to Configure Single Sign On across Multiple Drupal 8 Platforms or Websites? I only configured a service provider with simpleSAMLphp and I have some difficulties to make an identity ...

15 30 50 per page