All Questions

24,770 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
17 votes
0 answers
2k views

How do I setup Chained fast backend, Varnish, APCu and Redis cache bins in settings.php?

On a Debian Jessie server (Nginx, PHP 5.6, Zend Opcache), I installed Apcu, Redis, Varnish. I also installed APCu, Chained fast backend, Redis and Varnish modules. In order to make these caching ...
Kojo's user avatar
  • 3,513
14 votes
0 answers
2k views

How do I translate theme settings?

How do you translate custom theme settings in Drupal 8? I use hook_form_system_theme_settings_alter to add custom settings to a theme. One setting is the text string (e.g. 'Menu') to display beside ...
Peacog's user avatar
  • 528
12 votes
0 answers
1k views

With search_api_solr, how can I apply an significant field based boost when using solr 6.x?

I am using the solr backend for search_api on a drupal 8 site. I have added the value of a taxonomy term reference field (field_promoted_search) to the index. If an item of content has ...
autopoietic's user avatar
  • 1,672
11 votes
0 answers
583 views

How do I go about migrating books using MIgrate_D2D?

I've had to rebuild my sites recently due to a hit on the Drupalgeddon bug I thought I closed. I've been trying to migrate everything in easily but it doesn't seem to want to for whatever reason. Now,...
CW Smith's user avatar
  • 385
10 votes
1 answer
2k views

How do I theme a modal popup?

How can I style Drupal 8 modal window to achieve Instagram style and behaviour? I'm creating modal through extending ControllerBase class, thus have full control of content. However I can't figure it ...
Jonas's user avatar
  • 101
10 votes
3 answers
2k views

LIKE clause not working in hook query alter

I'm trying to replace the default search with a LIKE clause in Drupal 7. I tried to alter the query according to Adding an OR condition to an existing query: function MYMODULE_query_node_access_alter(...
user9932's user avatar
  • 101
9 votes
2 answers
863 views

Grouped Exposed filters radio buttons : one in two no value ticked. How to programatically force default button be ticked?

Some exposed filters (radio buttons) aren't systematically ticked when a view is displayed, causing an "An illegal choice has been detected. Please contact admin..." error message and No result found. ...
Kojo's user avatar
  • 3,513
8 votes
2 answers
801 views

Managing custom aliases on translated content

We have a Drupal 8 site with translated content, and using the Pathauto module. The issue we are running into is that when we un-check the "Generate automatic URL alias" on, say, the Chinese node, ...
aburke626's user avatar
  • 371
8 votes
2 answers
2k views

Configuration changes that will not import?

I have some configuration that will not import. If I run drush config-import --preview I see the changes to be imported; I hit 'y' to import. When I run the same command, the changes are still there? ...
dbj44's user avatar
  • 4,764
8 votes
2 answers
5k views

Migrate address field

I am currently searching for a example to migrate data into an address field in Drupal 8 without any luck for now. Has someone a hint for me on how to map the fields? I tried the following: my....
Sebastian's user avatar
  • 635
8 votes
2 answers
3k views

How do I enable the "print PDF" link on only a specific page?

I have enabled the print module and configured the basic page content type to show a PDF print link under the basic page settings. On the print module's Links settings page at admin/config/user-...
MutantMahesh's user avatar
8 votes
0 answers
175 views

Splitting Atom categories into two fields

I am using Feeds to import an Atom feed into my site. The feed has categories as <category term="cat:Foo" scheme="http://www.sixapart.com/ns/types#category" /> <category term="tag:foo" ...
mpdonadio's user avatar
  • 38.1k
8 votes
2 answers
2k views

Paging a view based on a grouping field?

I'm upgrading a site I created 2 years ago from D6 to D7. In that site, I have a view of items that are grouped according to year, so that the items for each year show up on a separate page -- you ...
cellear's user avatar
  • 81
8 votes
1 answer
503 views

Order list: Pay unpaid invoices

I have created some extra statuses: Paid and Unpaid. Now they got the functionality and react on the transaction balance perfectly fine. However, on the user site, it is kind of a dumb thing. Even ...
user6958's user avatar
8 votes
2 answers
2k views

How to setup event registration and paypal payment?

We have events and we take registrations for them. Entity Registration module is installed for that purpose and it's working great. Now, since those events are paid events, we want to implement PayPal ...
Antonio's user avatar
  • 407
8 votes
2 answers
3k views

Add Expression for Entity Query

I've been working with the entityQuery to query the db and get an array of filtered nids however I need to add an expression to my query. I've checked the Query class and found a protected sqlQuery ...
113408's user avatar
  • 326
7 votes
1 answer
315 views

How to get referencing parent entity when adding entities via Inline Entity Form to set automatic titles?

