Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
25 views

Enabling custom content entity module throws error

While enabling my custom module that creates a custom content entity through Drush, I get the following error: [error] Drush command terminated abnormally due to an unrecoverable error. Error: ...
0
votes
1answer
24 views

How to limit access to vocabulary term by role?

We have two roles: Reviewer and Editor along with two content types: Basic and Article. We have a couple vocabulary terms and taxonomy fields on each content type. Currently only users with Administer ...
0
votes
0answers
17 views

Programmatically Alter Billing/Shipping Address form

I am using Drupal Commerce 2.11 and Drupal 8.6.9. I need to make a simple edit to the address forms in the checkout - changing the #empty_option of the "locality" select boxes. However, this is ...
0
votes
0answers
13 views

JSON API calls to multisites return error 503 service unavailable, but it works for my main site

I have a multisite D8 configuration running and I'm using jsonapi to retrieve content. When I retrieve content from my main site (in sites/default) it works perfectly. But when trying to retrieve ...
-2
votes
0answers
15 views

Calculations using referenced fields [on hold]

I'm asked to develop a site for a local cycling club. They would like to have a user section containing the following features. The rides calender, including date, dinstance, ...: no problem for that ...
0
votes
0answers
35 views

Select options limit

In the Webform module for Drupal 7 there was a "Select Options Limit" which allowed you to limit the number of times that selection could be selected. It worked perfectly for limiting the number of ...
0
votes
0answers
38 views

How to query the views field title in twig?

I am overriding the views-view-field.html.twig template file. Inside of the template I need to fetch the right translation of the field_title. Currently the file looks like following {{ output -}} ...
1
vote
1answer
42 views

Get node id from a grid view

I am new with D8 I have a view which lists some content about a specific content type. I made a plugin that permit to add a custom drop button for each view rows This button has to make some ...
0
votes
0answers
8 views

Acquia pipelines start execution failed [closed]

Acquia Pipelines start got failed in local due to below error. $ pipelines start -v Error output : * Could not resolve host: pipeline-api-production.pipeline.services.acquia.io * Closing connection ...
-2
votes
0answers
40 views

Cache for both anonymous and authenticated users

Both anon and auth users should see the content. The content is retrieved from a service. I am using both the API (to store the data results) and render tags. It seems that if i am anon, the data, ...
0
votes
0answers
22 views

How do I add the taxonomy terms that a user added to a node to the user's profile?

I want to have a filed on every user called "My interests". Is it possible to automatically populate this field with the taxonomy terms that the user adds to his/her nodes? So when a user creates ...
0
votes
1answer
8 views

How do I use a token to set the default value of a date field to the current date?

When I go to the build tab of the webform and click edit on the date element, I can find the default value setting under the advanced tab in the element editor. The help text says I can use tokens, ...
-1
votes
0answers
11 views

Entity Reference Media

I am trying to create a simple paragraph type that contains a entity reference field for media. The way it should work is that the user should be able to type in the image or the video that they would ...
0
votes
1answer
34 views

Is there a way to disable cache only for a single template file?

For my view I need to update my fields dynamically, for this reason I need to disable cache for views-view-field.html.twig, as it takes the parameter from a contextual filter. I send an argument from ...
0
votes
1answer
33 views

How do I get a contextual filter argument in a template file?

I am using contextual filters on the /path/langcode view, where langcode is a contextual filter. How can I get langcode in a template file?
0
votes
1answer
32 views

How do I create a field output URL?

For the multilingual Drupal 8 based website I have created a view with a list of nodes. On the top of the page I have implemented a custom block with a autocomplete textfield, the textfield returns a ...
-4
votes
0answers
27 views

Add javascript for dropdown and collapse [on hold]

I'm trying to add javascript to my theme (i begin). In this case, for a dropdown menu and for collapse. I tried the following code : (function ($, Drupal) { 'use strict'; ...
1
vote
3answers
52 views

Is it possible to make a “private” distribution not listed on Drupal.org?

