All Questions

0
votes
1answer
606 views

Debugging search_api_solr index

Using search_api and search_api_solr‎ I put together a view which searches through an index - called products. I have exposed the 'Fulltext search' filter, selected 'Use as: Search Keys' and selected ...
0
votes
2answers
22 views

How to migrate file uploads from Drupal 6 to 8?

I'm working on a custom migration from Drupal 6 to Drupal 8. Some of the content types have a field used for file attachments. In Drupal 8 this field has the internal name field_attachments. When I ...
0
votes
0answers
5 views

How to set a node as context?

I have a little web app where I have two node types: Customers (/customer1, /customer2) Notes about customers The notes about the customers have an entity reference to the customer. I like to create ...
1
vote
0answers
17 views

Prevent User from changing html in CKEditor [on hold]

I wonder, if there is a way to prevent users from harming any html within my default html in a CKeditor textfield. Yes I know this is not the Drupal way. Normally I would create a paragraph with its ...
0
votes
0answers
7 views

File uploading issue

We're having issues uploading files. Some files encounter an error message that states The specified file temporary://p1dah901n910tl8lv14.tmp could not be copied, because no file by that name ...
0
votes
1answer
24 views

How do I print an image field value in views-view.html.twig?

It seems I'm able to print text field values with {{ view.field.field_example.getvalue(view.result[0]) }}, but this same method doesn't work for image fields. Please help.
1
vote
2answers
5k views

Get the uri/path value of an image in the field template

I have created a custom field template for an image - field--field_images.tpl.php with the following code: <?php $url = file_create_url($field_images['uri']); $url = parse_url($url); $imglink = ...
0
votes
1answer
524 views

feeds importer tamper double importing image

Using feeds import with tamper to split up images at a | our database has thousands of products and only some of them have an image and then some have a second image (a room view of the product) and ...
0
votes
0answers
6 views

Core Search Names with Wildcards

I have a module that creates a custom content entity for staff members and a search page for the entity. The current search module uses an advanced search with fields that can use exact matches, but ...
0
votes
0answers
26 views

How to create a view to display the nodes of a flagged group?

I installed the Group, Message and Flag modules. When a user creates content in their group, it generates a message. On the group I created a personal flag "Follow". I created a view to display on ...
0
votes
1answer
602 views

Define a resource of Service module, But 'access callback' cannot work

