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
23 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
29 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
24 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 [closed]

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
36 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
40 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
31 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
112 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
29 views

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

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
38 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
35 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 ...
0
votes
2answers
41 views

AJAX Views with filter as path component

I have a view of Commerce products of type Print. The product type Print has a reference on a Taxonomy called Category. I setup the Category field as an exposed filter (dropdown) for my View page. The ...
-4
votes
0answers
38 views

Best solution for a multi column mega menu in combination with bootstrap 4 [closed]

I am using Bootstrap 4 (not the Bootstrap theme but a custom setup) for my custom Drupal 8 theme. I have a Main menu with taxonomy categories and links. I need to divide those categories and it's (...
0
votes
1answer
29 views

Missing checkbox in Webforms settings

I ran the following command: $ composer require 'drupal/webform:5.4-beta1' Some of the components in the Extend section show updated version, while Webform (top one) still says 5.0-rc12. My ...
-2
votes
0answers
88 views

After migration website would not load for anonymous users

we have a drupal 8.7.6 that perfectly works fine when logged in as admin - all pages, functionalities work fine with good performance. When I tried to load the website as anonymous user - it keeps on ...
0
votes
0answers
35 views

Prepopulating composite webform field from data passed by POST

I need to POST a JSON to a URL with a webform on it and have the WebformHandler. This is the alterForm of my WebformHandlerBase subclass public function alterForm(array &$form, ...
0
votes
1answer
23 views

How to remove tags from display in form?

I have this form tempate <div class="a"> {{ form.card.a }} </div> <div class="a"> {{ form.card.b }} </div> and I want to to frame it with tag like this. <a href="...
0
votes
0answers
31 views

Class Dompdf() not found in custom module [on hold]

inside a custom module (custom form), I need to call the Dompdf() class. Here is my code: use Dompdf; // or use Dompdf\Dompdf; ...... class myclass.... public function buildPdf(array &$form, ...
1
vote
2answers
26 views

Default value for datetime field definition in content entity?

I have the following datetime field definition for my content entity: $fields['start_date'] = BaseFieldDefinition::create('datetime') ->setLabel(t('Start date')) ->setDescription(t('Start ...
-1
votes
0answers
13 views

Supported iDeal payment [closed]

Currently I am busy with a Drupal 8 website which will be used for e-learning purpose. The website will be for Dutch people with Dutch payment methods. The most important payment method here in The ...
1
vote
2answers
74 views

Change page title from Views preprocess function

I want to be able to change the main page title based on some value that I get in a views preprocess function. The View is displayed as a page. function MYTHEME_preprocess_views_view(&$variables)...
0
votes
0answers
20 views

Migrate taxonomy terms with lookup based on term name

I've imported a taxonomy with names into Drupal 8 fine. When I come to reference them in another migration the data only has the taxonomy name not an id. I currently have: process: title: 'Name' ...
1
vote
0answers
21 views

How do I display only a field? [closed]

I have a view which displays nodes of content type "news", which has two fields: f_one and f_two. What I want is: If f_one has content and f_two is empty, display only f_one If f_one is empty and ...
0
votes
1answer
10 views

Hide a list of blocks from Panelizer in-place editor (IPE)

I have a list of blocks that shouldn't be added via panelizer IPE popup under manage content. Is there any way to remove them from the list?
1
vote
1answer
24 views

How to use term edit page instead of view page?

On the terms list page, each term is linked to the view page (i.e. term/[tid]). As I don't have any details in the view page, I would like to link it to edit page. (.i.e term/[tid]/edit). How to ...
0
votes
0answers
13 views

How set a custom redirect confirmation path to webform programmatically

i'm trying to set a custom URL to redirect when the process of webform submit is completed without use the confirmation settings of webform. I Actually try with this: $entity->setSettingOverride('...
0
votes
1answer
47 views

Custom entity custom cache tags

I've created a custom entity and having trouble providing proper caching. When you create custom entity, by default it has only one cache tag entity_type:id. Problem is, I need to display same ...
0
votes
1answer
23 views

How can I filter entity titles in an autocomplete form and use the title as context for a View page?

I am trying to provide a form with a single autocomplete text field on the front page. The user can search for a title of the product (commerce_product), and when they submit, they're redirected to a ...
0
votes
1answer
19 views

Trying to filter a View based on a Paragraph entity reference

I want to filter a View by content type 'Article' and only content that is referenced to a specific node id 123. I have a Paragraph in Article content type. Inside the Paragraph is an entity reference ...
1
vote
0answers
25 views

What is a proper way of uninstalling field types provided by the module?

I have a field type named mymodule_field_type, and we are installing it with config/install/field.storage.node.mymodule.yml, which has the following content: langcode: en status: true ...
0
votes
1answer
17 views

Installing in a sub-folder of Angular

I have an Angular 2+ application running. I would like to install Drupal in a subfolder and have my Angular application to iframe the contents. Ideal Folder Structure: / - Angular /...
4
votes
1answer
61 views

How to deal with Bubbleable Metadata when there's no rendering context and no render array

Since Drupal 8.0.0-beta12 "all rendering must happen in a render context", as stated by this change record. This is to avoid bubbleable metadata lost. So far, so good. Let's say I'm implementing a ...
1
vote
1answer
25 views

Image uploads seem to be timing out

I hate asking a vague question like this but I'm really at loss as to my current problem. I'm setting up a new site and image uploads fail on my production site (both in custom and content type forms)....
0
votes
3answers
33 views

Counting each filter near its label

I've created a view in order to override the default search page form and results, then I've exposed the content type in order to have the possibility to filter by that, all now is working How can I ...
-3
votes
2answers
36 views

Upload file to S3 directly instead of using temporary storage

I have one file uploading form in Drupal 8 where I am uploading 3 different assets and they might be around 2gb or more in size. I have the s3fs module enabled and configured properly, but (due to ...
0
votes
1answer
76 views

The site crash when add a server

I'm trying to use Search_api_solr and search-api. I install the required modules and run the solr server and create a core. But when I'm trying to add a server to my drupal 8 site, an error appears ...
0
votes
0answers
18 views

Enabled Text Compression

We would like to enable text compression for our sight. We tried to look, but could not find any contrib modules that do this. We are already using advagg to compress the JS/CSS files. It does not ...
1
vote
1answer
23 views

Serialization: define a normalizer just for a specific use case

I try to create a custom API with custom endpoints where API users can receive entity data from our page. We want to have flat arrays for most of the fields and some additional custom data added so I ...
0
votes
0answers
18 views

Repointing a site a subdomain

I have created a new Drupal 8 site in a subdomain of an existing Drupal 6 site. The new site sits in public_html/dev - so the url for it is dev.mydomain.com. What is the best way to redirect ...
0
votes
0answers
8 views

Changing field value with date expiry using Business Rules

I'm trying to set up a simple reservation functionality and I wanted to use Business Rules to change the value of a field (available/booked) when the end date of another field passes "today". I tried ...