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
8
votes
3 answers

How to update or create paragraph fields programatically in drupal8

Below is my solution with an example, that may help you. Update existing field $target_id = 62; $paragraph = Paragraph::load($target_id); $typeform_field = $paragraph->field_archtics_field->value; $archtics_field =…
Debraj nayak
  • 81
  • 1
  • 1
  • 2
8
votes
2 answers

Using preprocess hook on specific node type in Drupal 8

I've had success using preprocess page hooks such as: function mytheme_preprocess_page__node_front(&$variables) { ... } and function mytheme_preprocess_page__node_12(&$variables) { ... } which correlate with custom templates named…
ConorBaumgart
  • 493
  • 1
  • 3
  • 18
8
votes
1 answer

Drupal 8: Video Embed Field library load order for colorbox responsive video

Straight to the real question: What causes videos to be responsive when using Video Embed Field and Colorbox? Is it based on the correct load order of JavaScript libraries? Or perhaps is it something that runs within the Video Embed Video…
Pagri
  • 290
  • 2
  • 10
8
votes
2 answers

Drupal 8 custom block (module) create twig template file

I have a custom Module that creates a custom Block which has field elements. This all works fine but I need to theme this block. I have checked the other posts on here and tried with no luck. I have enabled twig debug and got theme suggestions.…
Cybercampbell
  • 2,486
  • 11
  • 48
  • 75
8
votes
1 answer

How to open a modal in Drupal 8 without using a link?

The modal isn't triggered by a link on the page which the user has clicked. The modal is triggered when the user arrives on the url. Think of something like a disclaimer that pops up as soon as the user arrives on the url.
esod
  • 335
  • 2
  • 9
7
votes
1 answer

Where Drush 9 aliases file should be located in Drupal 8?

I have tried some ways to create an alias for my local Drupal project, I'm referring to : https://www.drupal.org/node/1401522 https://www.drupal.org/project/drush/issues/831272 https://www.drupal.org/project/drush/issues/786766 I can connect by…
Nasser Ali Karimi
  • 4,462
  • 6
  • 34
  • 77
7
votes
2 answers

How do you import config sync files in a Drupal 8 functional test?

I would like to know how to import config sync files in my functional tests for modules I am testing. For instance, I have some custom content types I would like to test against, and there are a number of files in config/sync that pertain to the…
7
votes
1 answer

Should one use google cloud app engine or compute engine or container engine for a large Drupal website migration?

I am aware that Google cloud has an IaaS offering which allows point click installation of drupal sites using Bitnami. But I am wondering how this compares with using App Engine or container engine (instead of IaaS). Per OP-- Large is defined as:…
7
votes
2 answers

Add Entity Reference to Drupal 8 Form Field?

How can users add products to a simple plugin config using an autocomplete field? I tried to use Config Entity but it looks the same as Form API (and I can't use entity fields there).
7
votes
7 answers

How to enable PHP OPcode caching for Drupal 8?

I want to enable PHP OPcode caching for Drupal 8 installation. I have the following in Xampp php.ini. However, I still get opcode not enabled. What am I doing wrong?? opcache.enable=1 engine =…
Hello Universe
  • 3,248
  • 7
  • 50
  • 86
7
votes
2 answers

How do I programmatically set cache age for a module in Drupal 8?

Drupal 8: I have the code for a block successfully doing its work and returning it. The block is called "RacerProfile" and it dumps all its content into variable "$pageContent". At the very end it returns the #markup. Ok. Now how do I tell this to…
MotoRidingMelon
  • 2,347
  • 2
  • 21
  • 28
7
votes
3 answers

How to create a form using block module in drupal 8?

I want build a form using a block module in Drupal 8. I am aware of building the forms in Drupal 7 but the same seems to be different in Drupal 8. Request anyone who has worked on drupal8 custom forms as block to help me.
user3664791
  • 79
  • 1
  • 1
  • 4
7
votes
2 answers

Disable entire cache for development

I'm developing a new theme for Drupal 8. I need to disable all caching mechanisms in Drupal. I found the configuration for twig caching and CSS/JavaScript but not for other things of Drupal (like .theme files, etc.). I found some hints…
TiMESPLiNTER
  • 5,741
  • 2
  • 28
  • 64
6
votes
2 answers

Error 500 (Max Memory Allocated) in new Drupal 8 Installation after changing Display Settings

I have set up a fresh instance of Drupal 8 and installed two modules: Paragraphs (8.x-1.12) Entity Reference Revisions (8.x-1.9) I have also installed the Barrio theme (Barrio 5.5.1.) Then I have gone ahead and created a new content type with two…
Max
  • 207
  • 1
  • 6
  • 20
6
votes
3 answers

Command cim was not found. Drush was unable to query the database

When running drush cim commands in Drupal 8 I get the following error: Command cim was not found. Drush was unable to query the database. As a result, many commands are unavailable. Re-run your command with --debug to see relevant log…
Khalifa Nikzad
  • 1,213
  • 1
  • 6
  • 17