Drupal 8 is the latest version of Drupal. Avoid using it as the only tag, unless your question is only specific to this version, and does not involve non-core features, or core features that already have their tags.

learn more… | top users | synonyms (1)

1
vote
0answers
19 views

Why is cache_render very big?

I am having a big problem with a newly created Drupal 8 site for a theater. After going live we discovered that the cache_render table grown extremely big, and extremely fast. After one weekend, it ...
0
votes
1answer
12 views

Creating a watchdog log when publishing status changes on my own ContentEntityBase

I have a hierarchy of Entities derived from ContentEntityBase. Now I want to create a log when the publishing status ( = status field) changes. What is the best method to override/implement for this ...
0
votes
0answers
6 views

Ideas for notification of map events occurring in some user defined area?

I'm in charge of a full stack D8 (customer requirement) based project. It's mostly a Leaflet's web mapping application. The Leaflet part itself is almost done and it looks beautiful, fast and powerful....
0
votes
1answer
15 views

How to alter body of contact form?

When submitting a message in my site contact form in Drupal 8.x I have printed a message print_r($message['body'][1]);die; //in my modulename_mail_alter(&$message) I get the following ...
0
votes
0answers
9 views

Articles not fully transfer

I upgraded my Drupal 6 to Drupal 8. While I was upgrading, there was some images can't be transfer. In the same time, my articles were not fully transfer to Drupal 8. Total articles in Drupal 6 is ...
0
votes
2answers
17 views

Constantly getting “The website encountered an unexpected error. Please try again later.”

I wondered if I can get some advice regarding working with Drupal 8. I've tried installation after installation and sooner rather than later I'm effectively bricking the installs by just installing ...
1
vote
1answer
10 views

How do I build a view of menu items? [on hold]

