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.

0
votes
0answers
5 views

Does an ajax callback work within a Views style plugin?

My module has a custom Views style plugin. In the style settings form, I want to implement an ajax callback, such as described here: https://www.drupal.org/docs/8/api/javascript-api/ajax-forms ...
-2
votes
0answers
23 views

Moving images to another location when entity update

I have an image field in my content type and when I upload image it will save to a location as expected. Now I want to move that saved image to another location when entity inserting or updating ...
0
votes
0answers
9 views

Convert content types to forum topic types and view in the forum tables

I want to migrate a site from Drupal 7 to Drupal 8. All right, perfect import. However, on the Drupal 7 site I populated some forums through RSS using the Feeds module. But the transfer from Drupal 7 ...
-2
votes
0answers
13 views

Import images from RSS with Feeds module without Feeds Image Grabber

I'm passing all the sites from D7 to D8 and so far so good. But one of my sites gives me a couple of problems. I was populating the RSS site in Drupal 7 using Feeds Image Grabber. Now, Feeds Image ...
0
votes
1answer
12 views

Migrating input formats causes errors

I am trying to write custom migrations to migrate my Drupal 7 website to Drupal 8. I am currently using Drupal 8.6.7 and Drupal 7.61 for a copy of the production website. So far I have set up the D8 ...
-1
votes
1answer
23 views

How to place after each 5th item in a view a different content type?

I want to create a view with news which outputs another content type after every 5th result, in my case a newsletter subscription. How can I do this?
0
votes
0answers
35 views

How to print “Time” field in twig template

I have a time field in my content type. But when I entered time in the format 05:00 AM, I get a five digit timestamp eg. 18000 (for 05:00 AM). When I print this using node.field_time.value|date('h:i ...
0
votes
0answers
6 views

User profile local task link

How can I create a link with comments/%user in the local task in user profile page for all users. This want to include it after the "Edit" and do it programatically in the .theme file. . If I try ...
1
vote
1answer
21 views

Conditionally register a user based on fields

I have a Drupal 8 User registration form that has several text fields to gather information about the user. I'd like to write a custom hook that examines the values in those fields and then either ...
0
votes
0answers
20 views

Views block doesn't show up at the user profile page

I created a views block and try to make it appear on the user profile page. I did the following steps, but it doesn't show up: Block layout -> Place block Tab Pages: Select "Show for the listed pages ...
0
votes
2answers
19 views

Module with block plugin not using custom template

I am struggling to get my custom module template to get use by by block plugin. I have followed the solution given at: Twig Template for a Custom Block Plugin but continually get this error: The ...
0
votes
0answers
15 views

How can I submit a value to the Poll module via POST method?

I am using Drupal 8 and I have installed the Poll module. I created a view to show polls and exposed that view to REST. I am able to get polls (using the GET method). How can I post a poll? ...
-1
votes
0answers
15 views

How to fix add custom currency sent error PHP

Hi my dear drupalian friends I have a problem with the currency module when I want to add custom currency and when i want translate in specific language Error: Call to a member function getSign() on ...
-4
votes
0answers
15 views

Programmatically get labels from webform [on hold]

it may require loading the webform programmatically (not a submission, the form itself) then using x-debug to see what is returned there will probably be an array in there some place that we can loop ...
0
votes
1answer
17 views

How to increase the size of the field in Search API?

I am using Search API for my drupal 8 website, after indexeing some fields (interested in entity reference type fileds), in the database I can see that my field field_name:entity:title gets trimmed, ...
0
votes
1answer
26 views

How do I get the field definition of a paragraphs image field

I need to get the resolution of the image using getFieldDefinitions(). For normal fields I can get the field definitions with below. $fieldDefinition = \Drupal::entityManager()->...
0
votes
1answer
16 views

redirecting midway out of a webform wizard

I am building a webform that has multiple pages. The idea is that the user leaves the wizard after each page that he submits. When he later returns, he automatically starts the form on the unanswered ...
0
votes
0answers
27 views

“Broken pipe” between Nginx and PHP-FPM

On 6th January, I updated my Drupal 8 development system (composer update). The following ls listing shows the modules that were updated. drwxr-xr-x 7 drupal8 www-data 4096 Jan 6 02:36 checklistapi ...
0
votes
1answer
25 views

Can we move a module from the directory “/modules” to the directory “/modules/contrib” without uninstalling it?

We have a Drupal 8 application which has modules directly in the directory "/modules" on the file system. I want to move a contributed module from the directory "/modules" to the directory "/modules/...
0
votes
0answers
33 views

How to turn off Twig debugging for a views feed?

I am trying to build a calendar rss feed from views. The rss.xml is being generated, but it doesn't appear to be accepted as a calendar rss on local systems. When I look at the source, I see it's ...
0
votes
2answers
33 views

Access Node image within Page template

I need to access a Node's image field within the page.twig.html template in order to display it in relation to certain page-level elements such as primary/secondary menus and the page title. In node....
0
votes
1answer
19 views

REST API Guzzle POST gives timeout but the same call works if I run it on the server cli

I have Drupal running in a docker container and nginx running in another container. When I do the login call through postman or directly on the webserver cli it works perfectly. But when I do call ...
0
votes
1answer
22 views

Why is “drush make” installing a library in /sites/all/libraries instead of /libraries?

I am trying to allow prospective users to demo my module on simplytest.me, however, it requires an external javascript library. I recently created a drush make file for the D7 version of this module, ...
0
votes
1answer
30 views

Hiding menu item depending on specific access

I work on a D8 (8.6) I want to hide some item on my menu depending on route param onto this link. When I try to access the route I get a 403 error and works as expected but the the link inside the ...
0
votes
1answer
26 views

Clear region with menu's per url cache

I have a region with menus, a menus displays depending on the url example if on the about page(sitename/about-us), display about menu and links as a sub menu. It works, but the problem is after ...
-4
votes
0answers
22 views

Programmatically remove role from group member [on hold]

function MY_CUSTOM_MODULE_entity_insert(Drupal\Core\Entity\EntityInterface $entity) { $entity_type_id = $entity->getEntityTypeId(); switch ($entity_type_id) { case "group": $...
-1
votes
0answers
24 views

addExpression combining CASE and CONCAT [on hold]

I have a D8 query where i join several tables and use addexpression with CASE to make a new conditional field. So far so good. For one of the WHEN conditions I need to construct this field from two ...
-1
votes
0answers
23 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 ...
2
votes
1answer
16 views

How to translate Groups in a multilingual site?

I have created a new grouptype and added some fields to have a "site". And then created a new group with this grouptype. I edited the overview site with some information. Now I would like to translate ...
0
votes
0answers
21 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 ...
-1
votes
0answers
30 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
22 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
25 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 ...
-1
votes
0answers
29 views

How can I track a user poll in poll module?

I am using Drupal 8 I need to do polling so I also installed the Poll module. How can I track the polls? That means how can I track which user vites for which choice? Is there anything that can do ...
0
votes
1answer
39 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
17 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
33 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
21 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
12 views

How to pass the value to multiple(inter) components using React? [on hold]

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
47 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
10 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
29 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 ...
1
vote
2answers
42 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 bsite 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 when creating ...
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 ...
4
votes
2answers
81 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 = ...