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
0
votes
0answers
45 views

What is the purpose of the Manage Display in Content type?

For example, in the Body field there is a LABEL with the following values: And there is FORMAT with such values: How does something change on the site depending on the selected values in the Manage ...
0
votes
1answer
26 views

Query remaining field names from a database table

There's a database table. I know only one field name on the database table: username. How do I view remaining field names on the table? namespace Drupal\fixx_helper\Controller; use Drupal\Core\...
0
votes
1answer
26 views

how to apply 'noindex' to all nodes and leave Alias indexable to prevent perceived duplicates for SEO

We're working with an SEO specialist who is finding that our underlying /node/### page URLs are competing with our aliases and bringing our page ranking, etcetera down - because they're perceived as ...
1
vote
0answers
21 views

How can I access all of the inline entities in a custom inline entity form validation?

I have a registration form with inline participant entities like this: I'd like to add a custom validation that prevents duplicate email addresses for the participants. In the example above, the user ...
0
votes
0answers
29 views

Add a JS app in Acquia root domain folder

I have a decoupled app, both backend and frontend parts, and I want to add them to Acquia cloud. Right now the js app is placed in a subfolder in drupal's docroot folder. What I need is to have the JS ...
1
vote
2answers
18 views

How to order search results based on author field content

I am using Drupal 8 search views, I would like to order the search result so that the content that's author has field "X" filled out should be ordered first and all other content where the ...
-7
votes
1answer
51 views

How to redirect the user to the home page?

I have Drupal 8.9. When users access the site, they are redirected to their user account page. I want them to be redirected to the home page. If I leave the Default front page setting empty, the users ...
0
votes
2answers
37 views

Problem with drush and site alias (Drupal 8.8.6 / Drush 10.3.1)

I've installed two drupal sites on a share hosting (OVH), in two folders : dev.www www I've installed drush 10.3.1 and create two alias, but when I try use alias (drush @dev status), I have the ...
0
votes
0answers
56 views

Getting the 'The website encountered an unexpected error. Please try again later.' error during an update

I recently updated my Drupal 8 installation, and for some crazy reason my site now displays a white screen and this line of text when I go to it: The website encountered an unexpected error. Please ...
2
votes
1answer
35 views

How to ensure successful update after system failure during updb causing the site to remain in maintenance mode?

Running drush updb to upgrade drupal core or other modules, puts the site in maintenance mode. I recently faced an issue (probably an edge case) where the site was stuck in maintenance mode after ...
0
votes
1answer
19 views

How do I add a site to a multi-site

I am trying to convert my installation to a Drupal multi-site. I have the original site (www.original.com) with a settings.php file under the sites/default folder. I want to add a new site by adding ...
0
votes
1answer
39 views

Pull content from production to staging server

I have a setup that consists of a Drupal 8 instance on my localhost, a staging instance on a develop server and a productive version on a production server. Initially, I was co-designing the theme, ...
0
votes
1answer
24 views

Hide Webform Message “You are viewing this form as…”

How can I hide the message at the top of a webform which says You are viewing this form as [user name]. Please click here if that's not you.
0
votes
0answers
16 views

Images randomly not found

I have an issue on Drupal 8 with images randomly not found. I am actually not sure if the issue comes directly from Drupal. I am developing for my organisation a website currently quite simple with ...
0
votes
1answer
30 views

Is it possible to extend an existing contributed module?

There's a new Drupal module that I'm interested in integrating in our websites, the Media Entity File Replace module. I've already installed it via composer and created an update hook to enable it ...
3
votes
3answers
190 views

How can I change the date format?

I'd like to change the Date format of recent log messages (/admin/reports/dblog) in Drupal 8.9.1 from short date to something with the time. In Drupal 7 using watchdog I just edited the view and it ...
0
votes
0answers
17 views

Change Dynamic Entity Reference field widget

I am using Drupal 8. I have used the Dynamic entity reference module. Added DER field. I need to change this field widget from autocomplete to a select list. For this, I have used ...
0
votes
1answer
145 views

How can I prevent one template from displaying cached values?

