All Questions

-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": $...
0
votes
0answers
16 views

Formatting Paragraphs in json in my drupal powered REST API

I'm using Paragraphs to organise my content. A Project has many paragraphs. Each paragraph can be of type Text or Image (thanks to the paragraph type feature). I want to expose my content to a REST ...
-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 ...
-2
votes
0answers
19 views

How do I make a Panel visibility rule work when the element to check for has to be empty or not set?

I end up with the visibility rule completely hiding the element that is supposed to show. E.g. I want to hide a "New custom content" when taxonomy term for the field "Alternatives" has not been set, ...
-1
votes
0answers
25 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
2answers
19 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
22 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: ...
2
votes
1answer
151 views

Why am i getting this Drush error after updating a site? [on hold]

I use Drush 8.1.17 to update my Drupal 7 sites, and as I have been updating my sites today after the latest security update I have noticed that after I update a site if I try to run any update related ...
0
votes
0answers
25 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 ...
0
votes
1answer
16 views

Help with view filters

I have a view using one content type: fee_schedule The view contains fields for species, keywords (hidden), and the title. The filters need to show ALL species except when searching by keywords. The ...
1
vote
1answer
43 views

How to pull out Twig variables?

Trying to use some Twig variables (simple strings) in a template that I created from a custom module. Using the Devel and Kint modules I can see the info under Iterator contents with: {{kint(...
0
votes
2answers
14 views

Views Contextual Filter by taxonomy in field collection

I have a Drupal 7 project I'm working on that's got me stumped. I'm building a site where the node (Decals) are applicable to models and years (This decal is correct for this model of this year). ...
0
votes
0answers
10 views

Is it possible to create an Ubercart Orders view that includes line item details?

I would like to create a View of Ubercart Orders that includes details about the order itself -- collecting the various line items into a single column. Ultimately this will be used to generate a ...
2
votes
1answer
22 views

Using the fetch() method in database query to get an array

I have a very simple query that does the job, to get a collection of a specific content type's node id and title, that's it. $connection = \Drupal::database(); $query = $connection->select('...
4
votes
1answer
26 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
22 views

Kep getting “access denied” when using a “user-cancel” link

I'm developing a simple troubleshooting menu on Drupal 7 to allow users request a new password or cancel their account depending on some factor. To do so I basically call $mail = drupal_mail('user'...
-1
votes
0answers
30 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
40 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
13 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 ...
0
votes
1answer
22 views

How to fetch field value via REST

I am using Drupal 8. I have installed the Rest module. I need to do polling so I also installed the Poll module. I created two questions with choices in poll and after that I created a view to show ...
-1
votes
1answer
17 views

How to Search Content in Views?

I have created a view to list all the contents I created. I need a search field in the view to search for contents. I tried the search module and when I search using one of the content names, it ...
1
vote
1answer
49 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
2answers
19 views

Adding extra buying option to product

I need to add extra buying option with some price in Create Product (Add a product). If a user checks on extra buying option then they need to add the price and that price will be again added to ...
0
votes
1answer
16 views

Trying to display or render values from links field within paragraph field base on its current language

I'm currently using Drupal 8 Paragraph and I'm trying to figure out how I can display or output the url and title of a link field from within a Paragraph base on the current language via preprocess. ...
-1
votes
0answers
17 views

Starter template doesn't work [closed]

I am using windows 10 with Composer 1.8.0 and Xampp. I am trying to install the Composer template for Drupal projects - https://github.com/drupal-composer/drupal-project I am able to create the ...
0
votes
0answers
15 views

Adding a “Clone” link in view fields

I'm trying to add a Clone link in view fields, and I get the column in the result, but no link. I added n/a in the No results text, and I indeed get n/a displayed. I guess the node doesn'...
-2
votes
0answers
17 views

Conditional default value [closed]

It´s possible to set default value in a text field according to the chosen value in a select field. For example: Select field values: administrative / engineer / boss Text field values: if "Select ...
-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
1answer
14 views

Add 'duplicate' link in view fields [closed]

/admin/structure/views I need to add a 'duplicate' link to a view See the following image to add 'edit' link to a view This is result in: I would like to add a duplicate link as well as edit How ...
-2
votes
0answers
17 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
30 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 ...
0
votes
0answers
16 views

How to configure Flysystem Sync

I need to sync my 3 years site to send the files to S3, since we are moving for Amazon simple storage solution Its been hard to find in documentation and the module issues how to do it I located ...
0
votes
1answer
28 views

Composer won't update Drupal Core, can't determine what is stopping it

I am trying to update Drupal Core 8.6.3 to 8.6.5 (which is the latest Core update at time of writing this). If I CLI this: composer update drupal/core --with-dependencies Then Terminal completes ...
2
votes
2answers
39 views

Automatic username generation from name fields at registration

Drupal core 8.6.5 I am trying to change the user registration process to omit the username field and generate the username from the first name and last name. Since I am new to Drupal and want to ...
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
12 views

Ability to migrate or import/export paragraph bundle from one site to another

I have several custom paragraph bundles containing a large amount of customization. I do not want to re-create them. Is there a module that allows me to export a paragraph bundle and then upload it to ...
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 ...
-1
votes
0answers
10 views

Importing configuration fail because modules does not exist

When updating a config setting and saving, I am getting an error I made the changes to the config setting and then ran Import the listed configuration changes? (yes/no) [yes]: > yes afterwards ...
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 ...
0
votes
0answers
15 views

Drupal 8 Install.php mysql connection fails

I am unable to connect to mysql database during application install. I am able to connect to mysql from shell though mysql --protocol=TCP -u dbadmin -p # this works. I recreated the user and ...
0
votes
0answers
14 views

Reuse entered field value on next page [on hold]

I would like to show on my second page of my Drupal Webform a value which I entered on the first page. On my first page I have a combobox in which I choose a specific value. This value I would like ...
0
votes
0answers
13 views

Commerce Recurring Order Item Types not showing in product variation dropdown?

I have installed the commerce 2 recurring module and following the documentation I should be able to select the Order Item Type when creating a new product variation. However the dropdown list only ...
0
votes
1answer
18 views

How to display custom fields of taxonomy in field twig

In my content type for Event, I have an entity reference called Speakers which refers to a taxonomy called Team Members. It's set to multiple so I can say which speakers belong to my event. On ...
1
vote
0answers
24 views

Links in stage environments are absolute and send users to live enviroment

This problem has been driving crazy for years. whenever I create a stage environment of a site, I copy the database from the production site. some of the links there - whether in the menus or in the ...

15 30 50 per page