For a customer we should do a bunch of sites build with Drupal. Multisite is not possible because of different hosting solutions. Would creating a custom distribution work out for that case? Is it ...
0
votes
0answers
20 views

Trigger a batch process via a rest endpoint and check on progress

I'm looking to see if it's possible to trigger and monitor a batch process via a REST endpoint (or similar) in Drupal 8. This is for a headless Drupal site. Triggering is fine I suppose, I can ...
2
votes
0answers
43 views

Convert Entity embed image drupal-entity tags to image tags for Json API

When adding image into CKeditor using Entity Embed the source code looks like this, <drupal-entity data-embed-button="media_browser" data-entity-embed-display="view_mode:media.embedded" data-...
0
votes
0answers
17 views

How to get comment_count field of `New forum topics` block of Forum module in my custom module programmatically?

I use the New forum topics block in my custom module based on core Forum module. I want to set a customed icon for the Hot forum topic which has comment counts more than the threshold in the new ...
0
votes
1answer
21 views

Field group horizontal tabs are displayed as accordions in small screens

On Drupal 8 site using the default Bartik theme, I have setup the article content type to be displayed in horizontal tabs based on the "field group" module. On normal/large screens, the article ...
0
votes
1answer
35 views

Cannot override template provided by contrib module in theme

I'm leveraging the Superfish module for our menus but need to tweak the output a bit. Normally I'd just copy the relevant template file (in this case superfish-menu-items.html.twig) into my theme and ...
1
vote
1answer
51 views

Image styles not generated during config import

Situation: Drupal 8.6.9 running DrupalVM with Ubuntu 16.04, Apache 2.4.18, Php 7.1.26 with default settings except for the location of the drupal site. I am trying to do a migration of a Drupal 7 ...
1
vote
2answers
29 views

Control Webform's date field (datepicker) from JS

I have to change number of months that's shown in datepicker of my date field in Webform, on desktop I need 2 months, but on mobile just 1. I'm not able to control that using JS, so I created patch ...
0
votes
0answers
50 views

How to combine two date fields and alter its value programmatically based on field value?

I have two fields field_start_date and field_end_date and under manage display section I have set the field format for field_start_date as F d field_end_date as - d Y I need to combine the two fields ...
-1
votes
0answers
26 views

Custom classes shown but not the proper output

I've been struggling with this issue and have not found a satisfying answer in any other thread so apologies for potential duplication. In any case, I've added a custom basic block for social icons ...
0
votes
0answers
30 views

Recommended .htaccess if site installed in subdirectory?

If my domain would be something like this https://awesome.demo how to setup a proper .htaccess to redirect my drupalsubfolder awesome to my domain? Currently I visit my site like this because I ...
0
votes
0answers
58 views

Drupal 8 Bootstrap 3 theme failure [closed]

This is really weird! I'm developing a new web site and integrating a subtheme based on Bootstrap 3. Today, I suddenly got a white screen on my local DEV environment. Thinking it was just an error ...
0
votes
0answers
31 views

Distance-based shipping/delivery calculation

I'm setting up a site for an equipment hire business where they want the customer to have the option of delivery at a flat rate within the city they're in and a single cost per extra mile outside. I'...
1
vote
1answer
31 views

Can a view and a content type share the same alias pattern?

I'd like to have this URL structure on a Drupal 8 site: /schools/usa -> handled by custom view /schools/europe -> handled by custom view /schools/school-name -> handled as a normal node So ...
1
vote
1answer
36 views

node.html.twig gets cached while other templates do not

I disabled cache with the command drupal site:mode dev I have overridden html.html.twig and node.html.twig. If I change something on html.html.twig and refresh the page, the changes take place. ...
0
votes
0answers
12 views

Wrong media file is getting referenced on the node edit form [closed]

I am having a content type where there are multiple paragraphs. among those paragraphs, I have banner as a paragraph and file field in other separate paragraph. The banner paragraph is having a image ...
0
votes
1answer
37 views

Let customers set appointments while showing me their country time and my country time in contact form output [closed]