Scenario "landing page" content type, with node 1 at path node/1 corresponding menu item A (with path node/1) children menu items of this menu item, B, C, D (with arbitrary paths http://google.com, ...
3
votes
1answer
21 views

How do I change the default '- Any -' option in views exposed filter?

I have exposed filters in a view as select lists. How can I change the text for the default filter option of "- Any -"? In previous versions it was suggested to use a preprocess function like this: ...
1
vote
1answer
15 views

How Can Create Node Info Bar (or Node Info Block)?

I want to create a teaser with belove sections: 1- Title Section. 2- Information Section (Info Bar): When this Node Writed? (Date & Time). Whom is writed this Node: (Author of Node). What ...
1
vote
1answer
22 views

Disable the Comment module

Is there a way to disable the core Comment module in Drupal 8? The module is enabled by default, but I prefer not to use Drupal comment system and would like to not have it clutter up the GUI for site ...
1
vote
1answer
20 views

Modal form instead of redirect

I have a site-wide contact form setup that redirects the user to the homepage and posts the submission result to the help section. It works as intended, but I was wondering what I would need to do to ...
0
votes
2answers
20 views

How to attach custom CSS to a Views output?

I created a View to list a custom entity content. I'd like to add my custom CSS file to the generated page. I tried to use a Text Area in the footer with {{ attach_library('amap/yyy') }} where amap is ...
0
votes
0answers
25 views

Allowing cross-site AJAX in Drupal [on hold]

I'm working on wrapping a JavaScript library to use it in a Drupal site. This module can use cross-site AJAX calls to get data from an outside server. My module works inside Drupal when I hard-code ...
0
votes
0answers
12 views

Zurb Foundation 6 Drop dowm menu problem

I am creating a theme with Drupal 8, and I am having a problem with the Foundation drop down menu. I included Zurb foundation with Gulp and NPM. I think the problem is with the Foundation JavaScript ...
0
votes
2answers
24 views

How do I set start date with the core date field?

I need set the start date (e.g. now +1) for my date field. How can I do this on Drupal 8.1.x?
3
votes
2answers
40 views

How to template a view and be able to manipulate the content with it?

I'm wondering if there's a way to template a View, and actually be able to manipulate the content within it. I know I can theme the 'wrapper' around the View, but I'd like to be able to override what'...
0
votes
0answers
19 views

How to create Poll Question programmatically with multiple choices [on hold]

Please find the below code and please help me to do the same. $poll = Poll::create(array( 'id' => 'poll', 'uid' => '1', 'question' => 'What is your favorite color?', 'choice' => ...
0
votes
0answers
28 views

How to give load page iframe in form elements? [on hold]

I have a iframe form element in the form builder class as follows . But it html pages are not getting loaded. This is the code I used. 'example one' => [ '#type' => 'inline_template', '...
0
votes
0answers
25 views

Recommended file permissions for Drupal 8

In continuation to https://www.drupal.org/node/244924 which is for Drupal 7, is there a script which sets the right permissions for Drupal 8. On the same lines I was thinking how can we take care of ...
2
votes
0answers
37 views

Block Plugin Derivatives Discovery

I need some help with my code. I am creating blocks dynamically using the plugin derivatives. I store some form data in a database table, then I display it in each block separately, depending on it's ...
1
vote
1answer
23 views

how theme/template connected/related to each other

for example, I have: module id: module_id (file: module_id.info.yml) FieldType ID: FieldTypeID (file: /src/plugin/Field/FieldType/FieldType.php) FieldWidget: FieldDefaultWidget (file: /src/plugin/...
0
votes
0answers
16 views

PHP and MySql Update for Drupal 8 [on hold]

I have a vps in which some of my drupal 7 websites are running on php 5.3.3 and MySql 5.1.7. I want to install a Drupal 8 website in the same server but i read that Drupal 8 requires minimum PHP 5.5.9 ...
-1
votes
0answers
22 views

How to provide string translations in a custom module [on hold]

I have a custom Drupal 8 module where I am using some strings for user messages. And the site is multilingual. So I want those messages should be available in other languages. How can I provide those ...
1
vote
1answer
37 views

How do I allow regular non-admin users to view other users' emails?

Email is now an included field in core, but the stock email for users seems to be set to private; only users with administrator privileges or the user themselves can see. I'd like to allow other ...
3
votes
1answer
39 views

Render node author profile image in node template

I am working on customization Node template file in Drupal 8, I added another field to user in admin/config/people/accounts/fields ( my field is field_bio). Now I want to render author image( with ...
1
vote
0answers
21 views

How to correctly denormalize a node with paragraph fields

I am trying to programmatically move some content from one site to another using normalizers from the relaxed module. So far it's working great but when I am trying to deserialize paragraphs entities ...
0
votes
0answers
24 views

Call a method defined from another module gives a PHP strict warning [on hold]

This is my controller in a custom module and I have a static method just like this. class ABCController extends ControllerBase { public function myStatic(ContainerInterface $container) { ...
1
vote
1answer
23 views

Change date format on editing

I'm using a date field on my custom type, if I use "select" widget for node editing, I can choose only between "YMD","MDY" and "DMY" formats. Is there a way to add custom formats? I need an "only ...
0
votes
0answers
16 views

Creating a layout

I'm trying to use Panels and Page Manager in Drupal 8. My current versions of each are: Page Manager: 8.x-1.0-alpha23+12-dev Panels: 8.x-3.0-beta4+41-dev My current problem is having no idea how ...
0
votes
0answers
15 views

Fetch a value of field from field settings form in hook_preprocess_field()

I am inserting the fields from hook_form_FORM_ID_alter() in field config edit form. Now I want to get this value of field in hook_preprocess_field(). How can I achieve this? function ...
0
votes
1answer
10 views

Installation keeps complaining that Unicode library (mbstring) should be disabled, even though it seems it already is

I'm trying to install Drupal 8.1.3. (Apache 2.4.7, PHP 5.5.37, Windows 7) In the "Verify Requirements" step Drupal keeps complaining Unicode library -- Error -- Multibyte string input conversion ...
0
votes
1answer
61 views

Can we upgrade a site directly to latest version (without an extra fresh site)?

As far as I understand, the only way to upgrade Drupal (core-only) sites today is with having two sites: One is the Drupal 7 site with its own folder, and another which is a fresh Drupal 8 site in ...
0
votes
1answer
35 views

How to add a class to the site logo of the system branding block

I'd like to add a class of 'svg' to my site_logo img itself using template preprocess. Here's what I have written: function mythemename_preprocess_block__system_branding_block(&$variables) { ...
0
votes
0answers
18 views

Twig paragraphs

I have a node "release" that has a paragraph "field_tracks" which has fields such as "field_track_number", "field_recording_time", and "field_track_title". I'm new to twig and I cannot wrap my head ...
1
vote
2answers
30 views

Prevent block from caching

I have a custom block that reads information from the database. As the user will be filling out a form, refreshing the page and viewing the block it cannot be cached. How do I fix this? I have tried: ...
-1
votes
0answers
16 views

How to fix my Drupal 8.1.3 error after disable cache? [on hold]

I try to use Drupal 8.1.3 and I'm a beginner. Each time I try to disable cache on my localhost sites there is an error message and i don't know how to fix it i have the full privile on settings.php i ...
1
vote
1answer
15 views

“You don't have permission to access / on this server”

I'm running my local development sites on a Windows machine with Uniserver. I have them all set up as vhosts and they work fine with Drupal 7. Recently I decided to install a vhost with Drupal 8, but ...
0
votes
1answer
16 views

Adding markup to fields in block plugins

I'm attempting to create a block plugin that renders nodes retrieved from a query. I'm able to successfully get the node id's and field values from the query but I'd like to wrap each item in divs and ...
0
votes
1answer
6 views

text_format field value not appearing in full_html mode

I'm using a block plugin to display content based on what the user inputs into a form. Select boxes, and radio buttons are saved and displayed in the form just fine but the text_format field isn't ...
0
votes
1answer
21 views

Migrating a changed view

I've created a view that I then turned into a 'Feature.' I then successfully added this feature to a second site by copying the module files from the first site into the module folder of the second. ...
1
vote
0answers
16 views

How can I provide support for a non-core field type?

What is the necessary implementation to add support for a field type so that it is picked up by the core migrate_drupal upgrade process? For example, the Weight module. It provides a simple field ...
0
votes
0answers
12 views

Programmatically create a node with a menu link

I created a node programmatically with the following code. $data = array( 'type' => 'inception_article', 'title' => $msg->name, 'body' => array( 'value' => $msg->body, ...
0
votes
2answers
20 views

Drush cr command error's [duplicate]

I am using drush for drupal caches clear, module enable/disable and so more commands. My drush version is 5.4, it working fine for drupal 7 but now i creating new product in drupal 8. I am using same ...
0
votes
1answer
28 views

What might cause my “User error” in Watchdog?

I'm trying to figure out the reason behind this "User error" in watchdog User error: "0" is an invalid render array key in Drupal\Core\Render\Element::children() (line 102 of /core/lib/Drupal/Core/...
0
votes
1answer
19 views

The correct way to change the name of the language in the language switch

I try to change the name of language in language switcher from Chinese, Simplified(简体中文) to 中文. Changing name in admin/config/regional/language/edit/zh-hans affects only English. So the language ...
0
votes
0answers
20 views

Drupal 8: Add fields from another form to a existing form in a widget

I am trying to build a module that provides a widget. The widget is based on FileWidget and I would like to add some fields from another form to the existing FileWidget form. I would like to save the ...
0
votes
0answers
10 views

Contact Form make uploaded files permanent

When I upload some files through submitting a contact form the files uploaded are marked as temporary (status 0 in the database). Where can I find the setting to store these uploaded files ...
0
votes
0answers
33 views

How do I extend a configuration form without using hook_form_alter()? [on hold]

For last few days I am working on a Drupal 8 configuration form. I have created a config form in a module say custom_1 and now I want to add some more fields from another module custom_2. Custom_1 has ...
1
vote
1answer
20 views

how to make url string absolute?

In order to get entity link, I'm using: $entity->getTranslation($language)->url(); So it gives me : /en/node/21 But I want this url to be absolute. How to pass $options = array('absolute' =&...