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
6
votes
1 answer

git submodule and fetch

having trouble getting my head around submodules They appear to be unnecessarily complicated. Normally I totally avoid them but a project has forced me into this situation So... I have a git repo on our dev server with a submodule /myproject …
DeveloperChris
  • 3,412
  • 2
  • 24
  • 39
6
votes
1 answer

Symfony PHPUnit Bridge: Get specific list of deprecation notices

Running PHPUnit with the Symfony PHPUnit Bridge listener gives me a yellow box "Legacy deprecation notices (10)" in a custom Drupal 8 module. I would like to fix those 10, but am struggling to get the details which they are (e.g. which line of…
Gogowitsch
  • 1,181
  • 1
  • 11
  • 32
6
votes
3 answers

Drupal 8 Custom Block how to attach JavaScript ?

I have created a custom block successfully and just want to call java script alert function on the block. I have created a .js file .The issue is how to call the function declared in the javascript throgh array render in build function of the BLOCK…
Ankur Garg
  • 61
  • 1
  • 2
6
votes
4 answers

How can I convert a file uri to relative path in drupal8

I'm trying to find the way to convert an uri like public://field/image/link-carousel.png to a relative path sites/default/files/directory/link-carousel.png (of course this is an example because public:// could have other path). How to do…
Moby M
  • 910
  • 2
  • 7
  • 26
6
votes
0 answers

Drupal 8, AJAX to update one block from another

I have two blocks on a page, side by side. On the right is a custom block with an empty div, class="js-view-dom-id-ccd-update". On the left is a view that lists titles as links from a content type ("centers"). When a user clicks on one of those…
Henry H
  • 95
  • 2
  • 5
6
votes
3 answers

How to install third party libraries in Drupal 8 with Composer that are not on packagist?

What is the best way to install a third party library in Drupal 8 that is not on packagist? For example I have the Color Field module, which can use the jQuery Simple Color Picker library to provide a better user experience. The most obvious…
Chris
  • 195
  • 1
  • 4
6
votes
1 answer

Drupal 8 programmatically create a custom form with multiple submit buttons

I have a custom Drupal 8 form that shows a list of users and a "check" button for each user. When clicking a check button, the submit handler needs to figure out which users "check" button was clicked. I've tried this the following way, but it…
user6742604
6
votes
1 answer

Drupal 8 - Image styles not displaying on first page load

I am using Entity Browser to upload images and Responsive Image Styles to display them. I am finding that once a node is created and an image is added, the first time a new user visits the page, the image will not display. A refresh of the page will…
user7180821
6
votes
1 answer

allow new methods in sandbox policy in twig (drupal 8)

I am getting this error when using the "field collection" module : Twig_Sandbox_SecurityError: Calling "uri" method on a "Drupal\field_collection\Entity\FieldCollectionItem" object is not allowed in…
Asma Supih
  • 61
  • 6
6
votes
1 answer

How to install libraries without composer in drupal 8

In drupal 8, I am encountering modules that require libraries to be installed by Composer. However, I was wondering if I could skip the composer part and just install the libraries by hand. Would I ever be able to do this? (I have never gotten…
Chris Happy
  • 7,088
  • 2
  • 22
  • 49
6
votes
4 answers

How can I remove a message shown from a different module?

In Drupal 7, I could use the following code. if ($_SESSION['messages']['status'][0] == t('Registration successful. You are now logged in.')) { unset($_SESSION['messages']['status']); } What is the equivalent code for Drupal 8?
rishabh318
  • 117
  • 1
  • 3
  • 8
6
votes
3 answers

Docker gd module for PHP 7

I've got docker file, which is configured for Drupal 8, but after I fired up "docker-compose up", everything went smooth but in installation of Drupal it's showing me that "gd" module for PHP is not enabled. here is my Dockerfile: FROM php:7-fpm #…
ZeroByte
  • 311
  • 1
  • 5
  • 11
6
votes
1 answer

Is Aegir drupal 8 compatible?

I don't find a clear answer on that matter. Can Aegir ( current 3.3 version ) work with drupal 8 sites ?
Matoeil
  • 6,851
  • 11
  • 54
  • 77
6
votes
1 answer

Drupal 8 Ajax forgetting form changes

I have an issue with multiple AJAX requests modifying a form within drupal 8. Let me explain - I have been trying to build a quiz module within drupal, and decided to use a widget to create a variable amount of quiz questions, within this question…
RobertBourne
  • 71
  • 1
  • 5
6
votes
3 answers

Drupal 8 create field programmatically

I created a custom module for Drupal 8 that allows the users to choose a Content type in order to add some fields programmatically. How I can create some fields (text type in this case) and attach they to a Content type with a custom module? Some…
Alex Pezzini
  • 86
  • 1
  • 1
  • 4