Questions tagged [8]

Version tag to tag issues specifically related to Drupal 8.x. Please note that 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
10 views

How to refresh a view after a webform is submitted

I have a webform placed in a block below the webform block I have a view that displays the content now I want to refresh this view after the webform is submitted. The webform is ajax enabled and so is ...
0
votes
0answers
10 views

Fatal error when using some filters or sorting options in admin/content

Using Drupal 8.8.0, multilingual, on localhost (Windows 10, PHP 7.3.12). I have a fatal error on the admin/content page, but only if I use certain options for sorting or filtering the results. ...
0
votes
0answers
16 views

Get argument from current URL in twig to generate a link with that argument

I'm trying to get an argument from search page URL so that I can pass that argument to a link. For example I have this URL for a search results page: http://domain.com/site-search?search_api_fulltext=...
0
votes
0answers
19 views

Migration from CSV: how to define a default value for autoincremental id field?

I run migrations from CSV using Migrate Source CSV, Migrate Plus and Migrate Tools modules and it works fine. The result of one of these migration is a custom entity which key is a 'id' field that has ...
0
votes
0answers
11 views

get node by URL alias for APIi

I have added URL alias /the-person in node. I have also created API view which works well with ID, but I want to get it via alias path eg: http://drupaldomain.com/api/v1/person/byaliaspath/the-person,...
0
votes
0answers
15 views

How to hide the site name from browser tab?

Is it possible to rewrite what is displayed in the browser's tabs. Fro example when I open some page, in the browser tab it is displayed as "Page name | site_name". For example " About | site_name". ...
0
votes
0answers
10 views

Add property labels from address field properties in the view display

I use address field module and added this field to my customer profile (for Drupal Commerce integration). In the form you see decently the labels above the input fields (frontend). After filling in ...
-3
votes
0answers
13 views

Using contact forms with GraphQL in Drupal 8 [closed]

Can someone give me a solution for using forms with GraphQL in Drupal 8? I am willing to use any kind of form (contact, webform...) I just need to send the form to the frontend app and receive the ...
0
votes
0answers
15 views

Getting a config_installer not found error after upgrading to Drupal 8.8 when accessing admin/reports/status

After upgrading to Drupal 8.8 via composer I am seeing the following error when accessing admin/reports/status. It seems to point to missing config_installer profile but that profile is found in the ...
0
votes
0answers
11 views

How can I create a menu item and tabs in my view?

Building on How to create views tabs in D8? where the asker gets information on how to turn the different pages in their view into tabs, I would like to also add a menu item for my default tab in the ...
0
votes
2answers
26 views

How do you import a database through lando?

I am trying to setup a site within lando and need to import the database. How do you import a database through lando?
0
votes
2answers
40 views

Can I add and edit a custom entity from the same URL?

I am creating a custom entity called user_profile. Each logged in user will have a user profile. I want to be able to add and edit the user_profile entity from the same URL. The example module ...
0
votes
1answer
18 views

Display view on all page routes

I would like to display a multi value media field and its file type and size in a content type and display it in a table layout. I thought using a view would be the best way to pull the media file ...
1
vote
1answer
7 views

How to copy/clone menu of a node when clone with Entity Clone module?

When cloning a node using Entity Clone module, the menu link are not copied. As menu link item is created and managed on the node form level, there is no reference of the menu link item in the node ...
0
votes
1answer
25 views

Altering UserPasswordForm redirect with a custom submit

