All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
52 views

Create a View to reference content, get paragraph field and influence how it is rendered?

I am trying to create a Paragraph type that lets a user specify a node to reference, and a couple of checkboxes that influence how content from that node is rendered. I can create a view that gets me ...
0
votes
0answers
20 views

List Resources in Descending Order

Out of nowhere, some reason anything listed under the main "resources" page (e.g. blogs, podcasts, videos), is now starting with the oldest versions first instead of the newest. I have no clue how it ...
-1
votes
0answers
46 views

How can I have a faster remote Database?

I'm new at working with Drupal remote/team. We use git for commit local file, like theme, modules etc. I have used acquia to work with remote DB with different developers but that option is paid and ...
0
votes
0answers
20 views

Insert data into the database [duplicate]

I try to save some data I get into a form in the database but I don't know how to do it. Currently, here is what I have in the database (I try to add articles). As you can see I already have 2 of ...
0
votes
0answers
19 views

Status on node is not changed during query update

I'm updating a node's status to unpublished and the status in node_field_data is changed from 1 to 0 but in the content view, status is published and when editing the node, the publish checkbox is ...
0
votes
0answers
21 views

How can I write query of search api to get row count for every condition

$query_search_api = search_api_query('search_products', $options); foreach($arrFilterSa as $machine_code => $efield_value) { if($efield_value) { if(...
0
votes
1answer
40 views

Need help with twig test template

I'm trying to create a test twig template in drupal 8, I followed "Create custom twig templates for custom module" from their website but it's not working for me for some reason. This is what I have: ...
0
votes
0answers
30 views

“Drupal is initializing” rule firing multiple times

I am using the Rules module and the event "Drupal is initializing" in a rule to check if a user has clicked their confirmation link in their email that Drupal has sent them to verify their account. ...
1
vote
1answer
46 views

Entity reference view depending on other field [closed]

I have a custom content type that contains an entity reference field (field_referencefield) and one more field as select box (field_triggerfield). The values of field_referencefield should depend on ...
0
votes
0answers
16 views

How can i get node type in template.php [duplicate]

I want to configure breadcrumbs depending on the node type. How can I get the node type in a function theme_breadcrumb in template.php? I try it, but it doe't work. function zen_breadcrumb($variables)...
0
votes
1answer
31 views

Contextual filter using any term ID

I want to set up a view with a contextual filter that will work with any term id (without selecting a specific category). I could only find some old, dated mentions of this. So I'm not sure if this is ...
0
votes
0answers
24 views

Replace taxonomy vocubulary administration page with a view

I would like to replace admin/structure/taxonomy/manage/my_vocabulary/overview with a custom view. Some of my vocabularies have custom fields that I would like to display and use as filter for the ...
2
votes
0answers
48 views

Do I have to start a multilingual site with a precise Language

I run Drupal 8.7.8 and tried to make it multilingual. Is it important in which language you start? I think I once stated with English and changed to German I have some problems, because some text is ...
4
votes
1answer
66 views

How to get a section of the menu tree based on the current node?

I am currently struggling to wrap my head around how the menu tree and menu link services work for outputting part of a menu with some custom requirements. Admittedly I don't have to do this very ...
0
votes
0answers
43 views

How to display values of certain taxonomy term above the table with the search results list based on content type, related to entering search query?

I made a view which displays a search result list as a table. The searching process works inside one content type using Search API. The system also has to look for between taxonomy terms (name) first ...
0
votes
1answer
23 views

How do I construct an authenticated HTTP request in Postman?

I have Drupal 7 installed locally on my computer with the domain set to http://drupal.local. I am trying to prepare an external script in PHP or Python (or even in pure Bash using curl, if it does ...
0
votes
1answer
35 views

How to make autocomplete search by an entity field instead of by name?

Let's say we have 3 custom entities: When creating a new operator, I need to autocomplete the license: By default we can use the autocomplete to find by name. So, we need to type the name to ...
0
votes
0answers
10 views

Theming the multiple file widget output

I'm trying to theme the output of the a file upload button in my theme... It's a multiple file upload button. Currently core outputs this as a table with draggable icons... Is there a way to render ...
0
votes
0answers
36 views

Contextual filter does not work with page with wildcard path

I'm stuck on something. I have a view with a path with a wildcard "/the-register/%". I would like to use the contextual filter, to filter on taxonomy term id or name. But when i add a contextual ...
0
votes
0answers
47 views

Drupal 8 block cached, but the expensive call still runs

So I created a custom block like this: public function build() { $output = [ '#cache' => [ 'keys' => ['bix_salary_jobs'], 'contexts' => ['url.path'], '...
0
votes
1answer
31 views

How do I handle an incoming POST request in a module?

I am really new to Drupal but I have to do a project using it and I was just wondering how to handle an incoming POST request in a module: I am creating a module that will get incoming data from a ...
0
votes
0answers
4 views

how to replace the old sorted display content in views with newly added content?

I have 5 display of contents in views then in each content type i added taxonomy which contain the order of 1-5.Now if i want to add a content to order 2 it should replace the order 2 with the new ...
-1
votes
1answer
14 views

All chevrons are processed as starting an HTML tag

Many of my webpages have code fragments on, like this: if frustration < limit ... The problem is that "< limit" is interpreted as opening an HTML tag, causing some of the content to be ...
0
votes
0answers
20 views

Sending SMS text messages from my drupal site

I am trying to send an SMS message sent to site users once a new node is created. I've installed the SMS Framework module, the Clickatell module, I've set up an account on Clickatell, and configured ...
1
vote
1answer
49 views

Preventing redirects from being cached for anonymous users

I have a content type that needs to redirect only when it is tagged as "External". All of these "External" items have a field where a URL is supplied for the redirect. During initial setup of the ...
-1
votes
0answers
27 views

Fatal error: require_once(): Failed opening required - Will not display photos

I am not a 100% certain how this happened because some time has past since I did an upgrade, yet the upgrade could be the reason I am getting the following error: Fatal error: require_once(): ...
2
votes
0answers
40 views

How to get module name from a given route object?

In a runtime context, given I have a route object, e.g. from route name user.register, how do I find the path or routing.yml or other definer of the route? Does Drupal or Symfony provide for this? ...
-5
votes
1answer
48 views

What's the use of vendor folder? [closed]

Whats the use of vendor folder in drupal 8, what it actually do ?
0
votes
2answers
48 views

How do I programmatically attach a file to a file field in a node? [closed]

I have a custom content type with a file field. I am trying to attach a file uploaded through a custom form to the custom content type. I am able to load the node and update all the other values of ...
0
votes
1answer
40 views

how to a link in Admin black toolbar

I created a custom module and how to add a link along with icon. Basically, I want to add notification icon backlinks_notifications.index: title: 'Notifications' parent: system.admin_config_ui (...
0
votes
1answer
41 views

How to render views link field in twig?

I have created a view that has many fields including a link field. I am using a twig template. my view twig name is views-view-fields--dashboard--block_3.html.twig It works nicely but I need to render ...
0
votes
0answers
25 views

How can I change label visability for fields with BaseFieldOverride in hooks?

I have a hook where I change label visibility on each field, however I'm not able to do it on fields with BaseFieldOverride (like "Authored by" and "Authored on"). Their fields are always hidden, but ...
1
vote
0answers
19 views

How to add a custom class or id to a custom display suite [closed]

I've created my custom display suite field and i it works ok, but i would like to add a custom div class or a custom div id, here is my code <?php namespace Drupal\breadcrumbs\Plugin\DsField; ...
0
votes
1answer
29 views

Querying the user list from the database

There is a need from a different team in our organization to provide a periodic export of users, roles, and users-roles relationship data in a certain Aveksa-specific format. Where (which table(s)) ...
0
votes
0answers
11 views

How to rename comment links on a taxonomy page?

I activated the taxonomy view and activated the comment fields (standard view field). And then an ambush. I can’t change the name of the link either in a view or in hooks. Add a comment to the one I ...
-1
votes
1answer
14 views

Custom Twitter Field without template?

What are my options for displaying a field from a custom content type, in the form of a tweet embed. Preferably, the field would be a URL to the tweet. I know it can be be done with a custom field ...
0
votes
0answers
16 views

Ignore custom block field content (settings) with config_ignore

I am trying to ignore the content of some fields in a custom defined block plugin. In my block plugin (class MyAwesomeBlock extends BlockBase implements BlockPluginInterface { ... }) I've declared ...
0
votes
0answers
22 views

Is it possible to auto-translate a block?

I am hosting a Drupal 7 site and require some quick translations. I have found how to set up some auto-translations which I can then modify for all the content types (articles, basic pages, etc), but ...
0
votes
1answer
26 views

How do I add an AJAX action on a select element in a ContentEntityForm to change the value of another select element

I have a ContentEntityForm with two select elements category and data_type. I want to load the options for the second select element when the first select element changes. I have tried to add the ...
0
votes
2answers
49 views

Updating core modules independently of core?

We have a vendor that is asking us to assist them in updating a core module independently of core. Is there such a thing? For example, could you update Views without updating core? My understanding ...
0
votes
2answers
21 views

Rules Redirect User at Login by Role to URL not working

I am trying to redirect any user with a particular Role at login to a URL. I am using Backdrop (Drupal 7). I have looked at most of the posts relating to this problem, and tried many of the examples ...
-2
votes
0answers
34 views

How can I allow only one selection using checkboxes, not radios? [closed]

Maybe I'm reading documentation wrong. Shouldn't this code: $form['packet_pickup_checkboxes'] = [ '#type'=>'checkboxes', '#options' => [ 'self' => 'I will pick up my own packets',...
1
vote
1answer
30 views

How do I remove the text “webform content” at the top of a block?

I have several Drupal 8 webforms, some of which are embedded as blocks. At the top of each webform, I'm getting the "webform content" text. How do I safely remove that text?
0
votes
1answer
17 views

Display a view in search results

I have Search API SOLR running on my Drupal 8 site and I'd like to know if there is a way to have view pages display in my search results. As an example, I have a database content type that allows ...
0
votes
0answers
15 views

Variation injection into product view

Problem Our requirement is a promotion slider on product canonicals that promotes similar products. We also have the stock module installed, and show a little banner that says "currently out of stock"...
0
votes
1answer
33 views

Set a Document File in a webform submission programmatically

I have writen a PHP class that saves a pdf file programmatically. The class contains a function that returns the Drupal path private://documentA.pdf I would like to attach the file to a webform ...
0
votes
1answer
25 views

Show teasers from both content type and Users together in a view

I would like to be able to create a page to show teasers from content created with a certain content type, say "Company" together with teasers from Users content. Until now, I just managed to create ...
0
votes
1answer
14 views

Database Abstraction to Fetch published content of specific content type throwing error

I'm attempting to grab all published content of type 'homepage_slide', as currently my slider loads all content unpublished or otherwise. Here is my current Abstraction query. if ($variables['...
3
votes
1answer
129 views

How can trusted host patterns be set dynamically?

I'm working on a site which uses the Groups module that will allow users to create groups on the site. The site will then allow for users to point custom domain names at the site, with the content for ...
1
vote
2answers
51 views

How do I remove the appended string from image and Javascript URLs?

I have a Drupal 8 website. I have installed the Advagg module. The URL for the JavaScript file has a string appended. https://example.com/libraries/superfish/superfish.js?pzw4cp https://example.com/...

15 30 50 per page