Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [8]

Version tags should be used only for questions that apply to a version only, not to merely say what version a site is using.

-1
votes
0answers
6 views

Dynamic content entity reference

Our team is working on Drupal 8 project where most entities are created from code with Entity API, so-called Content Entities. We have two entities ExternalPerson and InternalPerson which are mostly ...
0
votes
0answers
3 views

Translate Groups on multilingual site

Is it possible to translate a groupsite on a multilingualsite? Or have I do create two groups for that?
0
votes
0answers
13 views

Retrieving menu and turning into an array [on hold]

I'm trying to get the menu and turn it into an associative array in which I will use as webservice. I manage to get it but I encountered an error in getting the subtree. here's what I have done so ...
0
votes
0answers
21 views

How to integrate javascript API for office? [on hold]

I have a requirement that I need to use Office 365 excel as my data source. But I am not able to connect with the Javascript Office APIs. I added like below in libraries.yml: excel.data: version: ...
0
votes
0answers
12 views

How to create a block “Search: More like this” with my articles?

I noticed that in the context filter of the view, there was a filter "Search: More like this". How to make it work? Is this the right solution ? I have a tags field on my articles with taxanomy terms....
0
votes
0answers
15 views

Why did most of my Drush commands disappear? [on hold]

Drush 9.5.2 with Drupal 8.6.3 (updating to 8.6.6 once I get Drush working again). We manage a lot of Drupal 8 sites, but for some reason, Drush stopped working properly on just one of them. Most ...
4
votes
1answer
20 views

How to favor exact matches in entity reference autocomplete?

Right now if you use entity reference autocomplete for short titles of a node type or entity type, and you have many items, due to the fact that by default they are ordered by entity id (nid), less ...
0
votes
0answers
24 views

Highcharts not working

I am using the Charts module for displaying charts in my Drupal project. When I took the chart API example module page, it's not displaying any. It throws me this error (in the console): Uncaught ...
0
votes
0answers
16 views

Problems with CKEditor

For my Drupal 8 website I have encountered a problem with CKEditor (Full HTML) when editing my content. It happens only with images in the body field. After viewing content and going to Edit form of ...
0
votes
1answer
30 views

How do I implement a one page navigation with anchors?

So the specific functionality I'm looking for is a link on one page (e.g. drupalsite/home) leading directly to a specific section of another page (e.g. a section on drupalsite/otherpage). I believe ...
0
votes
1answer
7 views

How to change the 'Quantity' label in commerce-order-item-add-to-cart-form

I'm trying to modify my 'Add to cart' form, changing the 'Add to cart' button text and the 'Quantity' label: if(strpos($form_id, 'commerce_order_item_add_to_cart_form_commerce') !== false) { $...
-1
votes
0answers
20 views

The node parameter was not converted for the path /node/{node}

GET: http://example.com/node?_format=json Enabled RestUI and JSONAPI Using Post when I implement GET request, I get the above error {"message":"The \u0022node\u0022 parameter was not converted for ...
0
votes
0answers
11 views

How to pass the value to multiple(inter) components using React?

Currently working in one of the Drupal 8 project which has React integration. We are using PDB module to integrate React with Drupal. PDB uses React component as a block which can be enabled for ...
1
vote
1answer
40 views

How to make exposed timestamp filter accept human readable date

I'm using Drupal 8. I created a new content type (title, body, image, date). The date is a timestamp field. I used the devel module and the Realistic Dummy Content module to generate a test content ...
-2
votes
0answers
30 views

How to add new field to Node entity itself

I have site with a several views which displays multiple different content types. The results display a different (SVG) icon on them based on the content type. Which icon to display is done with a ...
-2
votes
0answers
9 views

How to start the slider from the image we click?

I have a Gallery kind Feature. For this I have created a Gallery content type, which has 'Media Reference' field a Media entity Browser,which will be able to select images and videos which are ...
3
votes
1answer
22 views

