All Questions

Filter by
Sorted by
Tagged with
-1
votes
0answers
38 views

Generate a slug for a custom route

I have created a custom route and i'm trying to figure out how to replace the node id by a slug. I have this: /my-custom-path/1 I want this: /my-custom-path/a-node-slug How can i do that ? Thanks ...
0
votes
0answers
10 views

How to filter GraphQL query by content language?

I am coding Drupal 8/Angular app and Angular is fetching data from Drupal using GraphQL. Everything works fine except now I need to query nodes in a particular language. This is my query: { ...
-3
votes
1answer
27 views

Drupal using Guzzle request [closed]

I call an API when someone connects via my login form. When the API sends me back 200 I would like you user to access the HOME. But I have the following error: The website encountered an unexpected ...
0
votes
1answer
21 views

Showing fields from different bundles that are related

I'm trying to display the fields of one content type while searching on another content type. More specifically... here is my situation: I have a view based on an index with fields in Organism and ...
1
vote
1answer
26 views

Sending file attachment in the email contact form

I have added a file field in a contact form. The client is receiving the email and there is the link of file. She now needs the file in attachment. Is there any module or code that could send the ...
0
votes
0answers
12 views

workbench_access filter by section

I'm green fielding workbench_access in Drupal 8.7 while keeping an eye how customer implemented it in D7. I need to provide a view for a content_type of basic_page which a $user has access in WBA ...
-3
votes
0answers
21 views

Open new url when accessing link on a webform? [closed]

When accessing a link within a Webform I want to open a new url. I have multiple links within a webfrom I would like for people to be able to access without being taken away from the webform. Any ...
-1
votes
1answer
27 views

How to run tests in my contrib module?

I'm writing a contrib module but I can't find the documentation to run the tests - unit and functional. I know that I'm supposed to use PhpUnit, but I can't find examples of PhpUnit configuration ...
1
vote
2answers
52 views

How to programmatically build a page and a form in the same page

What I'd like to do is build a page with two things: On one half of the page, custom markup with data from Drupal. On the other half, a custom form also submitted to Drupal. There are a lot of ...
0
votes
2answers
42 views

Run validation callback before ajax

The submit element on my form uses an ajax callback which sends out an email. I have a validation callback which I've added to this form, but it gets run after the ajax callback and so the email will ...
0
votes
0answers
31 views

Alter a Field Collection display order inside a FieldCollectionHook

I have been stuck in here since yesterday and I'm starting to run out of ideas. I have a Field Collection that contains 2 fields. The first one is a multiple taxonomy term, and the second one is a ...
-1
votes
1answer
38 views

Webform element validation custom module

I want to add a custom validation to text input, I followed the instruction provided in https://www.drupal.org/docs/8/modules/webform/webform-cookbook/how-to-add-custom-validation-to-a-webform-element ...
-2
votes
1answer
35 views

Assign a violation to a student [closed]

I am building a website with drupal 8 and commerce 2x for our school but im a bit stuck. I want to be able to have all students in the database (2000 students) with their profiles using profiles2 and ...
1
vote
1answer
43 views

Change field label used in node display

I have a custom content type in Drupal 8.6.x. I want to be able to change the text used for a field label based on the value of a taxonomy term reference in the node. For example, I want to change ...
0
votes
0answers
26 views

Programmatically change the format of a Date/Time field in webform [closed]

Using a custom webform handler, I'm programmatically trying to get the value of a Date/time field setup on a webform. My custom webform handler contains the below: // Get an array of the values from ...
0
votes
1answer
70 views

Why is $form array empty when extending FormBase or NodeForm

Why is $form not upcast with the requested bundle's fields for the default Form Mode for GET requests; and with the entities' values for other method requests? My form: namespace Drupal\tam_api\Form;...
0
votes
0answers
16 views

Limit the number of characters of Node Body(summary) in Search Results

In Drupal 8, I am using 'Search API' template file to display search results. My each page has more than 1000 words content. When I perform a search it display the results correctly, but I see the ...
0
votes
0answers
19 views

Import/export content to CSV along with the field collectors

I have added the "field collector" fields in the content type to create relation ship between 2 content types and they are looking good but i want to load the data for the content type from the CSV ...
-2
votes
0answers
33 views

“Display even if view has no result” option in returns unexpected results [on hold]

On a Drupal 8.7.3 project, I have a view described as below: Format: Table. Display: Fields. The view displaying content of type: "xyz". The view has a relationship to the group where the "xyz" ...
0
votes
1answer
12 views

Views Add Link to product field missing

I have a search results View which list the (Commerce) products. I show the title and the image fields. I those fields to wrap in a custom <a> link tag. When I am adding fields, I miss the 'Link ...
0
votes
0answers
19 views

url_alias has issues with node_translation

I am migrating a site and after debugging I am seeing the following when the node_translation plugin is executed. Source is taxonomy/term/1 and when transform() is executed pid is set to term instead ...
1
vote
1answer
10 views

Where are the settings for read time module in admin area?

Installed the read time module and can not find any settings in the admin area. The description says its configurable, but where? I can see the field in manage display, but the article is not ...
2
votes
2answers
86 views

Allow some products to be sold only in bundles (groups) with some other products

I'm making a commerce site with Drupal 8 and Drupal commerce and I have a not so common request. Some of the products should be available to buy only in groups (bundles) with some other products. E.g. ...
1
vote
1answer
39 views

Add CSS class to view image_field in twig

In my custom view fields twig file views-view-fields--search--product_result.html.twig I try to theme my view item. {{ fields.field_images.content }} <h5 class="card-title">{{ fields.title....
-2
votes
0answers
11 views

Translate “All” for isotope filter [closed]

Am translating a Drupal 7 website to Japanese. I was able to translate all sections but am failing to translate the "All" filter of the Isotope filter. Please help.
0
votes
0answers
25 views

User register returns 409 [closed]

I developed a mobile app that interact with the d8 site rest api using the /user/register?_format=json where in some devices the register returned a 409 conflict and the user is not even registered ...
0
votes
0answers
24 views

Redirect node based on field value [closed]

If visited page don't have a body I want it to redirect to the field file (if any). I tried to do it like this in a custom module: use Symfony\Component\HttpFoundation\RedirectResponse; function ...
-2
votes
0answers
12 views

How to bulk compute a computed field [closed]

I added a computed field to an existing commerce product type. Now I want to bulk compute the field for all products. How can this be achieved? I'm using Drupal 8
0
votes
1answer
18 views

How to set “Language Selector dropdown” required in node form

I want to know How to set "Language Selector Drop-Down " required in node form? I tried to do this via hook_form_alter, but it seems $form['language'] is not created in this hook ! Is there any hook ...
0
votes
0answers
14 views

Nodequeue not showing the results by position [closed]

I am trying to set the queue form nodequeue depend on position & It set by position in admin/structure/nodequeue page only but not reflecting same position on user's dashboard. Please help me to ...
-1
votes
0answers
20 views

Avoid login validation [closed]

I want to connect my user to Drupal with my own custom 'validate' and without the default Drupal validation on the login function mymodule_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $...
-1
votes
0answers
17 views

D8 Open Social vs. D7 Open Atrium [closed]

Building a huge website that will act as the automation engine for a widely distributed nonprofit membership organization. The core requirement for the site is that it's not merely for discussion, but ...
0
votes
0answers
45 views

Set Custom Form Element Value in Extended LinkWidget Class

I have a class extending LinkWidget and would like to add a new form element. I have omitted all code except what I have added: class CustomWidget extends LinkWidget { public static function ...
-1
votes
0answers
32 views

hook_form_alter() does not work

I have created a form by web-form module in drupal 7 now I am using a form_alter hook but it is not working here my code function gievances_form_alter(&$form, &$form_state, $form_id) { ...
-2
votes
0answers
18 views

The requested resource not found edit fields [closed]

I got this error while editing fields in Drupal 8. There is something wrong with "dot" in the link? How can I fix it?
-1
votes
0answers
17 views

Command cache-rebuild needs a higher bootstrap level to run [closed]

I am using 'Acquia Dev Desktop 2' with Drupal 8.6 version. I have a new module where I am trying to change "route_name" on "F:\drupal\modules\custom\mymodule\mymodule.info.yml". (actually the route ...
-2
votes
0answers
20 views

Showing field information in node edit

I am currently showing the data from different content type (Products) to another content type (Orders) through the module "field collector" and it is working fine. But, it is showing the field_id ...
0
votes
0answers
32 views

View doesn't show published content [closed]

When new content is added and marked published, it does not appear in the attachment/page views. We are currently using drupal 7 with the workbench module. This particular page is also using the ...
-1
votes
1answer
34 views

Organizing config for use with a module

I've recently learned about adding a config/optional directory to a module to provide config items that will be imported upon enabling the module if there are no conflicts. Is there an easier way to ...
-1
votes
0answers
15 views

How to update my web form submission when I update the content type node? [closed]

I have a custom content type which collects data from web-form submission including web-form submission ID. I can able to collect it and create a node. What I am trying to achieve now is, I want to ...
0
votes
0answers
14 views

Many to many Relationship between content type [closed]

I am new in drupal and want to create a many to many relationship between 2 content types. Orders and products. I have found few answers related to my query but i couldn't achieve it. Will really ...
1
vote
1answer
20 views

Is there a standard place 3rd party module pages report what PHP version they're tested on?

Is this info reported anywhere? for e.g. https://www.drupal.org/project/optimizely or https://git.drupalcode.org/project/optimizely
-2
votes
0answers
15 views

Changing Styling of Search API search results page

In Drupal 8, I am trying to customize the Search Result page. I am using 'Search API' not default 'Search' of Drupal 8. I have got the template file from /modules/search_api/templates/search-api-...
0
votes
0answers
9 views

How do I retrieve tagged nodes as well as untagged?

I have a View, "Product Reviews", that retrieves all Product Review nodes (custom content type) that are tagged to the Product you're currently viewing. So, if you're on the page for Product XYZ, this ...
0
votes
2answers
36 views

How to achieve clean HTML markup?

If you visit official website of Dries Buytaert https://dri.es/ and look into the source you will see very clean and minimal markup with no unnecessary tags and classes, eg: When I create a simple ...
-1
votes
0answers
24 views

How to reference current user? [closed]

Need: a 'calendar' view (unordered list of days), which show play dates for e.g. soccer players with date/time, playing field, and: coaches. I need the field of the coach to be a link defaulting to '...
0
votes
1answer
29 views

How can I set value to hidden field (Form Api) and send them with post method?

I’ve created a form with Form Api in a custom module. I send datas with post method to a web service. In buildForm() $form['mode'] = array( '#type' => 'hidden', '#value' => '...
0
votes
0answers
16 views

Replace the first tab in the user profile

In the user profile, I try to replace the first "View" tab with a new tab with views. So I add in "Page settings", for Path: / user /% user, and Menu > Title link menu: My tab > Parent: user ...
0
votes
2answers
20 views

Node ID from hook_comment_insert

I need the ID of the node the inserted comment is attached to. This is what I have tried: function my-module_comment_insert(Drupal\Core\Entity\EntityInterface $entity) { // According to https://...
1
vote
1answer
26 views

Disable “Operating in maintenance mode. Go online.”

The solution for Drupal 7 is using the following code, as per answer of How can I disable the message “Operating in maintenance mode. Go online.” in maintenance mode? function mytheme_preprocess_page(...

15 30 50 per page