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
1answer
29 views

Basic “empty” entity type?

Is there a module that provides an empty entity, to which I can add my own fields. I guess it would include just an Entity-ID as a primary field, and work with other entity modules. For me, nodes ...
0
votes
1answer
24 views

Redundant Title not required?

I don't know what to do with a redundant node Title. In Drupal 8, I've created an Author content type which includes fields for (a) First name (b) Last name (c) Biography. I can't seem to: Set it ...
0
votes
0answers
12 views

Override image-formatter.html.twig

I'm looking for an option to override the image-formatter.html.twig template in my own theme. But in the HTML page output (twig debug is set to true) there's no option listed to override the formatter ...
0
votes
2answers
29 views

D8: Best practice: Linking content types

I would appreciate suggestion for this common scenario in Drupal 8, which may be different to how I do it in Drupal 6. I don't want to do any programming. I have two content types: (1) Articles ...
1
vote
2answers
73 views

Getting the image URL from a field_image on a node

So I have this Node: object(Drupal\node\Entity\Node)[1862] protected 'values' => array (size=17) 'vid' => array (size=1) 'x-default' => string '7' (length=1) ...
0
votes
0answers
24 views

How to disable Toolbar on certain pages / theme?

Before deprecation of hook_page_build/hook_page_build_alter() we used good old method: $page['page_top']['toolbar']['#access'] = FALSE; (Source) It disabled Toolbar for specific route in specific ...
1
vote
1answer
64 views

How to create menu link in Drupal 8 with external URL

With my module MYMODULE I would like to create external link and place it into main menu. Is it possible to do that in MYMODULE.links.menu.yml file or MYMODULE.routing.yml? Something like this??? ...
0
votes
0answers
28 views

Is there a way to retrieve DRUPAL TWIG template's with core drupal 8 javascript functions like twig.js?

Is there a way to get precompiled twig templates from drupal 8 ? Example : Drupal.getTemplate('my-template.twig')(data); Thanks.
0
votes
2answers
29 views

Get field widget settings

In Drupal 7 they can be found in object that is returned by field_info_instance(). Is there a way to get widget settings for certain field name and bundle in Drupal 8?
0
votes
0answers
27 views

How to access update.php in Drupal 8 using nginx?

I would like to use Drupal 8 (beta) with nginx. It works correctly, except update.php . It doesn't find it. After analysing .htaccess (which is not processed by nginx) I realized, that there is no ...
0
votes
1answer
36 views

Using entity form display modes

I have created a custom form display mode my_mode for nodes and wish to display node form using this mode instead of default one at a custom page. How can I do it? ...
3
votes
1answer
93 views

How do you pass more than one node to a drupal 8 route?

