Drupal 8 is the version of Drupal currently in development which will be the next major release.

learn more… | top users | synonyms (1)

0
votes
0answers
12 views

Getting access denied when altering user view route

I want to display custom content for the user profile page instead of the entity view so I am altering the entity.user.canonical route and I am setting a custom controller and title compared to the ...
0
votes
0answers
24 views

Creating account type where email not required to be unique

I'm developing a platform for Drupal 8 where there are several account types: students, their parents, teachers. The students are young and we want their accounts associated with their parents' ...
0
votes
0answers
36 views

Is Drupal commerce ready for Drupal 8? [on hold]

I have previously developed sites with Drupal commerce using Drupal 7. Now I want to start my own business and develop a site for it, as Drupal 8 is in beta now, Does anyone know When will Drupal ...
1
vote
1answer
24 views

How to embed plugin configuration form elements into another form?

I have a form that lists entities and each of the entities has a checkbox. The form also contains a list of actions(Action plugin) that can be performed on selected entities as a select list. I would ...
0
votes
1answer
42 views

Drupal 8 different layouts in theme

How do i create theme that has different regions for every node? For example i want my frontpage to have different regions than some other page that represents content.
1
vote
2answers
63 views

Drupal 8 modules support

How do i know which drupal 8 modules are supported by Drupal 8 versions? For example is Page Manager 8.x-1.0-alpha8 module supported in every Drupal 8 version and if not how do i know which Drupal 8 ...
2
votes
1answer
26 views

How to hide comment section present in render array?

I have generated an array in Drupal 8 which is created by using viewbuilder in this manner: $content = $this->entityManager()->getViewBuilder($entity->getEntityTypeId())>view($entity, 'hardcopy'); ...
1
vote
1answer
30 views

Wrong caching of embedded views block

I am having trouble with the Cache API in Drupal 8. I embedded a views block with pagination through a field preprocess function into a node. When caching is off, I can normally use the pager and will ...
0
votes
1answer
41 views

Switch a language programatically

Looking for a way to change between languages on our site, the Drupal 8s LanguageManager doesn't seem to have a straightforward method for this. We cannot use URL-switching, just want to do this ...
2
votes
0answers
46 views

Using the right t()

In Drupal 8, it seems as though object-oriented code is encouraged to use $this->t() instead of the global function t(), by either adding StringTranslationTrait to the class, or extending a core ...
0
votes
1answer
24 views

How do I add a menu task to /node path?

I want to add a custom tab after "Edit" but can't figure out how to do so. I added a mymodule.links.task.yml file entity.node.import_form: route_name: entity.node.import_form base_route: ...
0
votes
1answer
24 views

Custom validation rules for content entity fields

So I want to store an entity_type in a string field in my content entity. Since the list of entities can change over time, I can't use a list_string field with allowed options. I don't know if ...
1
vote
0answers
33 views

Drupal 8 static pages [duplicate]

How do i create Drupal 8 static pages that are translatable(3-lingual site)? I already have HTML code and about 15 static pages which some have dynamic content(latest news etc). What's the best ...
0
votes
0answers
31 views

How to position javascript file as the last one to load?

