Questions tagged [8]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
22 views

Commerce 2 checkout login pane conflict with registration form

I just encountered strange problem. I am using drupal 8 commerce 2 default "login or guest or register pane" When i try to login with existing user it validate registration required field. Please ...
1
vote
1answer
18 views

Search using view and facet as block

In my project I need facet search as block view that need to be included in content region. So I created View as block and added facet block in header of the view. Also need infinite scroll, so ...
0
votes
0answers
17 views

AlreadyInstalledException on running simpletest throught Docker and PhpStorm

Well, I struggle to run simpletest on my PhpStorm. I tried a lot of things but I'm unable to find what I did wrong. I followed thoses tutorial : Running PHPUnit Tests in PhpStorm with Docker ...
0
votes
0answers
15 views

Custom submit handler for views exposed filter not working

I am trying to alter the views exposed form filter submit handler by using modulename_form_views_exposed_form_alter(&$form, FormStateInterface $form_state, $form_id) { if ( $form_id == '...
1
vote
1answer
399 views

Entity reference field dependent on entity reference in referenced entity of another entity reference field

I have a content type 'order' with 2 entity reference fields. One is a reference to another content type 'brand' and the other is a reference to a taxonomy term 'categories'. Now the content type '...
0
votes
0answers
29 views

Notice: unserialize(): Error at offset XX (removing Paragraphs)

I'm trying to remove Paragraphs and modules related to it manually (because I can't remove it completly from admin page). I'm using UTF8 without BOM in Notepad++ when editing key_value BLOB file that ...
0
votes
1answer
848 views

How to access weight of a paragraph in twig?

I use paragraphs with my content type. I need to show weight (order) value of each paragraph in my twig template. I can change weight with select box when I edit the node, but I can't figure out how ...
0
votes
1answer
12 views

Print Title, Header and in Different divs

I have created a view and called content types events from FILTER CRITERIA , created template page--events.html.twig to override design. Problem is here I have called {{ page.content }} which prints ...
0
votes
1answer
805 views

How to get url and description of FileFieldItemList's items in node template

I have a content type called publication which results the node's twig template: node--publication.html.twig. This content type contains a multiple file fields where the description is allowed. I ...
4
votes
2answers
4k views

I don't see Views Theme Suggestions

For some reason I don't see the views theme suggestions in my twig debug information? What do I miss? In my development.services.yml in set debug to true. I do see debug information and theme ...
7
votes
4answers
5k views

How to hide the text formats help text?

I want to hide the description of the text format under the "Comment" box which says: No HTML tags allowed. Lines and paragraphs break automatically. There are a variety of ways to do this on Drupal ...
0
votes
0answers
30 views

How can I use / add custom page size in entity_print module with dompdf engine?

As far as I know dompdf engine give me a lots of predefined page sizes, but I would like to use my custom size (101.4 x 186.4mm). How can I add a custom page size?
-2
votes
0answers
29 views

How to add static HTML pages to Drupal?

I am working on a Drupal 8 site in which I want to link to a brochure I have locally. The brochure contains static html, css and javascript files(also index.html). What I need to include these files ...
1
vote
2answers
417 views

How to create .install custom file

How to create and add .install file for druapl8 custom form data storage...my file is custom_form.install but my custom module not load this file <?php /** * Implemetation of hook_schema() */ ...
1
vote
0answers
28 views

Respecting permissions in getStorage('taxonomy_term')?

Edit: I just realized that Taxonomy permissions are not native to Drupal core, they are the result of a module we activated: Permissions by Term. (This will explain why they are not being respected by ...
0
votes
0answers
50 views

how to save user without hashed password?

I have to install drupal 8.7.6. I have a module for add user programmatically. Using /Drupal\user\Entity\User::create(); method. Using this module user registered successfully. So my query is how ...
12
votes
12answers
17k views

Redirect after user login

I would like to redirect users after they log in. Is it possible to use hook_user_login() to make the redirection? How do I add the parameter for the redirection?
0
votes
1answer
42 views

AJAX form doesn't use ajax until cache clear

I'm defining an ajax form in my custom module (#ajax for submit). It is shown in custom block. But it works fine only on cache clear (on Drupal clear all caches or on ctrl+r in chrome). If I just use ...
4
votes
2answers
846 views

View for Entity Reference reverse, backwards forwards

The need is to present in a landing page a view of all pages that do reference to this landing page. So, this view will search in other content type, to find in a reference field that contain same id. ...
0
votes
0answers
24 views

Open meta tag tab by default

Is it possible to open the meta tag tab by default on each of my content (pages and articles) only through admin section ? To have this when I create/edit a content:
0
votes
1answer
25 views

How to pass multiple values in setArguments() and render view? [duplicate]

I want to pass multiple values in setArguments() and render view. I'm using below code but it's showing only 1 value instead of multiple. public function _ajax_generate_request_view(array $form, ...
1
vote
1answer
1k views

How do I delete files attached with media entity in drupal 8.4.2?

Background: drupal 8.4.2 custom media solution Issue I can not delete files permanently which created as media entity. Reproduce Created an image media entity. /admin/content/files claims status ...
0
votes
0answers
40 views

Block not showing in controller generated tables Drupal 8

I have created a custom module that should show my custom block above the controller generated table. The block shows in other pages but not in the page where it is supposed to show. Found out that it ...
3
votes
4answers
4k views

Modal Dialog not Opening when not authenticated or in incognito mode

Hi i am using Drupal 8 to render a modal popup on clicking a link. However when i am connected as admin the popup render well but as soon as i logout or choose to be incognito mode of the browser the ...
3
votes
2answers
685 views

Where is the Migrate UI page?

In Drupal 8.2.x there is the new migration UI tool. I've enabled it, but I can't find any link going to any UI page. Back in Drupal 7 when you enabled a module, it would have a configure link next to ...
0
votes
1answer
815 views

Changing '#view_mode' in content type's render array

I have a content type in Drupal 8 project that has image, name, info and body field as a default display, and image,name and information as a teaser display. I am able to display this content type ...
0
votes
1answer
380 views

Unable to fetch paragraph's multi field values inside node twig

I have a content type as "worker". I have a Paragraph "test" and I am referencing "test" paragraph inside my content type "worker". This allows multiple values to be saved. How can I get the multiple ...
0
votes
1answer
22 views

Views block won't appear on Specific Language pages

D8 - I'm hoping someone knows a hidden corner of Drupal I'm not aware of to fix this problem. I have a View that has a filter to show entries based on chosen language ( Configure filter criterion: ...
0
votes
0answers
12 views

How to render two paragraph fields behind each other in a slick slider?

In my node content type I have two fields which containing different kinds of paragraph types. (How) is it possible to render the paragraphs of the two node fields in one slick slider behind each ...
0
votes
0answers
26 views

How can I programmatically alter the item element markup?

I want to change the item element markup value with some processed text.which hook need to edit the html markup element. currently i found that there is no way to edit the markup element because it is ...
1
vote
1answer
613 views

Kint breaks in template and doesn't allow me to view anything

in my template I am trying to view the contents of Childen in a form template. <form{{ attributes }}> {{ kint(children) }} </form> However, the result I get is a useless broken kint ...
-2
votes
0answers
23 views

Create a tree view menu

I have to create a sidebar treeview menu for my website. It needs to have a parent-children relationship that would have to be until 5 levels. At the top, it should have a button at the utmost left to ...
0
votes
0answers
18 views

Revisions not working

I cannot figure out why revisions have stopped working. I have double checked my configuration, and all the correct modules are installed. The checkbox in the content type is checked, the checkbox ...
1
vote
1answer
581 views

How to set and inherit variables within different twig templates?

I'd like to set a variable in my node.html.twig template: {% set title = label %} {{ content }} The content consists of one field visible only, which has it's own template: file-link.html.twig How ...
1
vote
1answer
366 views

Cannot access responsive image sources from Twig

In Twig I am unable to retrieve the file source for each responsive image style on a ImageItem. How should I be getting this information?
0
votes
1answer
816 views

How to display form element and label inline

This must be simple, but I cannot find the answer. I want the label and the textfield on the same line. I tried this: 'odt-filter' => array( '#type' => 'textfield', '#title' => 'Filtra',...
0
votes
0answers
25 views

Why doesn't Synchronize - Export - Full archive work in my production site?

On my production site, when I go to Synchronize - Export - Full archive (i.e. http://mysite/admin/config/development/configuration/full/export), I get a blank web page, nothing in my temp folder and ...
1
vote
1answer
738 views

Create relationship betweeen content type and custom entity on specific field

I'm trying to create a two-way relationship between my custom entity (package_date) and a content type (package) - the relationship is between a specific field on package and package_date (i.e. it's ...
1
vote
1answer
370 views

How to use ckeditor layout on textfield input ? (Drupal 8)

Hello Drupal masters ! I have a content type with a "Text (formated)" field. When I try to write something in it, all my HTML is ok. But I want to use the buttons of ckEditor to make it more "user ...
-1
votes
0answers
19 views

How to show Organization Chart in Views Simple Chart?

I want to show my Organization Chart in drupal 8 and i found the views_simplechart can do it in https://www.drupal.org/project/views_simplechart there is some example (two pictures) how to show the ...
0
votes
0answers
22 views

How can I add an additional, custom profile to the checkout flow?

In Commerce 2 I have a custom Profile to collect additional contact information that may differ from the billing/payment profile information. I've created the new profile but cannot figure out how to ...
0
votes
1answer
757 views

How to use lazy_builder to load and replace content asynchronously

In my tests, I was able to make content be loaded asynchronous with function callback_function() { sleep(5); return ['#markup' => time()]; } ... $build['timestamp'] = [ '#lazy_builder' ...
0
votes
2answers
761 views

How can I rewrite the output of image field to become a div with this image as a background image?

I have a view to display a content that have an image field, and I need to display this image as a background image of a div so I can apply some CSS on it. what I tried to do is to rewrite the output ...
0
votes
1answer
26 views

Block not showing input fields

I have a block as part of my custom module, I was it to show 2 text boxes (Input & Output) and have a generate button. I cant get it to show the input boxes! It seems they are being stripped out ...
0
votes
1answer
620 views

How to convert Json data directly into xml - standardized way?

I'm having a Json: [{"S":"a","D":"b"},{"S":"s1","D":"m1"},{"S":"2","D":"3"},{"S":"4","D":"5"}] And I want it to convert into XML: <?xml version="1.0" encoding="ISO-8859-1"?> <Us> &...
0
votes
0answers
36 views

Render Image Programatically

I want to create a new image field output to make it work with my lazy load script. For this I want the output to look like: <img data-src="/sites/default/files/styles/lazy_load/image.jpg" src="/...
-1
votes
1answer
64 views

How can I access individual form elements for theming?

I have overridden the default user login form in Drupal 8 using a different template in my sub theme, but it isn't of much use because when I access it in twig template, all I can do is <form {{...
0
votes
1answer
694 views

“Page not found” on custom module

I did a custom module, but i can't see the page with the URL : Page not found. I can install the module and activiate, but i can't go on the page. This is the code : hello_world.hello_world: ...
1
vote
1answer
11k views

How do I fix a “The requested URL /user/login was not found on this server.” error?

I am currently migrating a Drupal 8 site from one cloud server to another. The servers are Ubuntu and CentOS (AWS EC2) respectively. After copying the files and exporting-importing the database, I am ...
0
votes
1answer
48 views

How is $form['#action'] encoded?

I have the following set up: Webform "my_webform" Entity type "activity" The "activity" entity type includes a webform reference field Activity ID 14 has some content and a reference to "my_webform" ...