How do I programmatically update pathauto paths for an entity?

If an entity has opted into auto generated paths, you could simply re-save the entity. However saving an entity is particularly inefficient, and the path/routing system runs outside of the entity ...
0
votes
0answers
8 views

What's the best infrastructure to set permissions to user roles that controls who can see which Nodes and which Views?

I'm building a Drupal 8 website that needs pretty stringent permissions. I have already created the (4) user roles for the site, but not sure the best way to handle viewing permissions. I see that ...
1
vote
0answers
33 views

Retain query in search block input

How can I retain the current user's search in the search block input? Please don't suggest a third party module for this unless strictly necessary. I'm also aware of views exposed filter and that's ...
0
votes
0answers
8 views

How to clear the publish checkbox in form or form element validation

I have a D8 form where when a test involving the value of other fields fails, if the publish (field = status) checkbox has been checked the validation should fail and the checkbox should be cleared ...
0
votes
0answers
8 views

How to translate vocabulary name?

Drupal 8 installation in English, German lang was added and set as default, vocabularies are set to English (no result even they are in German too), terms are set to German by default, Content ...
3
votes
1answer
64 views

How can I show the user login block on the 403 page?

With D8, I have a node (content type: basic page) that I use as a custom 403 (access denied) page. I set this as the custom 403 page on: /admin/config/system/site-information. The path is /node/21, ...
-2
votes
0answers
18 views

Unable to print view result in custom template [on hold]

I have created a view in drupal 8 and then I have created a custom template. where I use the 'views_get_view_result' drupal core api. but no result found. Here my code <?php $view_result = ...
0
votes
3answers
18 views

View listing related nodes by taxonomy term

I have a content type representing a book. Each book as a genre (SciFi, Fantasy, Thriller ...) and I would like to expose, on the page of a book some books sharing the same genre. I created a view ...
1
vote
0answers
36 views

Custom template not used for custom entity generated with Drupal Console [on hold]

I have created a custom entity via drupal console, and it created template item_entity.html.twig in template folder, but the entity is being rendered in some other way because any changes in template ...
-3
votes
0answers
35 views

Content Recommendation Options for Drupal 8? [on hold]

It seems like there were several recommendation modules for Drupal 7 (like the recommendationAPI) but as of now none of them have been ported to D8. We're looking for a solution that can take clicks, ...
-1
votes
1answer
32 views

How to let content editors use pre-defined block-like content?

In wordpress (gutenberg), content editors can choose some kind of pre-defined blocks to their content. If I have content editors, that can create new nodes, I want them to be able to add such blocks ...
-2
votes
0answers
23 views

How can I build a Presentation Manager? [on hold]

My project's structure: I'm building a Presentation Manager. A Presentation has a title, an image and Slides A Slide has a type (can either be text, image or video) We want to be able to re-order ...
1
vote
1answer
38 views

Handling directory error with submitted patch

Drupal 8.x MAC OSX + Vagrant 2.2.0 I have a patch submitted to a Drupal project module, and while trying to apply the patch locally I get this error: Checking patch src/Form/...
0
votes
1answer
17 views

Get prefix and suffix from a Number field

So here is my issue; I got a price in a Number (decimal) field in a node, I need to process this number in some ways depending on users interactions then send it back (via an ajax request) as an ...
1
vote
0answers
35 views

How can I add a property definition to an existing field?

I have a file reference field FileItem that has a display and description property but I want to add an extra one. I was hoping I could just override the default widget but I can't use this to store ...
-2
votes
1answer
42 views

Should configuration synchronization be used only between cloned sites?

Can it be used to get configuration from one site to another site which is not a clone. eg: SiteX is installed using composer create-project drupal-composer/drupal-project:8.x-dev SiteX and ...
0
votes
0answers
30 views

Form action as controller method?

I'm trying to fix a form that was created using a twig template. The form was not working because there was no action, nor was the form created using FormStateInterface. It's just a block that is ...
-2
votes
0answers
19 views