This following is my resource: For clearly read, I delete some line. /** * Implementation of hook_services_resources(). */ function baidu_push_services_services_resources() { $resources = array(...
4
votes
2answers
1k views

Create a hook function

I want to create a hook function so that other modules implement it, any pointers to how it is done?
3
votes
2answers
408 views

How do you disable the CSS from a core module in Drupal 8 using libraries-override?

I'm trying to disable the CSS styles from the layout discovery module in my theme.info.yml file. I've tried several options, but I can't seem to get it to work. This is what I have now. libraries-...
0
votes
1answer
540 views

Displaying titles of collapsed menus

I'm currently converting a mock-up and I need to display four menus in a list, the first two are expanded, and I need to display both the titles and menu items, and the next two are collapsed, so I ...
0
votes
2answers
16 views

Ajax error render

I receive this error message when I try my custom form in Drupal 8. User error: "0" is an invalid render array key in Drupal\Core\Render\Element::children() This is the code I am using namespace ...
0
votes
1answer
41 views

Strip html tags in preprocess hook

We have a mytheme.theme file that has a mytheme_preprocess_node(&$variables) function. Within this preprocess hook, we would like to remove all HTML tags within a formatted (long) field. The goal ...
0
votes
1answer
578 views

Passing arguments to a block

I am working on trying to understand the secrets of custom-developed blocks. Namely, I have a use case where a block need to pull content via EntityFieldQuery (this could be done with Views, but I ...
0
votes
0answers
12 views

How do I configure the Sendgrid Integration module?

I have two Drupal 8 sites. Both have sendgrid integration installed via composer and both are using the same version (1.2). I have a Sendgrid account created and an API Key has been saved to the ...
0
votes
0answers
13 views

Migration of field_collection with migration_d2d

In D7 to D7 migrations, when it comes to field_collections I know “ Your field collection migration should be run after the host entity migration. ”. I have done my host entity migration via ...
1
vote
1answer
86 views

Show full query for anonymous user

I'm currently troubleshooting an issue where anonymous users and certain roles see a different set of results from a view than administrators and roles with more permissions do. The view is supposed ...
0
votes
0answers
10 views

Config split settings file generated into split directory

Drupal 8.7 I have a multisite split. The config_split.config_split.<sitename>.yml files are supposed to go into the config/default directory. For some reason when updating a split on one of my ...
0
votes
0answers
14 views

Service decorator for entity list builder?

Is it possible to use a service decorator, or similar mechanism, to override a method in an entity's list builder? For my specific use case, I want to override the render() method of the Drupal\...
5
votes
2answers
2k views

drush default site alias

Is there a way of specifying a default site alias ? couldnt find it in drushrc example nor aliases example. motivation i am sclerotic and lazy :) usually running drush from the dir where the site is,...
-1
votes
2answers
582 views

jQuery multi and jQuery mobile 1.4.5

I'm using drupal 7 and trying to develop some mobile menu effect. I've read a lot of discussion so i've install jQuery multi so my drupal run in back-end jQuery 1.5 and in front-end run jQuery 1.11.3....
1
vote
1answer
24 views

Views callback work only once with advanced form block

this code work but the views is callback only once (reload only once), any idea to reload more than one time ? see in detail on drupal.org function modulename_form_alter (&$form, &$...
0
votes
0answers
11 views

Internal Server Error after 5 minutes of examining variables with xdebug

I use xdebug with VS Code to inspect variables on my local Drupal 8 installation, but after approximately 5 minutes I get an Internal Server Error and can't inspect my variables any longer. I tried ...
0
votes
1answer
39 views

How can you find out in which module your code runs?

I often face the issue that I need to have module metadatas (such as relative path) and in the standard Drupal way I seem to be enforced to hardcode the module name like this: \Drupal::moduleHandler(...
0
votes
0answers
6 views

Avoid hyphenation of specific word in views text field

In order to avoid hyphenation of a specific word in a text field I can use &zwj; But this doesn't work when the field is a hidden field in views which is included in another field and then output:...
0
votes
3answers
4k views

Add html to a node's title

I have a Drupal 7 site and I'd like to be able to add an HTML link to part of the title of a node. By default Drupal has this as plain text. Is there any way that I can allow HMTL? Example: This is ...
0
votes
1answer
715 views

Theme video-embed-iframe.html.twig by content type

I am using Drupal 8 and trying to theme video-embed-iframe.html.twig by content type. with the current naming suggestions this is not possible. I am using Media with video embed field containing in ...
3
votes
1answer
44 views

Execute a view in code and pass multiple arguments to an exposed filter?

I am executing a View in code of a paragraph preprocess to allow dynamic listings. The user selects which content types they would like to show, and the View should return nodes of those types with ...
1
vote
1answer
552 views

How do I alter certain module form output

Some of my node types use fields from extra modules (such as Open Hours or Get Locations). How do I change the way those modules render their fields inside the form? I mean Get Location for example ...
2
votes
0answers
28 views

How can I translate the 'enabled' Boolean of menu items?

I'm trying to translate the 'enabled' field of a menu item in Drupal 8. So far I have written this code in mymodule.module file: function mymodule_entity_base_field_info_alter(&$fields, \Drupal\...
-4
votes
0answers
18 views

Error Installing APIGEE Edge Module

I am not able to install Apigee edge module on Drupal 8.7.2. I am getting an error saying: Fatal error: Interface 'Apigee\Edge\Entity\EntityInterface' not found in C:\Users\Lowes\Sites\devdesktop\...
2
votes
1answer
339 views

How to get price of a line item for the transactions which are already completed in drupal commerce

There are some transactions which are made using drupal commerce module along with commerce ccavenue module. I have the order ids, transaction ids and list of line items purchased in each of the ...
0
votes
1answer
43 views

How to access all the parameters in URL without getting a “page not found” error? [on hold]

I used this code in Drupal 7 can access all parameter. $items['hello'] = array( 'page callback' => 'hello_handler', 'title' => 'Hello page', 'description' ...
5
votes
2answers
296 views

Detect when 'Remove' is clicked on a file widget form element?

I have a handful of file fields that have the following default Drupal behavior: User can upload a file User can upload another file in place User can remove file Standard config. Whats happening is ...
1
vote
1answer
341 views

How to submit a field collection from a form into a created node

I would really appreciate if somebody could help me with this :) I have a field collection called field_formations. Inside it I have 2 fields: field_technologies - (reference to a taxonomy). ...
-2
votes
0answers
15 views

Context module: User ID / role from url

I'm trying to display some blocks on user profile pages but I need to add a condition that the user who's page you're visiting has a certain role. I saw there is a node type condition based on the ...
-4
votes
0answers
12 views

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000] [on hold]

The website encountered an unexpected error. Please try again later. Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1118 The size of BLOB/TEXT data ...
0
votes
1answer
20 views

How to create a custom Webform handler to submit to a SOAP API

I have a Webform that when submitted needs to be posted to a SOAP web service. I have search for a bit of direction but I can't seem to find anything about SOAP and Drupal 8/Webform. Can anyone point ...
0
votes
0answers
37 views

Requests, URL aliases and Controllers

How does Drupal determine the Controller from the Request object ? At which point does the url-alias of a node determines the controller? (I'm referring specifically to case where the route isn't ...
0
votes
2answers
583 views

Insert grid of images into about page

Im new to the forum Hope you are all well? I have a really simple thing I want to do with drupal but for the life of me I cant seem to get it right (I'm a beginner with drupal) So I have an about ...
0
votes
1answer
352 views

Redirect Module doesn't redirect from node/{nid} to alias

I installed the redirect Module in Drupal 8 but sorrily can't get it to work properly. I enabled all checkboxes in the settings, also the "Enforce clean and canonical URLs" option. In my page source,...
1
vote
6answers
593 views

hook to alter custom blocks?

I am having a problem with my custom blocks rendering, and I want to programmatically manipulate the blocks to troubleshoot the issue. I used this question to add this hook to my module: function ...
0
votes
0answers
37 views

Getting “does not appear to be a git repository” when running “composer create-project drupal-composer/drupal-project”

I'm trying to manage a D8 project entirely with Composer for the first time, using the famous drupal-project template. I'm on Windows with PHP 7.1 and the latest version of Composer installed, and I ...
1
vote
1answer
574 views

How do I programmatically export all webform submissions into a single csv? (multiple webforms)

I have hundreds of webforms created from a single webform template. How do I programmatically export all webform submissions into a single csv? Note that this is not possible via views out of the box. ...
2
votes
2answers
341 views

How to add field to ALL webforms?

How do I add a field to all webforms? I have a website where I'm using webform for surveys and I want that on each survey there will be a field that is the same in all of the nodes/webforms. Thank you....
0
votes
1answer
571 views

Subscribe/unsubscribe user from mailchimp list after purchase

I am using mailchimp 7.x 3.3 Module and ubercart is integrated for role selling, also I have rules module installed. I have users subscribed to the mailchimp list, my requirement is when a user from ...
-5
votes
0answers
29 views

Use Ajax on views exposed form [on hold]

I am trying to implement ajax on form's(views exposed form) dropdown change. Adding #ajax to views exposed form fails as views exposed forms are not using Drupal's form API. How to implement ajax on ...

15 30 50 per page