I have a site with Drupal 8.9 and Twig Tweak. I created 7 view blocks to set up a task list in stores. I want to display a task counter for my current user on my home page. The tasks checks : If the ...
2
votes
0answers
124 views

How can I show the flagging field edit form on a node?

On a flagged node, instead of showing the flag/unflag link, I want to show the flag edit form. Here's my setup. Basic page content type can be flagged with the flag Bookmark. Bookmark is a per-user ...
1
vote
1answer
55 views

Adding Constraint to entity referenced Paragraph field

I'm attempting to follow this documentation to add a custom constraint to a field in a Paragraph but I'm having trouble in adding constraint to that field. Currently I have book content type with ...
1
vote
1answer
38 views

Filter the list of entities referenced by “Entity reference revisions” field

I have a content type "Slider" which uses an Entity reference revisions field named "Slides" to save reference to various paragraphs that are then displayed on the frontend as a ...
-3
votes
0answers
21 views

Why is the folder where the default bootstrap styles are missing?

I need to change some styles of header and footer in my bootstrap sub-theme. In developer's tools, I saw that the default styles for the header are in the my_project\themes\custom\bootstrap_subtheme\...
-5
votes
0answers
23 views

How to change background header and color of links in Bootstrap subtheme?

I created a subtheme based on the Bootstrap theme. In bootstrap_subtheme.libraries.yml writing such code: framework: css: theme: css/style.css: {} In bootstrap_subtheme.info.yml writing ...
0
votes
1answer
36 views

Can't find migration when running drush migration:status

I'm trying a tutorial to migrate users data from a CSV file. From here: https://u.group/thinking/drupal-8-csv-migration/ I've created a module as suggested. Here is the code: /config/install/...
0
votes
2answers
29 views

File size on View

Is there a way to display the file's size next to it in a View? This is for a File field in Drupal 8. I tried the advice (for D7) here, but I received this error. The handler for this item is broken ...
0
votes
0answers
23 views

How can I change the name of the link “Home” in the header to another name?

At first I tried to change it in Structure / Menus / Main navigation but I can’t change the name there. There I can only change the region in which the link is located and Weight. Then I decided to ...
0
votes
0answers
41 views

How can I restrict a filter plugin to certain entity types?

I have created a Filter Plugin which extends FilterBase and need to restrict it to certain entities, for example nodes and not comments. How can I apply this condition? I tried adding a context in the ...
0
votes
0answers
42 views

Access Denied error when trying to install new modules after upgrading to 8.9

I’m having a problem installing new modules after manually upgrading my site to 8.9. I’m getting Access Denied errors even though I am logged in as admin (and have all permissions). Looking at the ...
0
votes
1answer
59 views

How to imitate EVA with TWIG?

On my Drupal 8.9 (with Twig Tweak module) home page I integrated a block with the following code : {{ drupal_view('accueil_page_liste_des_taches_boutique', 'block_1') }} This block displays the ...
0
votes
1answer
43 views

Twig template not rendering new field variable

I created a new field for a custom block type and have already exported necessary yml files and updated the yml for different view modes. However, when I make a reference to the new field using the ...
-1
votes
1answer
20 views

Initiate an authenticated session

I'd like to call a URI on my site as an authenticated user. The first step is to create the session, saving the cookies and then call the uri with the cookies (ref https://stackoverflow.com/questions/...
0
votes
0answers
55 views

Taxonomy terms and vocabulary in form selection

I 'm trying to insert vocabulary terms in my form Only one term appears, but there are more of it. Here is my code in .module file <?php use Drupal\Core\Form\FormStateInterface; /** * ...
1
vote
0answers
48 views

Logged in users are automatically logged out when visiting some specific pages

I have a page view /all-authors where both (Anonymous & Authenticated) users have access to it; However, authenticated users can follow (flag) an author and Anonymous users cannot do that. What I ...
0
votes
1answer
74 views

Cannot update core with composer after switching to core-recommended