Installation from UI repeats unwillingly

Configuration: Docker OS: debian 9 || PHP: 7.2-fpm || Apache: 2.4 Issue: When going through the GUI to install Drupal, it seems to loop initially. I first get the "select language" dialog box, ...
0
votes
1answer
31 views

How to check if view result is empty Twig

To check the field I use the following code: {% if content.field_name|render is empty %} How to check on node.twig if {{ my_cool_view }} result is empty? Is this generally possible in Drupal 8? ...
0
votes
1answer
21 views

How do I create a folder structure inside a view

I have created a view to get the all images that I have used in the website. But it returns as a bulk list. But I have saved the images according to a folder structure. How do I get the images ...
1
vote
2answers
38 views

Why does drupal use .yml and not officially recommended .yaml

Per yaml page https://yaml.org/faq.html they recommend .yaml as file extension but I see drupal uses almost exclusively .yml, how so? And does adding .yaml to file extension even work for drupal 8 or ...
0
votes
1answer
18 views

Migrate content from drupal8 to drupal8 programmatically with Node::load and Node::create

Basicly I want to migrate content from one drupal8 instance to another. they are mostly identical with some small changes. first step is to migrate the content type via drush gen module module and ...
0
votes
0answers
30 views

How to upload a file to drupal using D8 Controller?

I am not using drupal as front end. Instead I am using drupal as backend. I want to upload a file into drupal files folder. Normal upload.php which we use is giving me an undefined $file error. I am ...
-2
votes
0answers
14 views

How to use Feeds to read in users?

I want to read in a CSV file from an older database of customers into my drupal site. Usually when I read in a CSV file I create a content type to hold the information, for example 'Issues'. When I ...
-1
votes
0answers
16 views

Contextual filter in Block

I have created a content type product-review and added a field that is a reference field of taxonomy. Created a view to display all product-review contents. Created a block in the same view to display ...
-2
votes
0answers
13 views

Updating content through webservice

I've created a custom content type that has different field types (date, numbers, entity reference, image) and I need to, once it has content published, update those content fields through a web ...
-1
votes
0answers
18 views

How can I change the css attributes of the sub-item of theme template in my custom module?

I use the system built-in block of "User account menu" in my page. The twig file is core/themes/classy/templates/navigation/menu.html, and this is the html output: <ul class="menu"> <li ...
0
votes
0answers
15 views

Error: Cron has not run recently. But it did!

I have a site (hosted on Acquia) which always return an error about cron not running on the Status report page, but it actually runs regularly and it does all the task attached to it. Cron is running ...
0
votes
1answer
16 views

Change input value on click when there is more than one paragraph

There are two fields on my paragraph. A number field A text field I want to change the value of the text field when I click on the number field. Here's my script so far which is only good on ...
-3
votes
0answers
31 views

Defective occurrences [on hold]

After running manual test on the webform's established throughout various pages, (e.g. home page, contact page), I have acquired the following occurrences: When entering data into the message text ...
-5
votes
0answers
21 views

How to use image in CSS-file of custom theme [on hold]

I have a custom theme. The folder structure is like this: web |-- themes |-- custom |-- mytheme |-- css |-- js ...
-1
votes
0answers
17 views

How can I debug variable output in preprocess_menu_local_action? [on hold]

I found kint() is not available in some preprocess function like _menu_local_action. When I use kint() I get no output in such a preprocess function, but there is an output of array when using print. ...
0
votes
0answers
13 views

Requires Hard refresh of the page to get back broken Images?

When I upload images through media, the image thumbnails on the listing page only appears after hard refresh. Wherever Drupal image style is applied in any page, those page requires hard refresh to ...
0
votes
0answers
7 views

Broken video thumbnail with video embed media module and vimeo upload

I don't know exactly where i'm doing wrong. I have enabled Video Embed Media Module.I have created a media type with video embed type. I have created free basic account in 'vimeo.com' for testing ...