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
0
votes
0 answers

Which hook can I use to update programmatically a product in drupal commerce?

I need to programmatically update a product with drupal commerce. Which hook can I use? And how can I get the value of the variation? If for example I have a field in the product variation which is field_newvar? (In drupal 7 I used …
user1619177
  • 145
  • 9
0
votes
1 answer

How to move a Drupal 8 site to a new server?

I have a Drupal 8 site on an Ubuntu 18.04 server and want to move my site to a new server with Ubuntu 20.04. With Drupal 7 I did these steps Create a set of keys (on the new server) : $ sudo ssh-keygen -t rsa -b 4096 -C root@www-example-com $ sudo…
user13995839
0
votes
1 answer

No such file or directory in Drupal\Core\Asset\JsCollectionOptimizer (Flexslider) Drupal 8

I have a new Drupal 8 site installed and I'm trying to get the Flex Slider module to work. After installing it in /admin/reports/status there is the following error: FlexSlider library not found. Please consult the README.md for installation…
Mark
  • 75
  • 1
  • 7
0
votes
1 answer

Drupal 8 - How do I detect whether any contact forms have been created?

Context: On my Drupal 8 site I'm trying to add in a new section containing a view that lists out all forms. The user can then click on one of the form and it launches a download of all the messages sent through that form. However that section should…
ConorBaumgart
  • 493
  • 1
  • 3
  • 18
0
votes
1 answer

Drupal 8: How to add a custom action button to download all users in custom CSV, A general button anywhere

Drupal 8: how to add a custom action button to download all users in custom CSV, A general button anywhere . ( see the capture ) Screen admin view users
tafokt
  • 1
  • 1
0
votes
1 answer

Creating a custom theme with drupal

I am learning drupal and want to create a custom theme for my project. I followed the instructions and created the project structure iseed.info.yml name: iSEED type: theme description: 'Learn to build a drupal theme' package: Core # version:…
Alaksandar Jesus Gene
  • 6,523
  • 12
  • 52
  • 83
0
votes
2 answers

How can I override core misc js in drupal 8

I have a problem with dialog in drupal 8, and I found a place that make me stuck. There is a code in this file not work as my expected. Please see the image I just want to do the simple thing is comment the line out like below: I can't do this…
Pham Quang
  • 129
  • 1
  • 8
0
votes
2 answers

Consuming rest api with Drupal

I need to consume a rest API in my Drupal website and display the data as a table. Can you suggest me to how to do that ? I am new to Drupal so need to know where I need to add the custom code to fetch data and also I went through couple of modules…
0
votes
1 answer

Class not found for custom plugin block when trying to do dependency injection

I'm attempting to create a custom plugin block in Drupal. When attempting to actually access the services that I've registered I continue to get the following exception: NOTICE: PHP message: Error: Class 'Drupal\MyNamespace\MyRegisteredService' not…
Ben
  • 733
  • 8
  • 25
0
votes
1 answer

In drupal 8 custom module, Create Excel file, wirte data and lock file with password?

I want to create excel file with password. $library = libraries_load('PHPExcel'); $objPHPExcel = new \PHPExcel(); $objPHPExcel = \PHPExcel_IOFactory::createReader('Excel2007'); $objPHPExcel =…
Mukunda Bhatta
  • 581
  • 3
  • 14
0
votes
1 answer

How to limit access to a store page to the store owner?

I created a custom module to create a /store/ID/tasks page https://www.drupal.org/project/commerce How to limit access to this page to the store owner ? If the current user is owner of store ID 76, he can access this page : /store/76/tasks But if…
user13995839
0
votes
1 answer

Drupal 8 - Accessing a referenced entity through $fields (implementing validation on node creation)

Within a custom module, I'm working on validating a field based on an entry from another field. The validation works when the hash is hard coded (i.e. // $bookhash = 1;). However, I cannot seem to figure out how to access hash of the referenced…
0
votes
1 answer

Drupal 8 custom theme, twig and template

I want to display all authenticaed users in a custom template with a custom twig file. All works fine, except that the twig file is not recognized or loaded. My module name is "ThemeLoader" Here are my files In…
Tarek EZZAT
  • 333
  • 1
  • 5
  • 15
0
votes
0 answers

Drupal 9 - form in custom module using Controller - html tag form not present

I'm trying to render limited user edit form on custom page using Drupal Controller. In the routing.yml I defined _controller, I do not want to use _form. I want to display on the form e.g. only timezone field, but not the rest. And I'm not able to…
0
votes
1 answer

Adding modules/themes to a platform after it has been built

New user here... Installed D8+Civi by building a composer based git repo for the platform then stamping out a few test sites. It worked really well. But now I am at the point of realizing I missed a few modules and I want to add some themes to apply…
HeneryH
  • 95
  • 1
  • 8