I have a content type "Parent" and a content type "Child". When adding Parents, the user can add Childs via Inline Entity Form. Child content types have Automatic Entity Label enabled. In that ...
Alex's user avatar
  • 2,523
7 votes
0 answers
571 views

Execute form custom validator first before default validation

I have added a custom form validation on node/add page in drupal 8. The purpose of adding this validator is to add a slash before the path alias string. By default if a path alias string is added ...
Umed Godd's user avatar
  • 317
7 votes
1 answer
2k views

How to set up Authcache module with Varnish and ESI?

I am trying to set up Drupal 7 with Authcache beta 2 and Varnish 3.0 but I can't get the ESI blocks working. Varnish it self seems to work well. I am using the example.vcl from sites/all/modules/...
user5950's user avatar
  • 2,048
7 votes
1 answer
168 views

Update core keeping other composer packages

After upgrading Drupal to the last version with Drush (8.1.15) the other composer.json dependencies (e.g. drupalconsole) are removed. Are there any way to update Drupal with Drush keeping other ...
jorgetutor's user avatar
  • 2,125
6 votes
0 answers
65 views

How to override the typehint for entityTypeManager with a more specific one?

I'm often frustrated by entityTypeManager because when I load entities, the typehint for the return value of the load methods is EntityInterface, but I want it to be a more specific interface (which I ...
Patrick Kenny's user avatar
6 votes
0 answers
461 views

How to deal with config sync changing the order of lines in files causing spurious changes in source control?

I am really enjoying Drupal 8/9's built-in config sync mechanism which allows you to export config to a directory. This makes it possible to store config in a git repo and easily deploy from dev to ...
naomi's user avatar
  • 1,265
6 votes
0 answers
499 views

How best to determine what differs between field schema and field definitions when "Mismatched entity and/or field definitions" is reported?

I've inherited a large, enterprise Drupal 8 site in which we have many "Mismatched entity and/or field definitions" warnings reported in the status report. The site is currently running on ...
Spartanicus's user avatar
6 votes
0 answers
477 views

Configuration export via drush randomly change the value of labels\other content in multilanguage sites

I've a multilanguage site, with Italian set as default and English as secondary language. When exporting the configuration via drush - drush cex command - sometimes the labels of other kind of content ...
Giuseppe's user avatar
  • 1,001
6 votes
0 answers
651 views

How can I convert an existing image field into a Media image reference field?

I have an image field that I created before Drupal 8.5, when media was introduced in the ui. The field already contains content and I would like to make use of the reusable media functionality that is ...
Pekens Antoine's user avatar
6 votes
1 answer
160 views

Benefit of config entities over regular config entries?

In Drupal 8 it is possible to store configuration in "config entities". However, the same can also be achieved with non-entity config entries. E.g. one example for a config entity schema, from core....
donquixote's user avatar
  • 3,662
6 votes
0 answers
1k views

How to create a Draft view with Content Moderation?

In Drupal 7 with Workbench Moderation is easy to create a view to show the last Draft of a content: You have a relation in the view named Workbench Moderation: Node, so using the filter Workbench ...
Adrian Cid Almaguer's user avatar
6 votes
0 answers
116 views

How to modify auto populate field value?

I m Stuck in two situation where I have to modify value of one field depending on another field selection. First situation is like I have two field Region (Node reference) - the widget type is ...
Sudha Bisht's user avatar
6 votes
3 answers
3k views

How do I define a computed field equal to the concatenation of two fields of my custom entity?

I have a custom entity (Person) with these fields: ID, nom, prenom, telephoneportable, estactive, userID, created, changed. I created it with baseFieldDefinitions. I want to have a computed field ...
gbmapo's user avatar
  • 1,086
6 votes
1 answer
1k views

How to add multiple products to cart at the same time with attributes

I have different view blocks that display multiple products on the same page, each product has their own attributes such as product bundle and custom line item, these serves as an option set / ...
Danz's user avatar
  • 439
6 votes
1 answer
573 views

Automated login with LDAP always returns error

I have successfully setup LDAP module to authenticate users (and create new users). This is done through manual login form. Now I'm trying to enable automated single sign-on, but with no luck. I ...
Dubya's user avatar
  • 111
6 votes
0 answers
4k views

Export menu as feature?

How can I export a menu as a feature? I found the menu import module, but it does not work with this feature.
Bart Braem's user avatar
6 votes
1 answer
853 views

Why does the Webform disappear after changing Submit button text in Form settings?

I have created a Webform page called "Quick Quote". It is working fine in the website. But when I change the "Submit button text" to a new value in Advance Settings >> Form Setting ...
Ashok KS's user avatar
  • 391
5 votes
0 answers
58 views

Prioritise condition in QueryInterface

