Questions tagged [8]

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

Filter by
Sorted by
Tagged with
-1
votes
0answers
30 views

Styling webform

I am new with drupal 8 and have started with some content and a webform. I have managed to put the webform in a page content, but it doesn´t look good. I want the titles above the form fields, but it´...
0
votes
0answers
38 views

Event Subscriber Response Mismatch - Content Switch

I've got an event subscriber that checks on the entity being requested/returned - and under certain conditions I'd like it to return a different page as a 404. I was thinking about extending ...
1
vote
1answer
17 views

How to get one time URL when we are writing hook_mail_alter?

My Question is already present here but the previously given answer for my question can applied to Drupal 7 and I can not use the same solution in Drupal 8. I hope it is okay not put the same ...
0
votes
0answers
13 views

Views field showing raw HTML rather than processed

I have a view set to display fields. One of the fields is a long text field with selectable text inputs. When displaying this on the front-end, regardless of what is selected as formatter (trimmed/...
1
vote
1answer
35 views

How to test an alter hook in your .module with ModuleHandler service?

I have setup a kernel test to test a function in my module: /** * Implements hook_link_alter(). */ function mymodule_link_alter(&$variables) { // ... code } In my test, I tried: $variables =...
0
votes
0answers
18 views

Get list of aggregated CSS and JS files

I am looking for an option to get the list of URLS of aggregated CSS and JS files programmatically in Drupal 8 before the page gets rendered. Is there any hint or something I should look at?
0
votes
1answer
24 views

How do I programmatically create a file and write it in the private:// folder?

How do I programmatically create a text file and write to it in the private:// folder in Drupal 8.8? I found some examples, but all of them use deprecated functions and they don't work. Here what I ...
0
votes
0answers
18 views

Layout Builder and node edit/creation forms

In Drupal 8.8.x, is it possible to use Layout Builder to manipulate the layout of admin pages, especially node edit/creation forms? Based on Googling and my experimentation, I suspect not. I figure I'...
0
votes
0answers
40 views

How to make EventSubscriber run on every page load? [duplicate]

Tripped up on how to make my EventSubscriber code run on every page load. In my src/EventSubscriber/RedirectAnonymousSubscriber.php file here's my code: <?php namespace Drupal\mymodule\...
1
vote
1answer
23 views

How to get the Published or Archived revision of a node

I'm trying to compare some field values from the edit form of a node to the published/archived field values. However I'm running to an issue where when im trying to load the Node object using Drupal::...
0
votes
1answer
18 views

Taxonomy term parent widget alternative

I have a huge hierarchical vocabulary of terms and adding a new child to a specific term can be hard using the default multi-value select list widget. Can I use an autocomplete widget or -better- an ...
0
votes
0answers
21 views

Migrate entity reference fields attached to a node or user entity

I'm trying to migrate content from drupal 7 to existing drupal 8 website. I created a custom module with configs to make custom migration. I have an entity reference field in drupal 7 referenced to ...
0
votes
0answers
33 views

Behat config on multisite

I have a drupal8 multisite with no default site settings. So my folder structure looks like: sites/Asite/settings.php sites/Bsite/settings.php With a separate database connection in them and none in ...
0
votes
1answer
20 views

How to change the condition operator in the search api query?

I have a date field facet filter on my search api views page. When I select a date in the filter, the search api display those results which has that date value selected in the date field. I want to ...
0
votes
0answers
23 views

site redirecting to core/install.php after migration

I have migrated my site to different server and I am redirected to install.php page. Here is the steps I have done: zip whole site and extract it in new server. export database and import it to new ...
-1
votes
0answers
23 views

Migrate User images from external database

I want to migrate all user images while migrating users from an external table. When I am going to migrate 'users' its showing Migration users did not meet the requirements. Missing migrations ...
0
votes
0answers
16 views

Translated page does not show new paragraphs(components) that are added to the original language node (Drupal 8 core translation module)

I've translated pages with Drupal's translation module. The issue that I'm having is that if you add new paragraphs(components) to the original language node, the translated page does not inherit ...
0
votes
1answer
22 views

Hide/remove js-view-dom-id in just one specific view

I found, that the div with the id "js-view-dom-id" comes from views-view.html.twig. As I want to render one view output without any of Drupals HTML markup, I already hunted down the contextual links, ...
0
votes
1answer
33 views

How to match a Drupal path in Apache config

My D8 site uses the usual convention in .htaccess to rewrite non-file requests to index.php: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/...
0
votes
1answer
72 views

Getting Error : “You must declare ”ids“ as a unique array of fields in your source settings.” while trying to migrate for paragraph in Drupal 8

I have created a yml configuration for migration from CSV source into drupal using composer. After running the "drush migrate:import mbe_book_paragharphs", I am getting the error as You must declare "...
-3
votes
1answer
19 views

How to display a date facet in a date popup/picker?

I have a date range field in my content type. Is there any way to display a date popup/picker facet on my search page. Any workaround? through facet api, javascript etc? Because I have searched all ...
-2
votes
1answer
27 views

Can we get the title by node ID in a template file?

Is it possible to retrieve the title by node ID, based on the interface language. I found drupal_url('/node/101', {absolute: true}). I wish to have a similar function that returns a title passing a ...
0
votes
0answers
16 views

Drupal 8 Content filter return no results if content type is numeric

I am working in Drupal 8.8.1. I have several content types that are labeled with the year. Although these content types appear in every list of content types, trying to filter on that content type ...
0
votes
0answers
10 views

Email Status Report

Does drupal 8 have a way to email the Status Report like how Available updates has? I would like this report to be emailed weekly but there doesn't seem to be a setting for emailing the report.
-1
votes
1answer
43 views

Redirecting Anonymous Users to external URL on Drupal 8 site

Still pretty new to Drupal, but I am attempting to create a custom module that redirects anonymous/unauthenticated users away from the site. This site is only supposed to be used by admin's so in ...
0
votes
0answers
23 views

prevent webform reloading the page on submit

I have a web form block displayed in a custom modal, Is it possible to submit the form without refreshing the page, followed by a message saying the webform has successfully been submitted? I've set ...
0
votes
1answer
45 views

How to route dynamic routes to a single node while keeping the urls?

I have a node node/1 with the path alias /path. What I want is for /path/* to always behave like you went to /path, but not change the url. So going to /path/test?something=1 should behave identically ...
0
votes
0answers
23 views

How to add autocomplete tag in Webforms module

According to the accessibility guidelines fields like email or name need to have an autocomplete tag like, autocomplete=on. I found the option to turn autocomplete on and off in webforms in the ...
-4
votes
1answer
34 views

Issues while Updating drupa/slack to 8.x-1.2

The site I am working on is using drupal/slack ^1.2 in composer.json file but the module present in the instance and that in composer.lock is the dev version. I ran a lando composer require drupal/...
0
votes
0answers
18 views

Track/Log changes to permissions

I was trying to find contributed module for Drupal 8 to track practically everything users do on site. I was able to find some good modules like Events Log Track but it only works for entities (...
0
votes
0answers
23 views

How to display date range facet filter in Drupal 8?

I am using a date range field in my content type. I have installed search api and facets modules. In the node index, I have selected the Date range type for the date field. I have created a facet ...
-3
votes
1answer
100 views

How to import a million of nodes? Very slow import

I've been dealing with this problem for several days. I need to import around 1,600,000 nodes (one time). Everything is set correctly, but the speed is horrible. Both on the shared server and on the ...
0
votes
1answer
29 views

Composer cannot find drupal/commerce in a specific module

I'm attempting to update the dependencies of a specific module in my site. I've downloaded the module with git and navigated inside. If I run composer validate it says ./composer.json is valid. ...
-2
votes
0answers
41 views

Redirecting Unauthenticated Users

Pretty new to Drupal, mostly code in Javascript. How would I go about redirecting an unauthenticated user away from my site to a completely different site. Have to create a whole custom module?
0
votes
0answers
28 views

How to add validations before loading a child form with Inline Entity Form?

Let's assume the following screenshot: When I click on "Add new Company", I'd like to execute some validation before loading the form. I'd like to check if there is already one Company inline entity ...
0
votes
1answer
28 views

Composite block from multiple other blocks + layout

I would like to create a block consisting of multiple other blocks, combined with a layout or some other kind of wrapper html. A typical example would be a footer with 4 columns containing a menu, ...
2
votes
2answers
243 views

Write complex access control in a reusable way

We deal with nodes representing humans with two important properties: mother and father. Your parents as well as your aunts and uncles should get extra permissions, like to see you in a certain view ...
-2
votes
0answers
19 views

How to set up the test account on the Worldpay module?

There are no instructions for setting up Drupal commerce 2 and the Worldpay module. https://www.drupal.org/project/commerce_worldpay I am trying to quickly set up a test account. The Worldpay ...
-1
votes
0answers
23 views

hook_options_list_alter for views

I can't use hook_options_list_alter on views. I'm sharing the same field among different content types. I can limit the options per content type on node page edit page with no problem, but for some ...
0
votes
1answer
35 views

How do I set group fields in pairs?

The code is taken from the "Form API examples" and supplemented. There must be a pair of first and last name fields. A button “Add more” should add a new pair of fields “name and surname” below the ...
-2
votes
0answers
35 views

How to display content type form inline in certain page [duplicate]

I have a content type named as products. I created a view page for the content type product and displayed list of products. Here I have add product link at the end of the link. So if i click add ...
0
votes
0answers
45 views

how to get translated content in twig [views.view.unformatted]?

I am trying to get translated node title in my custom views-view-unformatted twig file. Here is the way I am retrieving my node title in twig file <div class="col-md-6 title"> {% for row ...
0
votes
1answer
58 views

Redirect from within controller always goes to home page

I have a custom module named rsc. My Default 404 (not found) page is set to /page-not-found in Basic site settings. My rsc.routing.yml file contains rsc.pageNotFound: path: '/page-not-found' ...
-1
votes
0answers
18 views

Link another database via Feed Import

I would like to know the following: I have a database where the drupal is and another database that contains other information, which is in MS Access, where I linked your database in MYPHPAdmin. I don'...
-1
votes
0answers
39 views

All fields display disabled

For the second time now after months, I fund every field of every content type of my Drupal 8 website disabled. Such a nightmare when you go to node/add or node/NID/edit and the only field you have is ...
0
votes
0answers
34 views

How to create local task links for referenced entities on a node? [duplicate]

I have a content type, which has three reference fields to three different content types. I want to create secondary task links to those referenced entities. Let's say that I have a Product content ...
0
votes
0answers
22 views

Finding better solution for merge the multiple menu

I have merge two menu programmatically. I have tried with code which is listed below. After using this code it was slower my site and increase large amount of queries passed while every page load. I ...
0
votes
1answer
101 views

Creating commerce users programmatically

I need to import customer data from CSV files with billing and shipping data using Drupal 8.8 and Commerce 2. I want to create the customer with its address data programmatically, but i do not know ...
1
vote
1answer
47 views

Reinstall a patch with composer - update one module only

Can I update a patch without running composer update ? In other words: can I update one module only?
0
votes
0answers
28 views

How do I use URL redirect with token?

I am using url_redirect. I want to redirect users to /prize_page when they click on my account link /user/[current-user:uid]. It seems the [current-user:uid] token doesn't work. Is there any way ...

1 3 4 5 6 7 283