Questions tagged [8]

Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.

Filter by
Sorted by
Tagged with
-3 votes
1 answer
84 views

How do I read element attribute from $form_state?

I am trying to hide entity id from my autocomplete fields. I downloaded a jquery script that removes the bracketed id and updates the autocomplete element with the new element. It then writes the ...
  • 105
0 votes
0 answers
49 views

Counting node type in View throws SQL error

I have field Content:Type that I aggregate with COUNT to show the number of nodes of that specific content type. But I get this SQL error: SQLSTATE[42000]: Syntax error or access violation: 1140 In ...
0 votes
1 answer
32 views

Add formating to custom views's field (to remove sourounding quotes for the JSON values)

My custom views field returns JSON as a string: "order_line_items": "[{"sku":"GC2","quantity":"5.00","price":"50.00"},{"...
user avatar
0 votes
0 answers
36 views

Use contextual filter and path arguments

I have a view, displayed on /user/%user/library, which shows a list of nodes. I want to add a contextual filter, for example field_premium_id. I tried to add the two arguments there, but %user is not ...
user avatar
0 votes
1 answer
19 views

Actual file permisions

With Drupal 8/9 I want to: Have a private file folder Upload files to it (ideally by whatever method but media type will do) Allow only authenticated users (ideally set by role) to view the file (...
  • 1,157
1 vote
2 answers
109 views

How can I change the title of the node/add page of a specific content type?

I want to change the title of the node/add page of a specific content type. Twig debug only shows me file names that would also change the titles of other content types. There was a module for this in ...
0 votes
2 answers
193 views

How do I add HTML markup to the title?

I am trying to alter my title to include html. I have tried the following function MODULENAME_views_pre_render(\Drupal\views\ViewExecutable $view) { if ($view->id() == 'products_test') { ...
  • 153
0 votes
1 answer
75 views

Pass arguments to the entity_browser iframe url (modal)

I have a form I have a field of type Date Range, I also have another field of type entity_browser(modal) with a selection view widget. The normal behavior when I click the Button of the entity browser ...
  • 351
1 vote
0 answers
80 views

Need help regenerating images after image cache flush

TL;DR - Flushed image cache for an image style that is used in basically every blog. They are not regenerating on page load. They regenerate when i edit and save the node. Looking for ways to ...
-2 votes
1 answer
339 views

How can I install centreon/centreon?

My website is built with Drupal 8.3.2. I want to update to to Drupal 8.9.x, but I don't want to move to Drupal 9.x. I ran the following command. composer update drupal/core-recommended:8.9 --with-...
1 vote
1 answer
130 views

MenuLink vs MenuLinkContent - what's the point?

I'm struggling to figure out relationship between MenuLink and MenuLinkContent. I'm creating new menu item like: $menuItem = MenuLinkContent::create($params); I can also query those elements like: $...
  • 405
0 votes
0 answers
62 views

Off-site payment gateway success/failure return is caught by a differnt custom module

I have created an offsite (redirect form) payment gateway Drupal 8 module for Opayo.co.uk. following drupal commerce documentation. Issue: My custom off-site payment gateway module based on form ...
0 votes
0 answers
29 views

How to set bee / bat unit timeline to be unavailable by default?

As in question. I'm using bee (based on bat) module. Currently all time is green, available for booking. My task is to allow user to select availability period first, then allow bookings only in ...
  • 4,955
0 votes
0 answers
57 views

Get term custom field value from referenced entity

I have a node with a taxonomy term reference field. That taxonomy is a list of names can be assigned to the node and it has its own field with an email address in it. I'm trying to create a rule that ...
0 votes
1 answer
71 views

What is the token for an original image URL?

The is the token to get the url for a "large" image style: [node:field_image:large:url] What is the token that will give me the original file URL for the image? That is, not an image style ...
-2 votes
1 answer
25 views

How do I capture bank account name, number, branch code, etc. in checkout for offline processing?

The Commerce Bank Transfer module claims this is part of Commerce 2.x, but I am not sure how to accomplish it. Any suggestions would be appreciated.
  • 2,466
0 votes
0 answers
17 views

Exposed filter on a number field also shows results when filtering with less digits

I have a number field that contains mostly 4/5-digit numbers. This field is exposed in a view. I want to also show results when putting only the first, second, and third digits of the number into the ...
-1 votes
1 answer
50 views

What security configuration should I use in order to allow deployment?

During the deployment of a container in the AWS Fargate ECS cluster, although the Docker container remains in Running state, when I open the public IP of the service where the site should load, I get ...
0 votes
0 answers
74 views

Display images from private files to public

Is it possible to display private files/images to the public for example with tiwg tweak? I've tried examples from here: https://www.specbee.com/blogs/twig-tweak-in-drupal-9-functions-and-filters ...
  • 1
0 votes
1 answer
46 views

How to get low resolution image urls from json:api?

The json:api put provides a link to file--file node types, but the url is to the original image file. How can I get a lower resolution image file via json:api to avoid users from downloading a MB+ ...
0 votes
1 answer
74 views

Render Submitted Fields of a Form to Email with Title + Value

I have a quite complex form based on \Drupal\Core\Form\FormBase with many (partially nested) fields and want to send the full contents in an email on submit. Currently I have public function ...
  • 87
0 votes
0 answers
60 views

How to find all nodes that have no translation for specific language?

I am looking for a programmatic way to find all nodes of language en that have no translation for language XY. Is there even a way to do that without raw sql? I tried using entityQuery but I cant get ...
  • 2,433
0 votes
1 answer
306 views

How do I set the expiration value for tempstore.private service?

I am using the tempstore.private service, which uses an expiration time of one week. I need to change this; changing it globally is fine. There is an $expire property, but I've no idea how I'm ...
  • 67
2 votes
2 answers
116 views

robots.txt file per environment

We are using Drupal 8.9 and we have an EC2 stage site and our main site, which use the same code base. Is it possible to have a different robots.txt file for each site (environment)? We don't want the ...
0 votes
0 answers
37 views

Why would a contributed module try to load one of its files from a custom directory?

I built a module on a local instance in my module/custom directory; I then published it on drupal.org, as Group by Field Widget. For some reason, when I install the release 1.1.1 via Composer, I get ...
  • 139
0 votes
0 answers
55 views

Drupal autocomplete jquery UI theming?

I am using search autocomplete which uses the core autocomplete which uses jquery to position the autocomplete form. The html output is along the lines of <div class="ui-menu ui-autocomplete ...
  • 153
0 votes
1 answer
29 views

Referencing media from theme settings and display it on front page

In a custom subtheme of classy base theme, I made a theme setting for referencing an image media file. Contents of file theme-settings.php: <?php use Drupal\Core\Form\FormStateInterface; use Drupal\...
1 vote
0 answers
15 views

How do I decide where to put these fields in a Commerce License architecture?

I'm creating a License Type using Commerce License. It will allow a user that owns a group to purchase seats on that group for other users. Therefore, at purchase time, I need to associate a group ...
  • 111
0 votes
0 answers
28 views

Contextual filters don't work with url aliases

I use contextual filters in a view to get the node ID from the URL (for example, node/6716/v1-vv-autor). These are contextual filters settings. I would like to set a URL alias for the node, set using ...
0 votes
0 answers
23 views

How do I filter the release based on the selected product in an exposed filter?

I have a content type (Book page) with reference fields to two taxonomy vocabularies (Product and Release). The fields of that content type are the following. The terms of the Product vocabulary are ...
2 votes
2 answers
461 views

"RuntimeException: You have requested a non-existent parameter 'app.root'"

After I clear the cache, I get this message. Symfony\Component\DependencyInjection\Exception\RuntimeException: You have requested a non-existent parameter "app.root". in Symfony\Component\...
0 votes
1 answer
89 views

How update a webform submitted value clicking in a button?

How can I update a submitted data just clicking in a button? I have created a View table of webform subissions and I would like to add a collumn with a button "Aprroval". When user click on ...
  • 33
0 votes
1 answer
88 views

Change product price title in form

How can I access the label of the product price field to change it for example to "amount" instead of "price"? The html for the field is: <div class="js-form-item form-item ...
  • 733
0 votes
1 answer
66 views

How can I remove PDF download button?

I am using the pdf_reader module and showing my PDF on the node. Now, I am supposed to hide the download button. For this purpose, I wrote the below javascript file: jQuery(document).ready(function($) ...
  • 547
0 votes
1 answer
84 views

How to stop cron process without rebooting my server?

I have tried the following: drush php-eval "\Drupal::lock()->release('cron');" This had no effect. I'm still seeing "Attempting to re-run cron" errors pile up in the log. I ...
3 votes
1 answer
330 views

How to re-index all content for the core search engine?

Is there a way to re-index all content for the core search engine? In older versions, you could reindex with drush: drush search-reindex --immediate --verbose However, this does not appear to be an ...
0 votes
1 answer
20 views

Does the "Search keywords" exposed filter depend on the core search index?

If I create an exposed Search keywords filter for a view, does this functionality depend on the core search engine? Do I need to index the site at admin/config/search/pages for a Search keywords ...
0 votes
0 answers
24 views

Hide active term from the term page

I have an article content type that has a taxonomy reference field that stores the author name. It can hold multiple authors in case the article is authored by more than one author. As per the image ...
0 votes
0 answers
26 views

How to change an exposed filter destination url?

I have a blog view that contains some exposed filters. Using the Views exposed filter blocks i added the filters into the articles that are listed in the blog. The problem is that when i use the ...
  • 3
0 votes
0 answers
16 views

Create custom views filter to return nodes based on elapsed business days since a date field

Background: I need to produce some tables in Views that show entities that have had a certain status (based on a taxonomy field) for x number of business days. I've already set up fields and rules so ...
0 votes
0 answers
16 views

E-mail uploaded file from file field in node to user using Rules + Swiftmailer

I have a node type "invoice" which contains a file field "field_invoice" (pdf). I'm setting up following rules action and am searching for a way to rules pick up the file from &...
  • 92
0 votes
0 answers
34 views

Term weight is a string?

I am getting a taxonomy through a REST plugin, and I return it as an array keyed by id, since I also have to access it by id. But when I display the values in an HTML select, I have to order it by ...
1 vote
1 answer
218 views

Use AJAX not working when view is rendered programmatically

I have a view that is being rendered like this $view = Views::getView('view_id'); $view->setDisplay('block_1'); $view->execute(); $render = $view->render(); $html = \Drupal::service('...
0 votes
0 answers
50 views

No more access to user login

The URL mysite.com/user/login redirects to home page, so that I've lost access to administration. I tried mysite.com/?q=user/login. Sadly, same redirection. :-( Has anyone encountered this probleme or ...
  • 11
0 votes
0 answers
50 views

Right way to print logged in user custom fields [duplicate]

What is the right way to get the field value for the account used from the currently logged-in user and print it in a template file, for example a block or a page template file? I was trying to use ...
  • 33
0 votes
2 answers
51 views

How can I alter the login form in the login block but not in the login page?

How should I use hook_form_alter() to modify the user login block but not the user login form page? Everything I've tried either modifies both entities or doesn't work, not even using the following ...
0 votes
0 answers
28 views

How do I update existing paragraphs?

I'm writing migrations to import source data as paragraphs. This is the main migration (which is working). id: resource_chapter_section_text label: Import content from the resource.body column in the ...
0 votes
0 answers
35 views

Mock user with fields to use in a functional test

How is it possible to mock a user with some simple text fields (for example, First name and Last name) in a functional test (which extends BrowserTestBase) without creating the configuration for this ...
0 votes
0 answers
7 views

Create a line break for a link field in views

I have a table view with 5 columns and 3 of the columns is a link field. I realized some of the entries have a long title field which causes everything to be compacted and misaligned. Currently, I do ...
0 votes
0 answers
43 views

How can I use the join handler plugin with groups and multiple conditions?

I'm trying to build a custom view filter and in the query method I need to create this join. LEFT JOIN node__field_list list ON node_field_data.nid = list.entity_id AND list.deleted = 0 AND (list....