All Questions

Filter by
Sorted by
Tagged with
1
vote
1answer
63 views

Composer using old JSON for contrib module?

I maintain skilling, a contrib module. This... composer require drupal/skilling ... reports... [RuntimeException] Could not load package drupal/skilling in https://packages.drupal.org/8: [...
0
votes
2answers
40 views

Duplicate content between multi-sites

I'm working on a feature of a Drupal 8 multisite with separated databases for each site trying to implement the following requisite. When posting news to the main site (all the other sites are ...
1
vote
1answer
27 views

Table in custom form + empty values in form_state

In a custom form I created a table element: // Table results. $form['table'] = [ '#type' => 'table', '#header' => $header, '#rows' => $rows, '#attributes' => ['id' =&...
1
vote
0answers
31 views

Change field type for custom entity (from integer to decimal) with existing data

Yes I have seen previous answers about that, but I'm looking for an new answer : That does not use SQL request That does not use deprecated function like db_change_field() maybe that uses the new ...
0
votes
1answer
28 views

Ajax add command to open a new URL

in a custom module, I created a custom form. On this form, I have an ajax button to open a specific file (.pdf). Here is my code in a custom submit function : $url = 'myfileUrl'; $response = new ...
0
votes
0answers
28 views

How do I allow authenticated users to remove their resume file from their user profile? [on hold]

I am using Drupal 7.67 instance with CiviCRM integrated. Authenticated Users on my website are able to upload Resume to their user profile. However, they aren't able to remove the resume or replace ...
0
votes
2answers
25 views

Hide one form element until another is selected

Is there any way to disable the field 'model_article_nr' until 'model' is selected this is what i have and as it is now i can select 'model_article_nr' before i have choosen a model which leads to ...
2
votes
0answers
57 views

Does the structure of the module's src folder matter? [on hold]

I've read about the Basic Structure guide to building a Drupal 8 module. It's great that it outlines the basic files needed to get a module up and running. Where it falls short is the contents of the ...
0
votes
0answers
21 views

How can I add fields to a custom content type

I am using the following code to set create a field programmtically and I am trying to set the cardinality as unlimited. But I am getting the error and I cannot add any values. Symfony\Component\...
-2
votes
1answer
26 views

How are clean URLs with 200 response codes being managed without doing a RewriteMap?

I would like to know how Drupal handles clean URLs without getting a redirection 302 response. When you have clean URLs enabled, the ?q=123 part of the link goes to /my-node-title and you don't get a ...
4
votes
1answer
112 views

How can I have a custom module checked for deprecated functions?

I created a custom module in Drupal 8 for a specific purpose. How can I find out if it contains any deprecated functions?
0
votes
1answer
14 views

Specify the URL

I'm creating an API service using Services (Drupal 7) and would like to create an URL like /api/avu/v1/{id}. I have api in Path to endpoint and in hook_services_resources() I have $resources['avu'] ...
-2
votes
0answers
29 views

How do I create a menu item from view results [closed]

My organization has several Departments. Some of these Departments have websites. Some do not. I have a Department Content Type. These Departments have an optional website field. I have a view that ...
0
votes
0answers
22 views

Should I delete existing .inc files before regenerating a Feature? [on hold]

My question deals with modifying existing Features. Since Features won't delete existing files (if you remove the last component referenced in a .inc file), should I make it a habit to delete all *....
0
votes
1answer
38 views

How to Give abilty to filter content by geography, separate from language?

I'm not sure if this is feasible, or how to go about it. I want a dropdown (and use IP detection) to provide users with content based on Region - Not Language. Because we will Also be using the normal ...
-1
votes
0answers
20 views

User warning: The following module is missing from the file system — Deleted module in system table, but still error? [duplicate]

I'm using D7 and getting the module warning errors. I deleted the records via: drush sql-query "DELETE from system where type = 'module' AND name = 'MYMODULE';" But it still shows up. Where else do ...
0
votes
0answers
32 views

My user 1 doesn't have access to 'node/add'?

I'm logged into my site as user 1, but I'm getting a 404 error when I try to go to node/add. Actually, all my administrator users fail in the same way. However, node/add/a-content-type works fine, ...
-2
votes
0answers
23 views