I want to alter the redirect of UserPasswordForm from Drupal’s core, I did this function maubl_user_form_alter(&$form, FormStateInterface $form_state, $form_id){ switch($form_id) { case '...
0
votes
1answer
22 views

Display the URL of where the content is located in my search results

I'm using SOLR search/search API on my Drupal 8 site and I've set the view to display the following two fields: Content datasource: Title (The title & link to the page) Search: Excerpt (...
0
votes
0answers
16 views

Ajax call in form alter of inline entity form

Inline entity form is using in bricks. In that Inline entity form, there is 2 dropdown fields available . i want to form alter in that Inline entity form, so that selection of one dropdown value, ...
0
votes
0answers
26 views

Create a link to a private file from just a file id?

I am building a controller that returns a rendered HTML Response object to an AJAX request in the theme. I need to display a button that contains a link to a private file. I tried to mimic what the ...
0
votes
1answer
30 views

Add specific CSS class to form elements from the address field

I try to add a custom css class to a form element inside my address field for e.g the postal_code field and another class to the given_name and family_name field. I tried it with a ...
0
votes
1answer
46 views

Run code once on each page load

In the past there were some hooks, such as described here: How to run check on each page load? to execute arbitrary code on each page load. Now this has been replaced with an event based approach. I ...
0
votes
0answers
18 views

Location migration not working

I'm trying to convert a d6 location field into a a d8 geolocation field, but when I run it the field does not get updated, and I don't get any messages either. All of the other node data has been ...
0
votes
1answer
37 views

Error while updating

Updated Drupal from 8.7.8 to 8.8.0 with: composer update --with-dependencies That part went well, but when I run: drush updb I get following error: In ProcessBase.php line 188: Unable to ...
0
votes
0answers
14 views

Lost name attribute after recharge select field with ajax callback [duplicate]

I have a great trouble with ajax callback, I need to recharge a select field, the callback goes right, but, the returned field in ajax request goes without name attribute, so, I lost it while submit ...
0
votes
1answer
14 views

Show administrative description in Views

I am needing to do a Views report for all webforms on our site (we currently have 27 forms) that can show me the total submission count per form. The issue I am having is that we need the Views ...
0
votes
1answer
28 views

How to display since when the node was created? [duplicate]

How to display since when the node was created with TWIG. Here is the templace of my node : <div class="card mb-5 p-0 overflow-hidden shadow rounded bg-white"> <div class="card-header ...
0
votes
0answers
14 views

Remember and display submitted form values in Ajax Add More example?

I am testing out Drupal's Form API examples and I am stumped. In the Form API's Ajax Add More example you can input names into a textfield. There are also two buttons to add/remove one textfield. ...
0
votes
2answers
40 views

Invalidating Paragraph Cache

I'm working on a paragraph type that will need to display on a very limited number of pages but has some specific functionality where the preprocess function will need to run each time. In my ...
0
votes
0answers
18 views

Can't remove product attribute field from product

I've created first product type which allows products to have multiple variations. It has product variation and product attribute "flavor" and it works well. Then I've created second product by ...
-2
votes
3answers
57 views

Where is the temporary directory defined in the code?

I wonder where the tmp dir is set in the code of Drupal 8. Indeed the upload_tmp_dir value is not set in the php.ini and I have no access to change it. Where in the code the value is defined and ...
0
votes
0answers
11 views

How to get the node title which is related to file in File usage view?

I am just trying to list out the nodes which are linked to files in the File Usage view. That will show up in this URL: /admin/structure/views/view/files/edit/page_2. In this view I tried to add ...
0
votes
0answers
27 views

How do I programmatically add fields to Paragraph types?

I have one paragraph type of Product. and I have to add one field to paragraph product programmatically, how can I achive this. function my_module_field_widget_paragraphs_form_alter(&$element, ...
-1
votes
0answers
30 views

Trusted host patterns not being recognized in custom settings.php file [closed]

I have created a custom settings.gitlabci.php file for setting trusted host patterns in a gitlab pipeline environment. See code below. <?php // @codingStandardsIgnoreFile if (getenv('GITLAB') ==...
-1
votes
1answer
14 views

Remove Passwords match: text from Registration form

How do I remove/disable "Passwords match:" text in Drupal 8.
-2
votes
2answers
31 views

How to execute login feature on Chrome browser

Just using Behat with drupal 8 and facing problem with login behat script to run. Below are the my code : behat.yml default: suites: default: contexts: - FeatureContext - ...
0
votes
0answers
10 views

How to display field labels in Views lists that show full content or rendered entities?

I have a view that displays multiple content types and for this, I went and created custom displays. It works fine except that Views seem to strip all fields from labels. I did a dump of twig fields ...
0
votes
0answers
21 views

How to solve “Query failed” error in drush sql-sync output 2?

I have the exact same problem as in How to solve "Query failed" error in drush sql-sync output?, exact same output. That user found the answer as the password in settings.php was wrong, but ...
0
votes
1answer
47 views

How to build a simple data comparison rule?

I am working on Drupal 8.7.10 and I have installed a fresh Rules 8.x-3.0-alpha5. Could someone help me to start a very simple rule? I am still struggling with the "new" Rules. All I need is to send ...
0
votes
1answer
30 views

Set new theme setting to default on theme update

Working We have a custom base theme. There are custom theme settings with default values. When the theme is initially installed, the theme settings are correctly set as default. Good. This custom ...
0
votes
1answer
23 views

How to upgrade to Drupal 8 from 7 with clean install? [closed]

I currently have a Drupal 7 site that I want to install Drupal 8, but do a clean install. This means wiping away everything and starting with a new Drupal 8 instance. I have seen many articles on how ...
1
vote
3answers
31 views

I extended some functionality in the slick module, but I am looking to do it in a way that doesn't get erased each time I update slick

I extended some functionality in the slick module, but I am looking to do it in a way that doesn't get erased each time I update slick. I added a css file and edited the slick skin php file to use ...
-2
votes
0answers
32 views

Regex pattern to validate a field value [closed]

What is the regular expression for a text field where the value starts with an @ sign and must contain a-Z and numbers to validate form fields with Webform? Example value: @myusername123?ß
0
votes
0answers
20 views

How to select a default “text format”? [duplicate]

I created a "Text (formatted, long, with summary)" field. If I select a "Text Format" in "Default Value" and save it, it does not save and always returns to "Plain Text". The only way to keep the "...
0
votes
0answers
21 views

Put a parameter in url using Easy Breadcrumb module

I've a couple of url who use an id in it, I would like to set a custom breadcrumb for them but I can't arrive how to do it. I tried using * or [0-9] in Paths to replace with custom breadcrumbs but it ...
0
votes
0answers
15 views

Missing File Module Warnings on drush ups

I am preparing for a Drupal 8 Core module (Current version is 8.7.4) and in the process, I used 'drush ups' to check for available module updates. Doing this command generates the 'following module is ...
0
votes
0answers
27 views

How to update a language's language code

I have a multilingual site with English as default language. The language code for English is currently en but I want to convert it to en-US. I thought about adding a new language with the correct ...
0
votes
0answers
33 views

Type-specific fields for different categories of content type

I have a contract content type on my Drupal 8 site, and I would like to use the same content type for multiple different types of contracts. 95% of the fields are common for all types (contact ...
0
votes
1answer
16 views

if current_node is in menu, do something in theme.inc

I'm trying to check if the current node (of a specific content type) has been added to a menu (using the "Provide a menu link" in the node edit GUI). if it has, I need to set a variable in .theme....
0
votes
0answers
10 views

D8 Equivalent To D6 Node Referrer - Obtaining List Of Referencing Entities On An Entity

I am refactoring a D6 site into D8. Two of the entities (content types) I have are Event and Document. There is a 1:n relationship between Event and Documents. I added 'For Event' field on Document ...
0
votes
1answer
45 views
+50

Using GraphQL webform add-on

I started to use GraphQL for my drupal8 application to expose some data. Now I want to use it to return a webform that I created. I installed an add-on for webform graphl https://github.com/...
0
votes
0answers
11 views

Webform how to set a value with hook_form_alter and also sent that value with the email handler?

I have a Webform with an Advanced HTML/Text element whose value I am setting via hook_form_alter(), however, this value that is set is not included in the email notification. I've tried this with ...