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
0answers
5 views

how to remove taxonomy vocabulary via database

To manually remove a taxonomy vocabulary in the database, what tables/columns etcetera do I need to delete or modify? I have a "ghost" taxonomy - it shows up in the list, but doesn't exist anywhere ...
0
votes
0answers
7 views

Custom Commerce Payment Gateway - Order Information Form

I have followed the documentation over at https://docs.drupalcommerce.org/commerce2/developer-guide/payments/create-payment-gateway/getting-started#step-3-create-a-payment-gateway-plugin My ...
1
vote
1answer
21 views

Composer update still shows an older version of a module

Updating dependencies according to these instructions offers an older version of the module. Composer.json file has the package required as "drupal/h5p": "^1.0@RC", and it used to update just fine. It ...
-3
votes
0answers
10 views

How to create a slide up menu on mouse click [on hold]

Does anybody knows a method or a Drupal module helps in achieving the Slide Up Menu shown in the above image for a online website: 1) The below image show that there is no visible menu to perform an ...
1
vote
1answer
13 views

Patch method sample code REST API

I am working on web services in drupal. I have created a sample module for get method to expose the data using web services. I have not found any sample code for the patch method. code for get method: ...
-1
votes
0answers
11 views

Theme suggestion for commerce-cart-form input--submit buttons [duplicate]

I have a Drupal Commerce cart view (overview of the cart). In the form 3 buttons are rendered. delete-order-item button update list button checkout button I want to create 3 specific theme ...
0
votes
0answers
14 views

Assign a particular permission to a specific user role while installing the module [duplicate]

I have custom permission called Access vm content list in my module's module_name.routing.yml. And I listed the same in the module_name.permission.yml to get it managed via admin panel. While ...
1
vote
0answers
24 views

Webform module loosing language for referenced options

First I have content type "Quiz option" which is translatable. Then I have a view that returns Entity references of that type. For language option I selected "Content language of view row" and also ...
0
votes
0answers
19 views

How to show date as “XX ago” in comments/node/taxonomy/blocks? [duplicate]

This code works for comments but I need to display the date in two digits (XX minutes, XX hours, X year) not as "XX hours XX minutes" for example. And I need to apply this format for the rest of the ...
-4
votes
0answers
33 views

Show different item each render [on hold]

I have a Drupal 8 view that has several items in it, but I've configured it to show just one. What I want to do now is to iterate through the items on each page render, so each item get's equal ...
0
votes
0answers
11 views

Overriding the User entity list_builder handler

I'm trying to override the User entity list_builder handler to add another column to the table and implement some JavaScript search functionality. The code I'm using is below which is in my modules ...
1
vote
1answer
29 views

Why ajax button calls submitForm?

I have no problems with using Ajax in every form element other then button. When I'm clicking this button '#type' => 'submit', '#ajax' => [ 'callback' => '::ajax_function', '...
0
votes
2answers
19 views

Cloning nodes between multisite instances with separate databases

I'm working on a Drupal 8.6 multisite and my client wants to be able to duplicate content between many of these sites. The codebase of the websites is the same, but each of them uses a different ...
0
votes
1answer
15 views

Difficulty with checkbox boolean feature [on hold]

