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
5
votes
2 answers

CKEditor: PasteFromWord ignores pasteFilter

In CKEditor 4.6.2 (currently bundled in Drupal 8) ACF is disabled by default, to make sure some of the special plugins work correctly. So for the record: I do not want to enable ACF and am not able to use allowedContent or disallowedContent. I'm…
Ambidex
  • 755
  • 1
  • 5
  • 27
5
votes
1 answer

PHP read UTF-8 CSV

I have a PHP script that reads from a CSV file, the file is in UTF-8 format and the code below is treating it as ASCII. How can I change the code to read the file as UTF-8? if (($handle = fopen("books.csv", "r")) === FALSE) throw new…
Bishoy
  • 705
  • 9
  • 24
5
votes
1 answer

How do I prevent Drupal from focusing on element that trigger ajax submit?

When ever I submit a form using ajax, the element that triggered the submit gets focus. I don't want this behavior if I'm using infinite scroll and I want to keep the user at the bottom of the page. How do I fix this? Focus returns to this element: …
Je Suis Alrick
  • 3,404
  • 2
  • 16
  • 23
5
votes
2 answers

Drupal 8 module - How to use AJAX?

I'm currently trying to use AJAX (with jQuery) in my Drupal 8 module in order to reload a page when the user types something in a textfield. I managed to get a full HTML page back but I would like the AJAX function to only get the content of the…
Dominique
  • 85
  • 3
  • 6
5
votes
5 answers

Drupal 8 - Adding classes to links

I am new to Drupal and I love it very much. I am learning it on my own but I am stuck on a problem right now. I created a custom block that display a title and a list of links. So the only fields in that blocks are of type links. It's a block for my…
allan00958
  • 163
  • 2
  • 3
  • 13
5
votes
3 answers

Include html text inside a Drupal 8 generated link

I have a hard time to style a link via the Drupal 8 render structure. This link needs to be displayed in my custom module: $add_link = \Drupal::l('' . t('Add new project'), $url); So between de tags I want a Font awesome…
user3411864
  • 624
  • 2
  • 12
  • 27
5
votes
3 answers

Drupal 8 custom module add php classes

I have created a custom Drupal 8 module that works as is with a custom block and block form to collect some info. This is all good. I also have a twig template that I want to render a twitter feed using a php feed class I bought. I just don't know…
Cybercampbell
  • 2,486
  • 11
  • 48
  • 75
5
votes
2 answers

Drupal 8 - Get the image width / height / alt / etc.. in a twig or preprocess file

I'm trying to get the width and height of an image in a preprocess file. I managed to generate the image with a style defined in the media/styles in the admin but I'm not able to render the width and/or height of the generated image (some will say I…
ZyDucksLover
  • 467
  • 1
  • 7
  • 15
5
votes
4 answers

Add meta tag to

I want to add meta tags to my site. I added this code in my THEME.theme file and cleared the cache. /** * Implements hook_page_attachments_alter(). * * Include meta tags and fonts using attachment method. */ function…
Aashi
  • 389
  • 1
  • 9
  • 20
5
votes
0 answers

Updating modules and core ERROR filename, directory name, or volume label syntax is incorrect

I looked at similar questions but I could not find the answer. Context: Windows 10, XAMPP, Git, Composer, Drush 8 and Drupal 8. When I try to use: (For modules and themes update) drush pm-update or (For Core update) drush up drupal I received the…
Peter
  • 2,004
  • 2
  • 24
  • 57
5
votes
3 answers

My custom block doesn't show up in the block library

I am developing a custom module in Drupal 8. It shows data regarding some organizations that make use of our service. For this I have created a Controller that shows data from the database, which is put there by another module. From the scarce…
Jacques
  • 223
  • 3
  • 16
5
votes
4 answers

Custom theme doesn't load theme css file in Drupal 8

I'm making a new theme but have problems loading the css. Though I think it is correct to the documentation of Drupal it doesn't work. I created a folder in /themes/custom/noadin and added the info and libraries files noadin.info.yml : name:…
bond708
  • 153
  • 1
  • 6
5
votes
2 answers

Drupal installation: Set xdebug.max_nesting_level=256 in your PHP configuration

I am following a tutorial here https://www.youtube.com/watch?v=h5i6emqdOgg In between the installation I get this page, where it shows that there are some requirements missing. One of them says Set xdebug.max_nesting_level=256 in your PHP…
paul
  • 4,333
  • 16
  • 71
  • 144
5
votes
1 answer

How to add custom html tag in CKEditor?

I want to add a custom tag like this: text How do I apply HTML properties to a custom tag?
5
votes
2 answers

How to get image url from uri in Drupal 8 template

I'm trying to create my own image field formatter. I've followed these instructions (http://www.sitepoint.com/creating-custom-field-formatters-drupal-8/) and right now I have a working formatter which basically does nothing but "inherits" and…
kivikall
  • 786
  • 2
  • 13
  • 29