Stack Exchange Network

Stack Exchange network consists of 175 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
1answer
20 views

How do I use the value of a webform_field as the default-value for a later webform_field?

Is there a way with Drupal 8 Webform UI to set the default value of a text field as the value of an earlier text field in the same form, and update via Ajax? example: user_name: '#type': ...
0
votes
1answer
31 views

Command to list all media entities in console?

I have an issue in my site which is not allowing me to visit the /en/admin/content/media page. I'm looking for an approach to list and delete media entities on the command line. When I run drupal ...
2
votes
1answer
36 views

How to create a textfield with autocomplete function for the view?

My Drupal 8 website is multilingual, and on one of the views I present a list of nodes (titles). On top of the page I need to implement a textfield with autocomplete function, where the user can start ...
0
votes
1answer
19 views

How to link migrated image file to the user profile picture field?

I used the following migration file to migrate user pictures from a Drupal 7 site installation to Drupal 8: migrate_plus.migration.drupal7_image.yml id: drupal7_image label: Images migration_group:...
-2
votes
0answers
19 views

LDAP REST Service

In Drupal 8.6.3 I have enabled following for LDAP Authentication: LDAP users along with other LDAP modules. User is getting validated in browser, but not using Drupal 8 login REST service. I think, ...
0
votes
0answers
28 views

CKEditor Filter does not persist text after modifying

I wrote a filter class that strips out certain tags from the user input in the editor. For example it uses a regular expression to remove <span> tags of a certain class. The steps I took were: ...
0
votes
1answer
25 views

View of blog posts grouped by year

Client wants a blog archive with the posts inside accordions whose toggle is the year. Two example years HTML below. I have the individual fields exposed as tokens within my view with no problem. ...
0
votes
1answer
14 views

How to grab $form_state value from text-format from drupal form

