Questions tagged [drupal-8]

Drupal 8 is the Drupal version that was officially released on November 19, 2015. Rather than using this tag, consider posting your question directly on https://drupal.stackexchange.com/.

Drupal 8 introduces major changes, such as the support for HTML 5, better support for web services, multi-language support, mobile devices, and a configuration API.

Use this tag only if your question relates specifically to this version.

Requirements

  • Web server: Apache, Nginx, or Microsoft IIS
  • Database server: MySQL 5.5.3/MariaDB 5.5.20/Percona Server 5.5.8 or higher with PDO and an InnoDB-compatible primary storage engine, PostgreSQL 9.1.2 or higher with PDO, SQLite 3.6.8 or higher
  • PHP: PHP 5.5.9 or higher

Related tags:

Resources

2837 questions
4
votes
2 answers

How to disable Personal Contact Form display in User Registration

I am new to Drupal 8. I am setting up a simple site and do not want to allow users to contact each other. However, I do want to use forms such as Register for an event. I have updated the user registration form by adding additional fields, such as…
user761100
  • 2,171
  • 4
  • 23
  • 31
4
votes
1 answer

Drupal 8.3 Custom Rest POST Error BadRequestHttpException: The type link relation must be specified

I have try to create a Custom REST POST plugin in my Drupal 8.3.2 for get an external JSON and then create an article from that. I have follow that guide: How to create Custom Rest Resources for POST methods in Drupal 8 And this is my…
Mettek
  • 409
  • 6
  • 13
4
votes
1 answer

need to set headers on guzzle request

I need to add the type of headers to the guzzle request below, but cannot figure out how to put it in without getting an error This is what I want to add : $command->set('command.headers', array('content-type' =>…
user7938981
4
votes
2 answers

How to load User Profile Type in Drupal 8?

I would like to load user profile module data by user id: Code: $profile_type = 'my_profile'; $user_id = 1; $current_user = User::load($user_id); $active_profile = $this->entityTypeManager()->getStorage('profile')->loadByUser($current_user,…
Ashwin Parmar
  • 3,025
  • 3
  • 26
  • 42
4
votes
2 answers

Drupal 8, hook_preprocess_ page by route

I have the following code in a Drupal's 8.2 my_module.module file. /** * Implements hook_preprocess_page(). * */ function my_module_preprocess_page(&$variables) { if( \Drupal::routeMatch()->getRouteName() == my.route…
4
votes
2 answers

Document Management in Drupal 8

Looking for a good document management solution in Drupal 8. I have seen some modules but none of them seem to be active. I've also considered Alfresco-Drupal integration but the drupal module seems to be unmaintained as well. What other solutions…
Mel
  • 3,058
  • 4
  • 26
  • 40
4
votes
2 answers

Drupal 8: How to render a media entity in the WYSIWYG using Entity Embed module?

Question: How to render a media entity in the WYSIWYG using Entity Embed module? I have installed the following modules: Media Entity Video Embed Field Video Embed Media (which was bundled w/ Video Embed Field) Colorbox Entity Embed I created a…
Pagri
  • 290
  • 2
  • 10
4
votes
1 answer

Use httpClient - Guzzle for Drupal 8 custom module

I'm developing a Drupal 8 custom module. I have two fields (url and text html fields) in any node type. This is the features expected by the module: The module will scrape the page of the "url field" and copy the html code to paste them in the "text…
Maz_laria
  • 41
  • 1
  • 3
4
votes
6 answers

Drupal8 Twig - convert string to integer

I just started using twig in drupal8. I'm trying to calculate the difference between two numerical drupal8 variables using views. field_goals_for: 24 field_goals_against: 3 field_goals_difference: should return 21 but returns 1 I tried already…
ciaobetty
  • 93
  • 1
  • 1
  • 6
4
votes
3 answers

Drupal 8 restresource: No route found

I am trying to create a rest endpoint. The way i do it is i first create a module with drupal generate:module then add the rest dependency and then create a restresource with drupal generate:plugin:rest:resource. This all works fine, the endpoint i…
Nylsoo
  • 159
  • 1
  • 2
  • 11
4
votes
2 answers

Drupal 8 external/custom authentication provider

I am experimenting with Drupal 8 as our customer websites. Our customers authenticate through our own authentication application at the moment which speaks to our document store (instead of MySQL) to authenticate a user and provide them with a…
Kal
  • 2,239
  • 6
  • 36
  • 74
4
votes
1 answer

How to enter list of tags longer than 1024 characters in Drupal 8

How can I increase maximum limit of characters for tags field? or any other "Entity reference" field The problem is, when I create content I can not enter keywords in that field once I have reached 1024 characters in total. Found this limit in file…
vasja
  • 41
  • 3
4
votes
1 answer

Which Drupal 8.1.x Rest API property in the JSON request controls Drupal's File status (Temporary and Permanent) logic?

Which Drupal Rest API property in the JSON request controls Drupal's File status (Temporary and Permanent) logic? I am trying to upload via Multipart/form-data (i.e. JSON data plus attached [uploaded] file) to Drupal 8.1.x CMS. So far, the upload is…
user2120188
  • 427
  • 1
  • 4
  • 16
4
votes
2 answers

Drupal 8 fetch content and serve without header/footer

I'm working on a Drupal 8 site where I have a custom module/block that fetches content from another server and injects it to a div. When a user clicks on a link (like read more) from the injected content, I need to serve the content (full html page)…
chatu
  • 305
  • 5
  • 13
4
votes
2 answers

Drupal 8 custom registration form

I try to build a custom registration form which should be displayed in a custom block and I don't want to insert the normal registration form and alter it via a hook or use an extension like form_block, because I want to learn the ways how drupal 8…
bambamboole
  • 577
  • 10
  • 30