I am working on converting a drupal 7 site to drupal 8 for some practice with 8. In my drupal 7 site, I have a custom hook_menu declaration with the following: function solution_menu() { $items = ...
1
vote
1answer
48 views

will drupal 8 twig have inheritance like the old template engine?

Drupal 7 you can style down to the fields on the page will we have this type of control with twig? I have reviewed a lot of documents about twig and didn't see anything that lets you have that same ...
0
votes
1answer
42 views

Cannot clear cache with drush in D8 [closed]

I am working with drupal8. My drush is up to date and the proof is when I try to do drush dl page_manager it says .. Project page_manager (8.x-1.0-alpha2) downloaded to ...
1
vote
2answers
39 views

How to redirect (like D7's drupal_goto) to an external url in Drupal 8?

Drupal 7 has drupal_goto() that would allow redirecting to an external url. The change record indicated that ControllerBase::redirect is the method to be called in D8. ...
0
votes
1answer
24 views

Add content to same page drupal 8

I got a drupal 8 home page wich works fine but all my content on that page is in the same textbox like this image here: How can I make it so I can seperate this content and still show it under each ...
0
votes
2answers
122 views

Override field template (twig)

I try to override a fields template with my own one. The field is called field_test so I created a twig file with the name field--field-test--mynodetype.html.twig in root-theme-directory/templates/. ...
2
votes
2answers
116 views

How to add a project to drupal 8

How do I add a Drupal 8 project (Panels) to my drupal 8 site? I cant find it at the moment and no one got this problem before on google. Does someone have a idea?
1
vote
1answer
49 views

How to render a template in Drupal 8

I am trying to render a template in Drupal 8. In Drupal 7, I would create a theme with hook_theme, make a templates directory in my module, drop the template file in and I could display it with ...
0
votes
1answer
26 views

Unable to create a menu link with Drupal 8

I am trying to create a menu link in Drupal 8. I am following this document: https://api.drupal.org/api/drupal/core!includes!menu.inc/group/menu/8 My module name is twitter_pull and I was able to ...
1
vote
1answer
40 views

Drupal 8 set homepage template

How do I change the Drupal 8 home-page template, so it uses a different template from the regular page.html.twig template?
1
vote
1answer
22 views

Generating Url for a route

I want to use drupal l() function, but Url doesn't work really well with a view with optional argument. The view has a context filter, but it is optional. In the routes table it has path ...
1
vote
0answers
16 views

Manual setup of user's language

I need to switch user's language programmatically. The issue is I don't want it as an url part, and unable to switch it even with the regular language switcher block. What I've try: ...
0
votes
1answer
37 views

Running drush from a minimal shell

My goal is to pipe mail with Postfix into a drush command. I made a simple bash script that redirects stdin to the drush command, and I configured Postfix to pipe mail to the script. But executing ...
4
votes
2answers
54 views

How do I in code add new field values to a D8 content entity?

How do I in code, create a new field value, add it to a content entity, and then have it saved to the DB? Field API is dead. Long live Entity Field API! clearly shows how to read values, but doesn't ...
0
votes
1answer
29 views

Equivalent of file_transfer()?

I am porting a Drupal 7 module to Drupal 8; it has a call to file_transfer($uri, $headers). What's the equivalent Drupal 8 code for this?
-1
votes
0answers
28 views

how best store audio files using drupal 8 and export them using web service?

I would need advice on conception of a audio files database on drupal 8 available on a mobile client using web services. So far I have successfully created a RESTFUL export view containing json ...
0
votes
1answer
47 views

Why after installing Drupal 8 all links to the front page generates 404 error? [closed]

After installing Drupal 8 I get access to the front page but all links generate a 404 error. Why clicking on any links gives 404 error: http://localhost/drupal8/ while everything works fine with: ...
1
vote
2answers
31 views

Writing functional tests for a controller that makes call to external service?

I'm working on the D8 version of the CAS module. To integrate with a single sign on CAS server, this module will have to redirect the user to the CAS server often, and occasionally make cURL requests ...
2
votes
1answer
37 views

Web services for specific node

I know you can enable Web services for content in Drupal8. You also need to set permissions to make a GET request to content. But I was wondering if it's possible to set for each node if it can be ...
0
votes
1answer
29 views

How can enable multiple contact form in drupal 8?

I want multiple contact forms(different fields) in my drupal 8 site Like Webform module drupal 7. I have tried to add multiple contact forms and i am able to number of contact forms with different ...
-4
votes
1answer
74 views

Why Twig and not Blade in Drupal 8? [closed]

I was lately asked the question why Drupal 8 uses Twig as templating engine and not Blade, which is used in Laravel. I couldn't answer the question. But is there a specific reason why Drupal 8 uses ...
1
vote
1answer
112 views

How do you update a Drupal 8 site? [closed]

What is the proper procedure to update a Drupal 8 site from one release to another? Is the process the same as with Drupal 7 and earlier, or are there different/additional steps? When I tried to ...
4
votes
1answer
197 views

Trying to add an html head tag in Drupal 8, beta 2

With Drupal 8.0 beta2, drupal_add_html_head() has been deprecated in favor of #attached. So the old way was: function MYTHEME_page_build(&$page) { $viewport = array( '#type' => ...
1
vote
2answers
50 views

D8: How to perform ajax call in javascript

I'm trying to perform an ajax call from a javascfript file by executing this: $.ajax({ url: '/lunapark/ajax/space-invaders/' + score, success: function ...
2
votes
1answer
31 views

How do I get a hold of the session object in my form handler?

I have build a form in D8 and on submit I want to save the form values into a session, so that I can access them 3, 4,.... page requests later. In D7 I just used $_SESSION['key'] = $value I have a ...
1
vote
1answer
20 views

Drupal 8 and Session Management

I was wondering how to use sessions in D8... There must be a wrapper of some kind so that I don't have to use $_SESSION? I can't seem to find it. Can anyone point me in the right direction? Edit: ...
1
vote
0answers
14 views

Contextual filter on content ID returns 404 in drupal 8 beta 2 [closed]

I'm trying to show a list of all articles available but filter that list by URL argument if that's available. So basically: http://myhost.com/article_listing/ Should show all articles Works ...
0
votes
1answer
32 views

How to edit and delete drupal 8 custom block content?

I am not getting any option to edit my custom block body content and not able to delete also. Please suggest me. Thanks
0
votes
0answers
39 views

Can a Drupal 8 theme leverage block config Yaml files when enabled for the first time?

In my Drupal 8 contrib theme, when the theme is first enabled, a number of system blocks are dumped into the first region that's in my theme's info.yml file. From a UX perspective, this is not really ...
1
vote
1answer
92 views

Drupal 8: How to mimic route handling

In drupal 7 I have a chunk of code that gets the page content by mimicking what drupal does: $router_item = menu_get_item($href); if ($router_item['access']) { if ($router_item['include_file']) { ...
0
votes
1answer
47 views

Drupal 8 custom validate user register

I've created a module for Drupal8 that checks against values in the user register and set an error if the values do no match with something you have entered in a custom form. My module has got a form ...
2
votes
1answer
95 views

Overriding menu.html.twig just for the primary menu

Drupal 8 Beta 1 has a lot of nice templates to use which can be brought into a custom theme and then customized. I brought in core's menu.html.twig into my custom theme and indeed I can customize ...
-1
votes
1answer
28 views

Plain text comments in Drupal 8

In Drupal 8 comments, can I remove the subject field and only have a single plain text box? My goal is to set up something like a ticket tracking system. I will have a the Issue node. But I'd like to ...
0
votes
2answers
157 views

Getting error after install drupal8?

I have installed drupal 8 . During installation i am getting the below error Drupal requires you to enable the PHP extensions in the following list (see the <a ...
2
votes
1answer
40 views

How to attach browser-specific stylesheets in D8?

In D7 it's possible to attach a css file based on browser sniffing, like this: drupal_add_css( $path_to_css, array( 'browsers' => array( 'IE' => 'lte IE 9', '!IE' => ...
1
vote
1answer
39 views

Drupal 8 field API vs. $form_state

I am creating a field with Field API, and having it shown on user registration form. However, I need its value in order to make validation. For that purpose, I've used dpm($form_state) which gave me ...
3
votes
1answer
133 views

Log a user in manually, get session?

A service I have takes a username, and should find and log in a local Drupal user account with that username. After logging in, I need the session ID (from the sessions table) for that users new ...
6
votes
1answer
113 views

How do you Drush download Drupal 8 Alpha via the command line?

I usually download the latest drupal 7 using the command: "drush dl drupal --select" But drupal 8 isn't listed there. What are some nice and quick ways of download the latest version of Drupal 8 even ...
0
votes
0answers
48 views

Creating a custom FieldType (D8)

I'm trying to create a custom FieldType which provides the fields for a complete address (street, house_number, post_code and city). I created a FieldWidget, FieldFormatter and FieldType class and a ...