In Drupal 8 the weight for javascript files in libraries is not supported, or at least only negative values are allowed, which means I am only able to position them at the top of the list (i.e. load ...
0
votes
1answer
19 views

What is the difference between base tables and data tables for content entities?

Recently, Views was updated to use data tables (the data_table annotation on @ContentEntityType) by default. See the change record at https://www.drupal.org/node/2433153. This caught me out since I ...
1
vote
0answers
29 views

Distribute configuration to several sites

There should be several sites, starting with something like a similar distribution, but over time, each site might get some individual modules. Yet, I'd like to keep the site updated with new versions ...
1
vote
1answer
69 views

Drupal 8 project structure

I was wondering what would be the best way to setup a Drupal 8 website that has about 15 mostly static pages in three languages? Static pages are somewhat similar but do contain different content. ...
1
vote
1answer
37 views

User login link is always visible in menu

I have created user login link in the user account menu but the link is visible all the time(even for logged users). The user profile menu link and the user logout links are displayed properly(they ...
0
votes
1answer
19 views

Filter module won't let me add nested values to my configuration

I'm working on the D8 port of my xbbcode module; my latest sources are here. The module is supposed to let administrators enable individual BBCode tags either in the global default settings or in an ...
1
vote
0answers
57 views

Setting Up Drupal 8 REST Post Request

I am having issues sending a POST request to create a node with Drupal 8 Core REST. Here are the steps I have went through several times. Note that these steps are in effort to produce a working ...
1
vote
0answers
27 views

Content admin no longer works after update from beta 7 to beta 9 [closed]

I get a DB-exception when I try to list my content in admin: Everything else works fine except for this bugger. <em ...
1
vote
1answer
22 views

How to uninstall a text format created by a D8 module?

My module creates its own text format upon installation by having a file named config/install/filter.format.{format}.yml. However, I can't uninstall and reinstall the module, because the format ...
0
votes
2answers
25 views

Changing filter plugin settings before they are saved

(This is for D8, although parts of this filter settings API were already in D7.) As far as I understand, a filter plugin exposes its settings solely with FilterBase::settingsForm() - the central ...
0
votes
1answer
75 views

Running Drush Within Drupal 8 Instance Returning Error

I am running drush version 6.2.0 and the latest Drupal 8 beta on Dreamhosters. When I run drush cc all within the sites directory, I receive the following error immediately after executing the ...
0
votes
1answer
33 views

How do I add a menu item to the main navigation from a custom module in Drupal 8?

For my custom Drupal 8 module I want to add a link to the default main navigation menu of the site. What parent ID do I have to give to insert my menu item into the main menu? I currently have the ...
0
votes
1answer
58 views

Passing path arguments to a form builder [closed]

I'm trying to understand how to port the following D7 code to Drupal 8. function x_menu() { $menu['x/form/test/%/%'] = [ 'page callback' => 'drupal_get_form', 'page arguments' ...
2
votes
1answer
32 views

How can I save/load my Entity from a different database in Drupal 8?

For a custom Drupal 8 module I am integrating data from a separate database (other than the default drupal database) by defining a new Drupal entity in my module. How can I configure my Entity class ...
1
vote
1answer
37 views

Drag and Drop Sort Custom Entities

I am looking for a simple way to sort my custom entities through a drag and drop interface and display them in the custom order in my views. The best way would probably be to add a weight basefield ...
0
votes
1answer
18 views

How do I Bulk Edit Fields or Taxonomy of Nodes in Drupal 8?

I'm working on a site that needs bulk tagging on nodes. The D8 core View Bulk Operations Port is "simple" (https://www.drupal.org/node/1823572) and it doesn't have "modify entity values" which I used ...
0
votes
1answer
72 views

Ajax http request terminated error while installing a Drupal 8 site [closed]

I have installed WAMP Server for Postgresql and during the time of installation of Drupal (version 8), I got this error: Drupal\Core\Config\UnmetDependenciesException: Configuration objects ...
1
vote
1answer
28 views

Theme a specific view with Twig

Is it possible to write a twig template for a specific view? I have a view with multiple blocks and I want all these blocks to look the same. But I am having trouble with my views actually knowing ...
0
votes
2answers
28 views

Fixing Class Not Found error in Drupal8

I recently moved a module from one location to another location and I am getting a ClassNotFoundException Is there something similar to Registry Rebuild Module that can help rebuild the registry?
1
vote
1answer
39 views

Is there a good and recent documentation on the UUID API in Drupal 8 core?

I am aware that the question is (almost) a duplicate of the following question #21991, which has been posted back in 2012. But that question is NOT related to Drupal 8, where UUID is in core. ...
0
votes
1answer
23 views

Custom form handler not found in Drupal 8 (call_user_func_array error)

Currently on Drupal 8 beta 7. I'm trying to build a form with separate "submit" and "cancel" buttons. The cancel button has some separate cleanup work to do. I've tried to follow the documentation ...
0
votes
1answer
39 views

How to display elements responsively side by side using Bartik theme, similar to bootstrap grid?

I am developing a module for Drupal 8, currently using the default Bartik theme. My module defines some pages through twig templates. As I am displaying several sections of a dashboard, I would like ...
0
votes
1answer
35 views

Set entity reference field to 'autocreate' directly in the entity field definitions

I'm having trouble with the two ways of defining forms for entities in Drupal (the first one being in the entity field definitions and the second one being by defining a custom form class). Now, in a ...
0
votes
1answer
38 views

Where should I put my entity queries?

I would like to create a number of entity query methods/functions that I can have easy access to from my entity handlers and controllers. With Doctrine 2/Symfony 2 you can just attach such methods ...
0
votes
1answer
22 views

Twig templates not inheriting

I have a parent theme with templates defined in a directory called templates. Within that folder, I have directories like base (page, html, block etc twig templates), views, and menu folder. My ...
0
votes
1answer
19 views

Passing HTML to the response object

I had this piece of code in a module developed for some previous version of Drupal 8. protected function getOutput() { $content = $this->buildContent(); //print_r($content); $page = ...
0
votes
1answer
49 views

Working on Drupal 8 and drush with teammates

I'm currently working on a website using Drupal 8, with 3 other members in my team. We use git as a versioning system, and we very often work at the same time on different branches. Here is the ...
1
vote
1answer
94 views

Programatically render a block in a twig template

I need to render a views block in my page.html.twig template. In D7 I would do this: <?php $block = module_invoke('module_name', 'block_view', 'block_delta'); print render($block['content']); ...
1
vote
1answer
20 views

How does one add a new base field to a content entity?

I'm currently porting my contributed module to Drupal 8, and sometimes I realize I've chosen the wrong field type. I also know that I will need to add additional fields later on, and it would be nice ...
1
vote
1answer
55 views

Are there Drupal 8 custom block type naming conventions?

With our ability to create custom block types and manually add additional fields in Drupal 8, is there a simple naming convention to create block--custom_block_type.html.twig to handle the layout of ...
0
votes
1answer
32 views

Install a custom empty module break my custom style

On Drupal 8, I have a style and a empty module : /modules/kyna/nature/ /modules/kyna/nature/nature.info.yml name: 'Nature Theme Structure and configuration' type: module description: 'Example ...
0
votes
2answers
49 views

Suggested theme hook doesn't get applied

The custom theme hook (abacus-product.html.twig) I've appended via a hook function doesn't get applied. But it shows up in the suggestions. <!-- THEME DEBUG --> <!-- THEME HOOK: 'page' ...
1
vote
2answers
42 views

How can I apply different templates based on taxonomy hierarchy?

I'm new to Drupal and I don't have extensive knowledge so I'm hoping I can get this question answered. I want the taxonomy pages of lower hierarchy to be displayed differently from the higher by ...
2
votes
1answer
71 views

What are the alternatives to Features module in Drupal 8

I am trying to export configurations from one Drupal site to other. This is not a one time operation, I will need to do this multiple times and Single Import, Simple Export is not an option as there ...
2
votes
1answer
55 views

What are cloned sites in Drupal 8?

When trying to export my site configurations from one Drupal 8 site to other I keep getting the following error The staged configuration cannot be imported, because it originates from a ...
6
votes
3answers
262 views

When should I use Backdrop CMS rather than Drupal?

From what I've heard, Backdrop is basically an alternative to Drupal 8. Is deciding which one to use simply a matter of preference and ideology, or are there specific use cases for each? If I'm ...
0
votes
0answers
17 views

How add SyntaxHighlighter addon to ckeditor [closed]

How I can add SyntaxHighlighter addon to CKEditor on Drupal 8 ?