I have an overview with a search field. The query should search on both the title and description, but I would want to show my results that have the search parameter in the title first in the list. I ...
Cedric Lenders's user avatar
5 votes
1 answer
131 views

How do I import a sync config file into my Kernel unit test?

How do I import a sync config file into my Kernel unit test ? Specifically, I have some REST resources in files config/sync/rest.resource.foo.yml,config/sync/rest.resource.bar.yml At present, when I ...
Monkeybrain's user avatar
5 votes
1 answer
1k views

How can you attach a file to a mail using Symfony mailer?

I want to attach a file to a mail from an input file in my form. Here is how I build the mail : $mailManager = \Drupal::service('plugin.manager.mail'); $params['title'] = 'title test'; $params['...
Pedro's user avatar
  • 51
5 votes
0 answers
350 views

Add third party settings to a basefield definition

Is there a way to add third party settings when defining a basefield for a custom Content Entity? I am creating a new Entity type and want to keep the fields defined in code vs config as much as I can....
Jimmyb_1991's user avatar
5 votes
1 answer
225 views

How does the Geolocation content of a page filter is a Views block?

I have a website with Drupal 9 and the Geolocation module : https://www.drupal.org/project/geolocation I created a content type with a Geolocation field that contains coordinates. My website uses the ...
zoulou66's user avatar
5 votes
0 answers
622 views

How to add translation to Inline Entity Form + Entity Browser

Situation I've got a special "Dashboard" node that consists of entity references to other node types. In dashboard form mode all widgets are configured to use Entity Browser to display an (Inline ...
Hudri's user avatar
  • 5,140
5 votes
1 answer
972 views

Invalidating render cache items for anonymous?

We have a certain content type in Drupal 8 that has a small grid of data on it that is populated from an API call when the node view is being built. In that call, I am checking for cache and setting ...
Kevin's user avatar
  • 28k
5 votes
2 answers
4k views

How to pass a field value as contextual filter argument using Twig Tweak drupal_view?

In Drupal 8, I'm using Twig Tweak to embed a view. I have a contextual filter set to one of the node's fields, field_project_id. If I use a literal for the third argument, it works. If I try to ...
timwilson's user avatar
5 votes
1 answer
1k views

Cannot import Paragraph based Feature into new site

Perhaps someone with a bit more Features expertise can help me here. I have a Drupal site with 25 or so Paragraph types that I would like to export (one by one) to its own contained Feature. I ...
Kevin's user avatar
  • 28k
5 votes
2 answers
444 views

Migration of content with an UI

My goal is to import data of customers from a csv file to my custom entity. For that I wrote a migration with the migrate_source_csv module as source plugin. This works fine, but the problem is, that ...
Chris4783's user avatar
  • 1,108
5 votes
0 answers
229 views

Is it possible to have a batch job run in a modal

I created a form that on submit it creates a CSV file via batch API. It works perfectly when submitting the form regularly but can't get it to work from a Ctools modal. Could it be that it just isn't ...
albertski's user avatar
  • 3,497
5 votes
2 answers
215 views

Alter the exposed filters of a view, based on the view result

I have a view that displays matching nodes, based on contextual arguments. I'd like to create an exposed filter that filters by node title, displaying a drop down (select) menu with options for every ...
Nic Rodgers's user avatar
5 votes
0 answers
987 views

Show nodes of other content type that share a common term (with depth)

I have two content types: sector and product. Both share terms from the same vocabulary, called branch. A sector node should list all product nodes that share the same term(s) (from the branch ...
cptstarling's user avatar
5 votes
1 answer
152 views

Programmatically Setting Content Ranking Factors For Drupal Search

I've added a dropdown to Drupal search page interface. I would like for users to be able to select this control to sort results according to Date or Keyword Relevance. I'm able to get the dropdown ...
Tiye Baldwin's user avatar
5 votes
0 answers
347 views

Is there any way to add a file field for multiple upload file to a custom form?

I'd like to add a file upload widget to a custom form, with core file module, as shown in the admin edit node page. I've trying with the 'managed_file' API, but I've only got upload one file. I need ...
jlcarretero's user avatar
5 votes
1 answer
373 views

Search filter result score

I'm seeing an interesting anomaly (?) I'm trying to get to the bottom of. I've set up a view with an exposed filter Search: Search Terms. I am trying to mimic the result set offered by standard drupal ...
Daniel Rogers's user avatar
5 votes
1 answer
2k views

How to configure paragraphs module for multilingual

I try to configure the Paragraphs drupal module for a multilingual website. I have : set the content type translatable with field translation enable translation on the paragraphs field enable ...
Mathias's user avatar
  • 51

15 30 50 per page
1
2 3 4 5
496