All Questions

24,396 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
16 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 ...
user avatar
  • 3,432
13 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 ...
user avatar
  • 518
10 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 ...
user avatar
  • 1,612
10 votes
1 answer
4k views

How do I use a custom twig template with a render element?

I am fairly new to Drupal 8 module development, so I decided to follow a tutorial at https://docs.acquia.com/articles/drupal-8-creating-elements-theming-elements-and-managing-frontend-libraries, which ...
user avatar
10 votes
0 answers
571 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,...
user avatar
  • 375
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(...
user avatar
  • 101
10 votes
1 answer
2k views

Disabling Browse to Library in Media Upload Field

I'm on d7.2 with the included Media Module. I'm also using WYSIWYG if that matters at all. I'm seeing that when a user clicks the image upload field, they have a choice of either 'web' or 'library'. ...
user avatar
9 votes
1 answer
705 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. ...
user avatar
  • 3,432
8 votes
0 answers
1k 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 ...
user avatar
  • 81
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-...
user avatar
8 votes
0 answers
161 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" ...
user avatar
  • 37.6k
8 votes
1 answer
488 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 ...
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 ...
user avatar
  • 407
7 votes
0 answers
2k views

Custom views filter for custom view field

I want to created a custom views field, following this tutorial: https://www.webomelette.com/creating-custom-views-field-drupal-8. This custom field counts and returns the number of referencing ...
user avatar
  • 894
7 votes
1 answer
2k 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 ...
user avatar
  • 316
7 votes
2 answers
657 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, ...
user avatar
  • 361
7 votes
1 answer
1k 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? ...
user avatar
  • 4,514
7 votes
1 answer
1k views

Change views exposed filter format

I am build a JSON export using a View in Drupal 8. Problem is that the parameters for retrieving the json doesn't seem to work as I would want. In my View I need use two exposed filter criteria to ...
user avatar
7 votes
0 answers
429 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 ...
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/...
user avatar
  • 1,998
7 votes
1 answer
158 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 ...
user avatar
  • 2,105
6 votes
0 answers
213 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 ...
user avatar
  • 2,403
6 votes
0 answers
500 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 ...
user avatar
6 votes
1 answer
136 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....
user avatar
  • 3,472
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 ...
user avatar
6 votes
0 answers
101 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 ...
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 ...
user avatar
  • 960
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 / ...
user avatar
  • 439
6 votes
1 answer
491 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 ...
user avatar
  • 111
5 votes
0 answers
115 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 ...
user avatar
5 votes
0 answers
284 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 ...
user avatar
5 votes
0 answers
293 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 ...
user avatar
  • 4,811
5 votes
2 answers
2k 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 ...
user avatar
5 votes
2 answers
1k views

Drush cim: error "Table xyz already exists"

I'm trying to deploy a dev website to a dev server. When running drush cim on the dev server, drush ends with an error message: Table honeypot_user already exists When running drush cim again ...
user avatar
  • 817
5 votes
0 answers
1k views

Workflow, Workflows, Workspace, and State Machine-- what is the difference?

Drupal 8 core has an experimental module called Workflows. There is also a contrib moduled called Workflow. There's also the Workspace module, which is associated with the Deploy module. Commerce 2 ...
user avatar
5 votes
1 answer
112 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 ...
user avatar
5 votes
0 answers
951 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 ...
user avatar
5 votes
1 answer
132 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 ...
user avatar
5 votes
0 answers
332 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 ...
user avatar
5 votes
1 answer
341 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 ...
user avatar
5 votes
1 answer
982 views

Using multiple AND/OR operators in contextual filters

I'm trying to query my nodes by using a contextual filter in views, however, I am unable to use multiple AND (+) operators and OR (-) operators at the same time. For example: This works: mysite.com/...
user avatar
5 votes
1 answer
2k views

jquery date picker in views exposed filter changes the date values

I have a node type "tasks" and created a view so that current logged in user can see his/her assigned tasks. I have used a "time ago" formatter in the field "deadline" which shows the remaining time ...
user avatar
  • 51
5 votes
1 answer
149 views

Letting a view know in which pane it's being displayed

I've got a very non-trivial question on integrating Panels and Views. Maybe there's no solution out of the box, but I would really appreciate any help. Essentially, I've got a lot of tagged nodes. ...
user avatar
  • 71
5 votes
2 answers
980 views

How to create field collection item fields programmatically?

I'm trying to program a field collection with field collection item fields like the code as given by rbruhn on Creating field collection programatically. I want to create it on an easier level for ...
user avatar
  • 59
5 votes
2 answers
3k views

Save data to custom field columns using entity_metadata_wrapper

I have a simple custom module that creates a new field type. The field has multiple columns in the database; the idea is that a user (or code) will enter a single value, and then that value is ...
user avatar
  • 493
5 votes
2 answers
362 views

How to create a chart for tracking Product stock over some period of time using Ubercart?

Does anybody know about a good solution for tracking Product stock in a certain timespan? It is nice to see the stock numbers of products, but I find quite handy to see product performance over time. ...
user avatar
  • 926
5 votes
1 answer
1k views

Database table cache_views_data is extreme large, what size is normal?

I have a Drupal 7 site with ~70,000 nodes and ~500,000 terms. During some investigations for the cause of substantial performance problems, I found out that the database table cache_views_data is ...
user avatar
  • 1,998
5 votes
2 answers
2k views

Displaying the contents of a document file (doc, docx, etc.)

I'm looking for a way to display the contents of an uploaded document file such as a .docx file. In Drupal 6 I used the iPaper module which did the trick as all I needed was api code to connect ...
user avatar
  • 105
5 votes
0 answers
495 views

So, running Drush update messed up your SVN repo

I'm working on a client's site. We had the sites folder as the root of a SVN repository. At some point we ran drush to do module/core updates but Drush was (mistakenly) set to ignore the repository. ...
user avatar
5 votes
1 answer
1k views

Using the Batch API with AJAX?

I have been trying to figure out how to use the Batch API in an overlay via AJAX, but are not sure that's possible at all? - As far as I can see the batch API, when javascript is enabled, calls the ...
user avatar

15 30 50 per page
1
2 3 4 5
488