I tried to update core from 8.9.0 to 8.9.1 with composer require drupal/core-recommended:8.9.1 but I get the following error: Your requirements could not be resolved to an installable set of packages. ...
0
votes
1answer
40 views

Why do I get an error related to a controller when I created a custom module?

I created custom module following the Creating a custom module on Drupal tutorial. The teacher of this tutorial demonstrated how you can create a custom module that displays on the page Hello world. ...
0
votes
0answers
40 views

Error after updating core from 8.6.2 to 8.7.14

After I have updated my Drupal core version from 8.6.2 to 8.7.14, I have got below error at the time of cache clear and db update. Below error occurs while running update.php An AJAX HTTP error has ...
0
votes
1answer
35 views

Error: “module does not exist” after I removed a module from the file system without disabling and uninstalling it

I removed a module from the file system without disabling and uninstalling it. And now I have error: Drupal\Core\Extension\Exception\UnknownExtensionException: The module drupalweather does not exist. ...
0
votes
0answers
20 views

Custom migration source plugin not enabled in source site error

I'm trying to write a custom source plugin for a d7-d8 migration. I want to extend the Drupal\node\Plugin\migrate\source\d7 Node.php plugin. I'm getting the following error when I try to run the ...
0
votes
1answer
38 views

Simple Sitemap using default instead of website URL

https://www.drupal.org/project/simple_sitemap/ I am using above module abc.com/admin/config/search/simplesitemap When I am generating sitemap via UI or drush simple_sitemap-generate command. It is ...
0
votes
0answers
44 views

How to be efficient and fast at writing boilerplate code for plugins?

What I am currently doing: Using \Drupal::service for prototyping, for example \Drupal::service('path.matcher')->isFrontPage(); We have phpcs that is checking for this kind of things and it says \...
0
votes
1answer
20 views

How to use ajax callback on auto complete field inside a block settings form?

public function blockForm($form, FormStateInterface $form_state) { $form = parent::blockForm($form, $form_state); $selected = 'value of a field'; $form['node'] = [ '#type' => '...
0
votes
0answers
28 views

How do I create a view showing all the commerce store products?

I am using Drupal 8 Commerce v2.19. I am trying to create a view that shows all the store products. I have created the Search API index of the products, indexed the store field as in this screenshot. ...
0
votes
1answer
31 views

Redirect with POST and parameters in a controller

I want to redirect to a url (Sermepa/Redsys) with POST and some form parameters in a Controller. The process is I submit a form that collect some data, and when the user submit this form, it redirect ...
1
vote
1answer
39 views

How does one add a Total(s) row to Views results?

After doing some research, it seems like the best way to get a Total(s) row added to a Views table is via the Views Aggregator Plus module. (Is there an easier/better way?) As can be seen below, I'm ...
0
votes
1answer
44 views

Hierarchy of content types with taxonomy as parent

What would be the best way to implement a hierarchical structure like this: (A) Taxonomy term from single vocabulary (B) Some content type with parent of type A (C) Some content type with parent of ...
0
votes
0answers
33 views

Add a template suggestion with highest-priority in custom module

It's easy to override an existing template in custom theme using one of the template suggestions or just by copying the desired template file and past it under custom theme templates directory. But ...
1
vote
2answers
36 views

How do I make a link to a flagging edit page?

I'm using Drupal 8 with Flag 4.0-beta1. On my flag, I have several fields. I want users to be able to edit these fields after making the flag. How can I make a link to edit the flagging? I tried ...
0
votes
0answers
24 views

How can I change the Cardinality of a field which has previous data present? [duplicate]

I want to change the Cardinality of a field which has existed values in drupal 8.
0
votes
1answer
33 views

How do I make a link to a flag edit page?

I'm using Drupal 8 with Flag 4.0-beta1. On my flag, I have several fields. I want users to be able to edit these fields after making the flag. How can I make a link to the flag edit page? I found ...
0
votes
0answers
18 views

How to create an entity_autocomplete field to accept multiple values?

I have created an autocomplete field like this as an entity reference field to my content type. $form['node'] = [ '#type' => 'entity_autocomplete', '#title' => $this->t('node'), '#...