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
-3
votes
0answers
26 views

Alternative to FormBase to create D8 form [on hold]

Is it possible to use Symfony to create Drupal 8 form api compliant forms? My project needs to generate multipage forms dynamically. While I have successfully created a class which extends FormBase ...
0
votes
1answer
15 views

Drupal 8 og:image and og:image:url

I'm working on a website with Drupal 8 and the metatags module. I need to not output the metatag og:image:url if the og:image exists. If it possible to do using the module? If not I would have to ...
0
votes
1answer
28 views

How to setup drupal multisite in cpanel?

I want to setup a drupal multisite but without success. I have followed this tutorials (and search in drupal answer): - 2 minutes multisite - 5 minutes multisite - Setting up a multisite I have tried ...
-2
votes
0answers
12 views

Documentation on Message, Message Notify and Subscribe implementation [closed]

I am looking for documentation on how to integrate these module in Drupal. At present, it has few documentation only on architecture and how it works.
0
votes
0answers
15 views

Modules available for search [closed]

For the website that I have been developing, I have to create a search function that would conduct a page by page search of the website. It should not search the entire website like the core search ...
0
votes
0answers
7 views

How do I make a popup video using a video embed field? [on hold]

I have installed video embed field and magnific popup module ,i have trouble achieving popup video on click. Moreover once i select the display format to magnific popup in manage display, thumbnail of ...
0
votes
1answer
34 views

Should the Update Manager module be uninstalled when installing with Composer?

Drupal 8 is installed with Composer and I use it to update. So I uninstalled the Update Manager module provided by the core. Now when I go to /admin/reports/status, I have the following warning. ...
0
votes
0answers
36 views

Drupal Queue Item Id in ProcessItem Function [closed]

I developed one custom module which will display a list of entries from my custom table. Now i need to add two buttons on top of the grid as "Clear out Unpublished" , "Clear All" Clear out ...
0
votes
1answer
22 views

Javascript not working in body field. Using Full HTML

I have created a basic page. Inserted the following tripAdvisor your rating widget code in that which contains some javascript. Used Full HTML formatting. But instead of displaying the rating widget ...
0
votes
1answer
19 views

Adding an extra class to the last element of the navigation/tree menu

For one of my projects, I have to create a tree menu, with parents and children, that would be used to navigate through the website. The parents are collapsible. Below is the twig file that I am using ...
1
vote
0answers
38 views

Filter a view displaying nodes of one type using a user entity reference field on that node

I have a vocabulary (Countries) listing all countries. I added an entity reference field to the User entity (Nationality) referencing the Countries vocabulary. To the Article content type, I added: ...
0
votes
0answers
23 views

How to add User authentication to my module? [closed]

I want to avoid setting up and handling custom authentication for my custom REST API module because I have already setup SSO to the API server for Drupal users. The question: how do I tie that login ...
0
votes
0answers
24 views

GuzzleHttp\Exception\BadResponseException: Redirect URI, /restrict_ip/access_denied [closed]

I installed Restrict IP module in a Drupal 8 site, and added a list of IPs through which a service can be accessed. When I tried to access the service I saw the following error in the logs. ...
0
votes
0answers
17 views

How do I migrate a comment together the node to which it is associated? [closed]

We are looking to migrate some content into Drupal 8 site. There are several modules that allow to import nodes via CSV, but nothing that would include comments. Data is getting importent from D8 ...
0
votes
0answers
17 views

How get Views data relationship values in one multivalues field?

Sorry for my english, but I struggle with this matter for too long now, and I want to know the proper way to display relationship datas in Views. Assume you have a relationship between data that you ...
0
votes
2answers
74 views

Paginated form with ajax checkboxes throws “The specified #ajax callback is empty or not callable”

Using Drupal 8.7.7 I have a form which consists of a paginated table of users. Each user row has a checkbox element in the form with an ajax event attached. This is essentially to allow me to store ...
1
vote
1answer
29 views

How does routing order / matches effect performance?

I have all the following GET routes defined in my_module.routing.yml: my_module.members_uid: path: 'users/{user}' my_module.members_uid_gid: path: 'users/{user}/group/{group}' my_module.user....
0
votes
1answer
15 views

Image Upload Issues Same Image Different File Name Always Receive This Error