I'd like to create a form in which a customer will insert basic details like name, email and so forth but will also schedule a specific date and time in an appointment scheduling system, adjusted to ...
0
votes
0answers
15 views

How does drupal recognize the external js library imageflow with the libraries module?

I want to upgrade the imageflow module to drupal 8. Therefore I created a module "myimageflow". "myimageflow.libraries.yml" seems to be ok according to function myimageflow_library_status(), but ...
0
votes
0answers
18 views

Date field empty after migration [closed]

After migrating with the build-in migration modules, the date-time fields on nodes are empty. Also in edit-mode the field are empty. In the database the values are visible. After a web search, the ...
0
votes
0answers
44 views

How do cached discovery definitions affect entity caching?

I'm experiencing an interesting and odd situation with entity (field value) caching. I'm using hook_ENTITY_TYPE_storage_load() to set the value of a field when nodes of a certain type are loaded. Per ...
0
votes
0answers
8 views

Entity Reference Field - Videos

I am trying to use a entity reference to get the media value by using the target id to create a uri and url. The problem is that the way it is working now is that the id is grabbing is node id and not ...
0
votes
0answers
13 views

Access image field URL in a custom block [duplicate]

I need to have an easily exposed to user background image in an aera (header). So i made a custom block with an image field and i want to use this picture in a classical <div style="background.... ...
0
votes
0answers
15 views

Pathauto bulk update for taxonomy terms with unchecked “Generate automatic URL alias”

I have the same issue addressed for D7 here: Bulk Generating URL aliases for taxonomy terms doesn't do anything or here: Bulk update for unchecked "Generate automatic URL alias" And I'm ...
-1
votes
0answers
13 views

Node/add form together user registration [closed]

How to accomplish node/add together user registration. Example: I want to anonymous users to see/fill one of the node/add forms, but not to allow them to publish it before they register and all of ...
-1
votes
2answers
50 views

MySQL through SSH tunnel

I'm trying to connect my Drupal 8 website to a mysql database hosted on a different server, which is only accessible through SSH. I can connect my database manager (heidiSQL) with a SSH tunnel, but i ...
0
votes
0answers
35 views

How to install custom module and its dependencies with composer

Hi I am trying to setup my new Drupal 8 site with composer, but I got few issues. I tried to setup the site site by following the Guide from here and was able to setup the site successfully. After ...
0
votes
1answer
25 views

How to alter a link of the language switcher? [duplicate]

I would like to alter the link displayed on the language switcher for the second language of my site, for a certain node. Essentially when you viewing a certain node in the main language, and then use ...
-1
votes
0answers
9 views

video url thumb preview on node page with carousel or slider in drupal 8 [closed]

I have a site with a slider for image in all page node. The content type is "product page". Actually the user add more than one video url field. SO better is insert a clider or carousel or responsive ...
-1
votes
0answers
23 views

Why do i get error “Cannot declare class” when try to create plugin action

I wrote configs and add just one class action, but i get error Cannot declare class Drupal\my_module\Plugin\Action\TranslateAction, because the name is already in use in /var/www/html/modules/...
-3
votes
0answers
27 views

I want to get the node id and created date of the latest node submitted by a user [closed]

$query = \Drupal::entityQuery('node'); $query->condition('type', $nodeType) ->condition('status', 1); ->condition('uid',19); $query->range(0, 1) ->sort('created' , 'DESC'); return ...
3
votes
1answer
59 views

How do I package a distribution on Drupal.org?

I am getting some old and mixed documentation issues with building a release for a Drupal 8-based distribution Drupal.org. The main documentation is How to package a distribution on Drupal.org, which ...
-1
votes
0answers
30 views

How to display internal links with metadata? [closed]

On my Drupal 8 site the Metatag module that is configured. When I share a link from my site to an instant messenger like Telegram or social networks like Facebook, the title, description and image ...
0
votes
1answer
24 views

Link field is removing query parameters

We have an Article that a link field, field_link. When we create a new page of type Article, we set the link field to have a URL of www.example.com/somepath?someid=123345 and label of View. When the ...