Our stakeholders asked for a feature where they can "pin" blog posts (basically the "sticky" feature, but I'll use the term "pin" and "pinned" in this question), where certain posts that they select ...
-3
votes
0answers
24 views

How does accessibility compliance in Backdrop CMS compare? [on hold]

One of the benefits of Drupal 8 was to enhance compliance with Section 508 accessibility requirements. To what extent does Backdrop match Drupal 8 regarding those improvements? Do those ...
0
votes
0answers
13 views

How to change where the sqlite database is generated when running tests?

When running tests, I have some .sqlite files and tmp files created in my project root while the test is running. This causes my IDE to go crazy. Is there a way to tell Drupal in phpunit.xml to store ...
0
votes
1answer
25 views

UTF-8 encoding when creating nodes (from mails)

I'm making a customized version of the Mailhandler module (based on inMail), which has a node creation function: protected function createNode(MimeMessageInterface $message, DefaultAnalyzerResult $...
-2
votes
0answers
31 views

Calendar/datepicker popup not working on safari

Below is the date type form field I have in some form which renders on chrome correctly. $form['date']['air_date'] = array ( '#type' => 'date', '#title' => t('Air Date:'), '#required' =&...
0
votes
1answer
36 views

Show rendered node in jQuery modal through JSON

Whenever a link has a specific class I want to show it as a jQuery modal. I have added the neccesarry data attributes to the link in order to be able to use it as a modal. I have also created a route ...
0
votes
0answers
12 views

Views exposed date filter range format

I have a view with an exposed filter for a date range. I use jquery ui datepicker to select dates. It works good and I can select dates in spanish format (dd/mm/yyyy). But when I apply the filter, It ...
-2
votes
1answer
44 views

How can I change the taxonomy term title?

Simple as that. I want to change the H1 tag from taxonomy views to something like "Articles from %term" to make it more user friendly and not redundant (breadcrumbs shows the term alone). I couldn't ...
0
votes
0answers
20 views

Can't Install search_api_solr and search_api [on hold]

I'm trying to install search-api-solr and search-api. I try first using composer and when I check composer.json they listed in the file. but drupal installation page not affected so I end to install ...
-2
votes
0answers
17 views

The Commerce Node Checkout module isn't ported to Drupal 8. Has anyone found another solution? [on hold]

I basically need the functionality of Commerce Node Checkout https://www.drupal.org/project/commerce_node_checkout in Drupal 8. Has anyone been successful selling "Nodes" with the commerce module ...
0
votes
1answer
19 views

How to pass variables to template to use it in email?

I've written a "hook_mail()" to send html emails. I have everything but I would like to use a custom template. I use a "hook_theme" as well, but my question is how can I pass variables to use it in my ...
0
votes
1answer
35 views

Alter existing route's output formats?

I want to alter the entity.node.canonical route so that when it is accessed using ?_format=json it will return the rendered node in JSON. So far I have created a RouteSubscriber that alters the route ...
0
votes
0answers
19 views

How to reference webform field option?

So I have webform module installed and I created a webform. Webform has an choice field (drop-down). Let's say you can select one of 3 options: "one", "two", "three". I need a way to add (editable) ...
-1
votes
0answers
16 views

How can I add a sitewide proxy to the HTTP client service?

On a particular environment, all the external requests via Drupal's HTTP client (http_client service) should go through the proxy. However, there is no option to set proxy details on each environment ...
0
votes
0answers
21 views

How can I override the form-element-label.html.twig template?

In a view, I have checkboxes displayed using the better-exposed filter. Ajax setting is true. Currently, there is no template suggestion for overriding form-element-label.html.twig. Somehow by adding ...
0
votes
0answers
46 views

Page title not being rendered after page refresh (possible cache issue)

This is the problem at hand: the first time I access a page after a cache rebuild, the title of said page is displayed correctly. But when I refresh (or access it later after navigating other pages) ...
0
votes
0answers
21 views

How to get the values of web form remote post handler?

i have created a web form handler ie. Remote post Handler. and i have gave one URL for posting the submitted data. How to access those submitted values in that particular page. How to GET ...
0
votes
0answers
26 views

Import a node with paragraphs [on hold]

I would like to import node with multiple paragraphs, but I can't make the Feeds module work with paragraphs. This is a sample of XML data that needs to be uploaded. <test-feed> <...
0
votes
0answers
35 views

Caching user profile image? [duplicate]

If I log in as User 1, i see user 1's profile picture. If I log in as User 2, I see user 2's profile picture. As expected. But after browsing a bit, User 2 would suddenly see User 1's profile picture. ...
3
votes
0answers
46 views

How to achieve layout nesting in layout builder?

We have a content type (Page) and a vocabulary (Sections). The content type has a reference field to the vocabulary, and the vocabulary has a reference to a menu. Also, we are interested in being able ...
2
votes
1answer
22 views

Migrating csv data as array into multi-field

How do I migrate a sequence of data into a multi-value field? I am learning D8 migration and working on a large CSV of historic census data from around the world. Example below: id,Country Name,...
0
votes
0answers
18 views

jsDelivr CDN provider does not work using bootstrap for drupal [on hold]

So I'm trying to create a drupal theme with bootstrap. However my boostrap does not get loaded due to malfunctions of jsDelivr (I think). PS: Does anyone know some good Drupal guides/books? Because I ...
0
votes
0answers
35 views

How to remove or fix Missing bundle entity that causes error

Working on a new site, and I have a "regions" taxonomy vocabulary that has mysteriously disappeared, even though it shows in the list of taxonomies. If I try to view, edit or delete the taxonomy by ...
1
vote
1answer
48 views

How to write test(s) with specific config to test custom access checks?

I have built a custom module that alters some of the User routes (view, edit, delete) to do 3 things: Forbid account editing, except a user who has 'administer users' permission Forbid account ...
0
votes
0answers
19 views

Follow symlinks inside of default/files

I am running Drupal 8.7.6. The default/files directory is a symlinked to a read only mount (/mnt/files_ro). Drupal needs to write inside a few folders as it aggregates and caches assets, so I created ...
0
votes
2answers
39 views

Duplicate content between multi-sites

I'm working on a feature of a Drupal 8 multisite with separated databases for each site trying to implement the following requisite. When posting news to the main site (all the other sites are ...
1
vote
0answers
26 views

Change field type for custom entity (from integer to decimal) with existing data

Yes I have seen previous answers about that, but I'm looking for an new answer : That does not use SQL request That does not use deprecated function like db_change_field() maybe that uses the new ...
2
votes
0answers
57 views

Does the structure of the module's src folder matter? [on hold]

I've read about the Basic Structure guide to building a Drupal 8 module. It's great that it outlines the basic files needed to get a module up and running. Where it falls short is the contents of the ...
0
votes
0answers
21 views

How can I add fields to a custom content type

I am using the following code to set create a field programmtically and I am trying to set the cardinality as unlimited. But I am getting the error and I cannot add any values. Symfony\Component\...
4
votes
1answer
108 views

How can I have a custom module checked for deprecated functions?

I created a custom module in Drupal 8 for a specific purpose. How can I find out if it contains any deprecated functions?
-2
votes
0answers
28 views

How do I create a menu item from view results [on hold]

My organization has several Departments. Some of these Departments have websites. Some do not. I have a Department Content Type. These Departments have an optional website field. I have a view that ...
0
votes
1answer
37 views

How to Give abilty to filter content by geography, separate from language?

I'm not sure if this is feasible, or how to go about it. I want a dropdown (and use IP detection) to provide users with content based on Region - Not Language. Because we will Also be using the normal ...
1
vote
0answers
34 views

Can I alter the behaviour of a core function?

To make content management easier, for a large website we have allowed the content administrators to put a pipe in the title of a piece of content. Anything before the pipe is ignored. Is there a way ...
0
votes
1answer
23 views

How to update route cache when saving an entity?

I have added a custom access check to the /user/{user} route: class RouteSubscriber extends RouteSubscriberBase { /** * {@inheritdoc} */ protected function alterRoutes(RouteCollection $...
0
votes
1answer
28 views

Removing entity queue entries from a view

I have a list of 100 projects. I have set 10 projects as featured projects using Entity Queue module. I have a projects page that shows has two views: First view: 10 projects from entity queue ...
0
votes
0answers
12 views

Can't add sub tab local tasks to admin/content/my_entity

I have a custom content entity list which has its own tab into admin/content/my_entity. The content of this tab is generated by using EntityListBuilder class. Actually, I created it with the drupal ...
0
votes
1answer
38 views

How to discover the currently active twig template

I need to find out the currently active Twig template from within my module preprocess function. function mymodule_preprocess_field(&$variables, $hook) { // How do i retrieve the currently ...