Why would a custom block with a form not render in a Bootstrap theme? [closed]

In a bootstrap subtheme, my blocks with embedded forms do not render. I verified that even if I enable only the base theme, the problems still persists. Any thoughts on why blocks with embedded ...
1
vote
0answers
35 views

Can I alter the behaviour of a core function?

To make content management easier, for a large website we have allowed the content administrators to put a pipe in the title of a piece of content. Anything before the pipe is ignored. Is there a way ...
0
votes
1answer
23 views

How to update route cache when saving an entity?

I have added a custom access check to the /user/{user} route: class RouteSubscriber extends RouteSubscriberBase { /** * {@inheritdoc} */ protected function alterRoutes(RouteCollection $...
0
votes
1answer
16 views

Admin page to show 2 blocks (or page+block) with 1 filter that affects both blocks

I am new to Drupal and would love some guidance on how best to achieve the following: An admin page that has (top-down): - a date selector, defaulting to today's date - a section displaying Arrivals ...
0
votes
1answer
28 views

Removing entity queue entries from a view

I have a list of 100 projects. I have set 10 projects as featured projects using Entity Queue module. I have a projects page that shows has two views: First view: 10 projects from entity queue ...
0
votes
0answers
12 views

Can't add sub tab local tasks to admin/content/my_entity

I have a custom content entity list which has its own tab into admin/content/my_entity. The content of this tab is generated by using EntityListBuilder class. Actually, I created it with the drupal ...
0
votes
0answers
24 views

How to print paragraph image title/alt in custom twig template?

How to display the alt and title text in drupal twig template? I already enable the alt and title field, but don't know how to print the field. Here is the code in custom twig template. I want to ...
0
votes
1answer
38 views

How to discover the currently active twig template

I need to find out the currently active Twig template from within my module preprocess function. function mymodule_preprocess_field(&$variables, $hook) { // How do i retrieve the currently ...
0
votes
2answers
41 views

AJAX Views with filter as path component

I have a view of Commerce products of type Print. The product type Print has a reference on a Taxonomy called Category. I setup the Category field as an exposed filter (dropdown) for my View page. The ...
-4
votes
0answers
38 views

Best solution for a multi column mega menu in combination with bootstrap 4 [closed]

I am using Bootstrap 4 (not the Bootstrap theme but a custom setup) for my custom Drupal 8 theme. I have a Main menu with taxonomy categories and links. I need to divide those categories and it's (...
1
vote
0answers
43 views

How to print the changed timestamp only if the comment has been edited? [closed]

I'm trying to customize the comment template file. What i'm trying to do is if a comment has been edited, to indicate so with a little label and to show both the original timestamp it was published in ...
0
votes
1answer
29 views

Missing checkbox in Webforms settings

I ran the following command: $ composer require 'drupal/webform:5.4-beta1' Some of the components in the Extend section show updated version, while Webform (top one) still says 5.0-rc12. My ...
-2
votes
0answers
88 views

After migration website would not load for anonymous users

we have a drupal 8.7.6 that perfectly works fine when logged in as admin - all pages, functionalities work fine with good performance. When I tried to load the website as anonymous user - it keeps on ...
0
votes
1answer
19 views

Hide SVG image based on Responsive Viewport with CSS [on hold]

Using Drupal 7 Views I have created a View which shows an SVG image file. Here is an example scenerio: A Marketing Article Node is periodically created when a specific Prodcut offer is in place, the ...
0
votes
0answers
47 views

How do I uninstall Drush 9 and install Drush 8?

I take it I can't manage Drupal 7 sites with drush 9 so I'm trying to install Drush 8. But first I have to remove 9. I tried composer global remove drush/drush but it gives errors: drush is not ...
0
votes
0answers
35 views

Prepopulating composite webform field from data passed by POST

I need to POST a JSON to a URL with a webform on it and have the WebformHandler. This is the alterForm of my WebformHandlerBase subclass public function alterForm(array &$form, ...
0
votes
1answer
23 views

How to remove tags from display in form?

I have this form tempate <div class="a"> {{ form.card.a }} </div> <div class="a"> {{ form.card.b }} </div> and I want to to frame it with tag like this. <a href="...
0
votes
0answers
31 views

Class Dompdf() not found in custom module [on hold]

inside a custom module (custom form), I need to call the Dompdf() class. Here is my code: use Dompdf; // or use Dompdf\Dompdf; ...... class myclass.... public function buildPdf(array &$form, ...
0
votes
0answers
12 views

Translation of labels

I added all the translation modules to my page. I can translate content with ease, however the labels won't tranlsate too. Ingredients (should be "Ingrediënten") 4 kopjes bloem 1 kop geroosterde ...
1
vote
2answers
26 views

Default value for datetime field definition in content entity?

I have the following datetime field definition for my content entity: $fields['start_date'] = BaseFieldDefinition::create('datetime') ->setLabel(t('Start date')) ->setDescription(t('Start ...
2
votes
1answer
31 views

Xdebug not working over Drush

I'm using Drupal VM and the Drush Launcher (0.6.0). Whenever I try to Xdebug, PhpStorm notices, but it never actually reaches my Drush command. It stops at running Drush. This seems to have started ...
-1
votes
0answers
13 views

Supported iDeal payment [closed]

Currently I am busy with a Drupal 8 website which will be used for e-learning purpose. The website will be for Dutch people with Dutch payment methods. The most important payment method here in The ...
0
votes
0answers
12 views

Updating Solr search_api filters on node deletion

With Drupal 7 I am using a SOLR search index. The index covers a particular content type. I have a view which uses the search facets and displays a paged list of items in the index. My problem comes ...
1
vote
2answers
74 views

Change page title from Views preprocess function

I want to be able to change the main page title based on some value that I get in a views preprocess function. The View is displayed as a page. function MYTHEME_preprocess_views_view(&$variables)...
0
votes
0answers
20 views

Migrate taxonomy terms with lookup based on term name

I've imported a taxonomy with names into Drupal 8 fine. When I come to reference them in another migration the data only has the taxonomy name not an id. I currently have: process: title: 'Name' ...
0
votes
0answers
20 views

502 Bad Gateway nginx for a drupal sub-directory site install

I have a default drupal 8 site install and a sub directory site install. The second Drupal site was an after thought and had to be hosted on the default site url in a sub folder. both sites share the ...
-3
votes
0answers
8 views

Nivo Slider apperas as very little square block but is not visible [closed]

After installing Nivo Slider in Drupal 7 it appears as al little square in the upper right zone of the block. The same happens with other slider I have installed
1
vote
0answers
14 views

EntityQuery with fieldcondition of link field

I have a field called field_url which is of type link. I want to query and fetch all those nodes which have field_url value like eg. www.google.com. I tried using the below code: $query = new ...
1
vote
0answers
21 views

How do I display only a field? [closed]

I have a view which displays nodes of content type "news", which has two fields: f_one and f_two. What I want is: If f_one has content and f_two is empty, display only f_one If f_one is empty and ...
0
votes
1answer
13 views

How can I make entityQuery('commerce_order') return completed orders?

Under Drupal Commerce 8.x-2.13 I find that the query Drupal::entityQuery('commerce_order') with no conditions attached returns ONLY incomplete orders (when called in the context of an API endpoint)...
-1
votes
0answers
23 views

Is it possible to send data from an HTML form to a webform? [closed]

I have already designed form. I want to do next thing: when user clicks on submit button, data is sending as if it was from WebForm. Can I do it using Drupal? And should I use ajax for it? Maybe, I ...
0
votes
1answer
12 views

Views view unformatted and outputting taxonomy custom field

Original problem I had was I setup a taxonomy called Category. I added some vocabulary to my Category taxonomy. Some of the terms I added have contain spaces. The labels should have spaces so I want ...
0
votes
0answers
7 views

Reinitialize views ajax after embedding a view

I have installed an ajax_links_api module, which basically allows you to load pages via ajax. I got everything to work, however, there is an issue with views. In my view I have infinite scroll and ...

15 30 50 per page