I created a form for my module. I have a formatted text box $form['message'] = array( '#type' => 'text_format', '#title' => 'Body', '#format' => 'basic_html', '#default_value' => '<p&...
0
votes
0answers
34 views

Get paragraph bundle (paragraphs_item) value for migration

I am migrating node from D7 to D8 but I need to get the paragraph body value and concatenate it with the value of the body. Here is a dump of the node: object(Drupal\migrate\Row)#1848 (8) { ["...
0
votes
0answers
30 views

How do I add a link to a rendered entity?

I have a custom entity, sample. I’ve used the entity display settings interface to set how I want this entity to display on the screen. However, I would like to add a link to another route when it is ...
0
votes
0answers
28 views

Unable to generate derived image located at public://

I am trying to use a slideshow on my server and I get this error Date Monday, January 28, 2019 - 18:28 User Anonymous (not verified) Location http://mysite.dev.local/sites/default/files/...
0
votes
1answer
22 views

How do I reset my search result link?

I created a custom search plugin for a custom entity. I would like to change the link that is presented to the user on the list of results. I had originally set it to the canonical page using $entity->...
0
votes
0answers
12 views

What is the type of “column” objects in views templates?

I have a view in tabular form where the first field is a date in a week (say, 'Sun 27', 'Mon 28', etc.), and I needed to show the date only when it changes (in order to avoid a list of equal dates) ...
0
votes
0answers
27 views

Form Builder Table Column Weight

I am trying to create a table in a Drupal 8 form and would like to set grid-based column width similar to Boostrap or any other front-end framework, i.e. each column should have a weight out of 12. ...
2
votes
1answer
47 views

Change the site slogan on certain pages

I have a Drupal 8 site with a content type called Landing Page. I'm using the bootstrap theme and I have the block showing the brand info (including site slogan) in the navbar. I want some of the ...
0
votes
0answers
23 views

After Core Update 8.5.9 to 8.6.7 404 page for anonymous user

After i updated my drupal core from 8.5.9 to 8.6.7 some pages aren't reachable for anonymous users (error 404), but when I'am logged in everything is showing up correct. Sometimes I get an error (...
-5
votes
2answers
44 views

How to create a custom login form [duplicate]

I need to know please any suggestion about how to create a custom login form for another type of users in drupal 8 , I have now /user/login is for administrator, but I need to add /account/login it's ...
1
vote
0answers
119 views
+50

Controlling a dependent field in a multi-instance paragraph

The fields below are part of the node/add node/edit forms of my custom node type. The paragraph field_para_city contain one field_city. (I later need to add other fields in the paragraph). The user ...
0
votes
0answers
34 views

Sending Webform submissions to CRM

We installed Webforms and Salesforce suites and we'd like to create new leads in Salesforce based on the webform submissions. I created a webform with 3 fields. email: '#type': email '#title': ...
0
votes
0answers
10 views

Doesn't validation occur if we hide a required field in a form display?

I hid the title field (a required field) using the form display settings. Using hook_node_presave(), I fetch a custom field value and assign it to the title field. Would that show a validation error ...
-2
votes
1answer
21 views

How to add prefix to button text field

I am trying to wrap button value with span as follows in my form alter hook. $form['actions']['submit']['#value'] = '<span>'.t('Submit').'</span>';//Here want to add span $form['...
0
votes
1answer
30 views

how do 404 pages work?

How does the 404 page you can define in /admin/config/system/site-information work? I found Drupal\system\Controller\Http4xxController->on404(), but how does that display whatever path I definied in ...
1
vote
2answers
50 views

Combination of multiple taxonomies

I have these following 4 Taxonomies 1. New Taxonomy 2. Content Category 3. Technology Taxonomy Applications Gamification Architecture etc. Totally 170 terms 4. Vertical Taxonomy Automotive ...
2
votes
1answer
42 views

point a subdomain to a page without using domain module

I want to add a subdomain to my site (mysite.local) so it is, x.mysite.local and I want that to land on a custom page, i.e. a node, a view. I do not want to use the domain module because it has way ...
0
votes
1answer
35 views

Schedule cron jobs using Ultimate Cron

In one of my modules I would like to create two different cron jobs to handle two different procedures. What I did was to use the Ultimate Cron module, and by implementing the cron api, to schedule ...
0
votes
0answers
23 views

Is there a hook invoked after user confirmation?

This question asks it (presumably for Drupal 7), but the solutions all appear to be specific to D7 and not applicable in D8, so that's effectively a different question. It appears that ...
2
votes
1answer
33 views

HTML tags in views field label. Is it possible?

By default in views field label it possible to put only plain text, so the markup looks like: <div class="views-field views-field-price"> <span class="views-label views-label-price">...
-2
votes
0answers
67 views

Grant access to a node (during the node creation) to anonymous user

I'm looking for a solution on how to grant access to an anonymous user during a node creation. Scenario: A registered user creates a node with comments as one would normally do, but there would be ...
3
votes
1answer
38 views

How do I add secondary tabs to the user (profile) edit tab?

In earlier versions of Drupal, there were categories of users which showed up as tabs on the user (profile) edit page, located at /user/{user}/edit. How can we define new tabs on this page in Drupal 8?...
0
votes
0answers
12 views

Webform File name not showing in submissions

I am using webform 5.1 in Drupal 8, I enabled private file settings and added a file field of type document_file. When I upload the file it gets saved in the folder, its name is also visible in ...
0
votes
0answers
10 views

Re-use static mappings in multiple migrations?

I was wondering if anyone knew if there was a way to re-use Drupal 8 static mapping process plugins across multiple migrations? Sort of like as functions/macros. A simple example is I have a static ...
-5
votes
1answer
49 views

How to refresh a view automatically?

I have a Drupal 8 site with NodeJS. I use the following module: https://www.drupal.org/project/private_message_nodejs For the installation, I followed the instructions in the documentation of the ...
0
votes
1answer
38 views

Why the label of "subject' field in comment-form not be translated and how can I do the translation in a better way?

In the baseFieldDefinitions of Comment Entity, the subject field is set to be translatable, but I can not find such a translation in User interface translation(admin/config/regional/translate) that ...
-1
votes
2answers
46 views

entityQuery condition for users without a role

In Drupal 8 - Is there a way to do a 'NOT IN' in a user based entityQuery? $uids = \Drupal::entityQuery('user') ->condition('uid', 72) ->condition('status', 1) ->sort('...
0
votes
0answers
34 views

My custom normalizer doesn't get executed

I'm building a REST api with Drupal 8 and I want to override the normalizer for the Formated Text field type. I started with this example module: https://github.com/jazzdrive3/example_normalizer ...
0
votes
1answer
48 views

Bulk update pages that use old URL alias by content type

We have a content type, Basic Page that recently had the URL pattern changed from www.example.com/page/page-title to www.example.com/page-title. Under the Pathauto settings found at /admin/config/...
0
votes
0answers
77 views

Programmatically change order

I've been searching for days but cant find a working answer for my issue. I have a Drupal 8.6.7 site with search_api and search_api_solr installed. I have a view based on solr results. I want to sort ...
1
vote
1answer
46 views

Getting a formatted address component in another field's template

I need to pull the administrative area component from an Address field and place the full text of it it in the template of another field on the content type. I've managed to accomplish this with the ...
1
vote
2answers
40 views

How can I wrap HTML list in some div?

On my drupal 8 website I have created a view, with list of content. As an output format I have chosen HTML list. So currently it looks like following: <form id="views-form"> <div><...
0
votes
1answer
24 views

Views hook gets ignored after 1 execution

I registered this hook in my module: function MYMODULE_views_pre_render(\Drupal\views\ViewExecutable $view) { die('hello world'); } I cleared the caches, and ran a view. Output is "hello ...
0
votes
1answer
12 views

admin/commerce/orders/{orderId}/payments/add “You are not authorized to access this page.”

When I try to add a new payment to an order (either created by a customer or via the backend) I always encounter the "You are not authorized to access this page." error. My user has the ...
-2
votes
0answers
46 views

Tables that needs to be ignored in db replication to not affect config import?

In my workflow, I have a Drupal 8 production site and another is stage site. I wanted to do something like below: Full export mysql dump from production. I keep it as the point-in-time back up also. ...
0
votes
0answers
17 views

View aggregation with user submission per day

I'm trying to get a REST export in view with the count of submissions (nodes created) by a specific user, per day. Something like: [{"date":"2019-01-20","count":"20"},{"date":"2019-01-18","count":"31"...
0
votes
0answers
22 views

node--view--[machine-name] ignored in production [duplicate]

On my development, local site (twig debug enable, cache disable), I create node template for specific view block by Drupal suggestions: <!-- THEME DEBUG --> <!-- THEME HOOK: 'node' --> &...
1
vote
1answer
26 views

drupalSettings cached in page

I have a module that adds functionality to the front-end. The feature can be turned on or off via the configuration page of the module. I pass the settings to the frontend in the HTML preprocess ...
1
vote
0answers
37 views

Display content based on URL path

Creating a view block for a specific content type (for example, gallery) how can I filter it so that the view only shows gallery node that live under a certain path (for example, /business/gallery/...
1
vote
1answer
59 views

Behat test fails, unable to find Username field using @javascript

My Behat test fails as soon as I add @javascript Error: Form field with id|name|label|value|placeholder "Username" not found. When I remove @javascript, test is passed without any error. Given I ...
0
votes
1answer
23 views

Adding JS to field widget being created in my module

Cross-posting to stackoverflow.com I am creating a custom field to eventually be displayed in a custom paragraph. I need to upload a JS file for the widget view, but can't seem to get it to work. ...
0
votes
0answers
28 views

How to set drush alias for remote site behind jump server?

Drupal 8 site (8.5.3) with drush 8 (8.1.16) both equal on local and remote. Connection to remote is through jump server - log in to jump (ssh -L 2004:remote.com:22 -l username jump.server.com), in ...
0
votes
0answers
26 views

Shorten link in views

I have a Drupal 8 website with Shorten producing short links to content. "Tokens" and "Record Shorten" module are installated as well. I've like then to build a view exposing a text like "Hey, ...