We are currently working on fine tuning and updating the dev backend of our CMS we're rolling out for a new site. I was familiarizing myself with the new system and uploaded some images in error. I ...
-2
votes
0answers
25 views

Node edit form not saving the path alias

I am working on Drupal 8 node edit form. Logged in a Super User (Administrator with all permissions.) Drupal Version: 8.7.4. The form has a field: URL alias. Any value entered in it is not saving. ...
0
votes
0answers
23 views

How to display '&' as it is instead of HTML 'amp;' in search autocomplete?

I am coming across a strange issue in using Search autocomplete. When I am searching for a word which has & symbol, in autocomplete its showing up as &. In backend views of Node ...
1
vote
0answers
20 views

Remote File Upload with URL Parameters

I'm currently using a digital asset management tool that allows us to host images as a CDN. The DAM allows us to crop and position the image using URL parameters (example: https://embed.widencdn.net/...
0
votes
0answers
27 views

How to programmatically check in module if multisite is used?

Is it possible to easily check with code if a site is running as multisite instance?
0
votes
1answer
51 views

How do I create and apply a configuration schema for an existing custom module?

I have a custom module, already running for a longer while, but I did not take into account that the configuration would have to support translation. I have had no config/schema/module_name.schema.yml ...
0
votes
0answers
47 views

Caching based on roles

How would it be possible to unset the "Cache-Control: must-revalidate, no-cache, private" that drupal adds for logged in users, for a specific role? I want a specific role, to follow the non-...
0
votes
1answer
28 views

Is it possible to invoke cron within a hook or route class?

I'm using the Deploy suite, which requires cron to be run after a deployment is created. However, when I try to execute \Drupal\Core\Cron::run(); from hook_entity_create() or from a route Class, it ...
0
votes
0answers
21 views

How do I allow administrator users to make offsite payment for customers?

When I want to create an order and complete payment on behalf of customer as an admin, I have all the flexibility a customer has, except, now I don't have option to any offsite payment gateway. The ...
0
votes
0answers
17 views

How to recognise the requested domain while using Domain Access with GraphQL module?

With the classic Drupal approach, the Domain Access module recognises the requested domain via the HTTP request or the $_SERVER['HTTP_HOST'] variable, thanks to the DomainNegotiator::...
2
votes
1answer
23 views

How can I theme the markup for the labels in a set of radio options on a specific form item?

Given this form item defined in a custom module; $form['my_items'] = [ '#type' => 'radios', '#title' => $this->t('Items'), '#options' => $optionsSet // array of options pulled from ...
0
votes
0answers
22 views

Programmatically add field collection items to a node [duplicate]

I have a node with a Field Collection [field_videos]. I would like to be able to progrmatically load a node and add field collection items. The field collection contains the following fields: ...
0
votes
1answer
37 views

Queue Implementation for third party api

In my website I have a form and which submits data to third party website. that api is available some time and not available some time. I need to create a queue mechanism to insert failed api calls ...
-1
votes
0answers
30 views

Is there any difference between file_move() and file_copy()? [closed]

Is there any difference in using file_move() or file_copy() in Drupal 8, leaving out the fact the first first moves files and the second copies them? Is the file status (permanent or temporary) ...
0
votes
0answers
21 views

Group CSS and JS files for aggregation

The grouping for CSS-JS Aggregation is done on what basis ? For example, there are files A.js, B.js, C.js, D.js and E.js. If I want A.js, C.js in an aggregated file called X.js and B.js, D.js and E....
-1
votes
1answer
56 views

How to add separate class to menu link using hook

I want to add custom classes to the anchor tag in the main menu. I implemented hook_preprocess_menu(), but it assigned the classes to the <ul> tag and I want to add the classes to the <a> ...
1
vote
2answers
96 views

Why can I choose the widget for grouped filters, but not exposed?

When I create a view (block) and create an exposed filter I have the choice of a Filter type to expose between Single filter and Grouped filters If I choose the Grouped filters I am presented with ...
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 == '...
0
votes
1answer
37 views

How should jcarousel be installed and configured?

To achieve a slider with 5 slides in sight and sliding 1 at a time, I thought https://www.drupal.org/project/views_slideshow_jcarousel would be a good choice. Also, because I already use ...
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
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?
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 ...
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 ...
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:
-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 ...
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 ...
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, ...
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 ...
-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 ...