All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
9 views

Is it possible to send a response from a service, but return something else?

I have a block that returns a render array. I would also like to set a cookie value as well in this process. Is it possible to set a cookie and also return a render array?
0
votes
0answers
7 views

Inline entity form module fails when creating a new node and the reference method is Views

I have a Drupal 8, core version:8.8.x project, i'm using inline entity form module(latest version) for entity reference fields. Also i have tried using entity connect module but it caused various ...
0
votes
0answers
7 views

Modules page does not load

Running a setup on Ubuntu and WSL (Windows Subsystem for Linux) with Nginx and PHP7.4. Drupal 8 and Drupal 9 fresh installations loads every page no problem, except the Extend page at /admin/modules. ...
1
vote
0answers
8 views

How to render image as svg in drupal 8?

I want to display my svg image as svg code in html to easly change its color using css. I installed modules ( SVG image, SVG Formatter, SVG image field, SVG Image Responsive, SVG Sanitizer) Then in my ...
0
votes
1answer
4 views

drush migrate:upgrade not behaving as expected

I'm working with the Migrate Tools modules for the first time. Specifically, I'm trying to use the Migrate Upgrade module to import users and roles from an old Drupal 7 site to a new, Drupal 8 rebuild ...
0
votes
0answers
7 views

Drupal 8 get alias of node on presave

I was trying to get the url alias using below for pages by using the following code: \Drupal::service('path.alias_manager')->getAliasByPath('/node/' . $nid); It works for pages that are already ...
-1
votes
0answers
14 views

Is it possible to use a content type as data-entity-type?

I can use the following snippet to insert a media image into content: <drupal-media data-align="right" data-entity-type="media" data-entity-uuid="da0c27fd-211a-4f25-9318-dde2955635fc"></...
1
vote
0answers
13 views

Custom redirect to an url with “+”

I use search api module and a view of products. If I put the search text block and I do a search, It redirect to an url like this: <my domain>?search_api_fulltext=word1+word2+word3&sort_by=...
0
votes
0answers
20 views

How do I display 11 element on a view's first page but 12 on the others?

I have been tasked to create a view that would display 11 elements on the first page, and 12 on the others. My main problem is that I found a way, however the 2nd page skips the first page's 12th ...
-2
votes
0answers
14 views

Unused External Js - Google Insights [closed]

Hi tested my website on google insights. It displays remove unused javascript error. all are external scripts eg google,amp etc. Is there any solution for the same.I am already using Adv/Agg module.
-1
votes
0answers
9 views

Displaying content in the same div while using a for loop in twig template and avoiding rendering multiple divs with each iteration of the for loop

I have the following code in my twig file to render audio: {% for item in items %} {# some code ... #} {% if item.audio %} <div class="col-md-6"> <div class = "source-box audio"&...
-1
votes
0answers
14 views

Creating a link to download a file

I have observed that my uploaded pdf files are stored in this directory in my web server:- public_html/sites/default/files I want to create a download link to a pdf file say example.pdf. Can I assign ...
0
votes
0answers
11 views

How do I get the file path of a document?

I'm using views-view-fields.html.twig to display content. I can print the file name using fields.field_module_field_name.content, but the code below outputs not only the file name, but also the path ...
1
vote
1answer
11 views

Failed asserting that two strings are equal in a patch

I have submit a patch on community but I am getting an error in result that Failed asserting that two strings are equal. This is the patch. index 31bf064..fa079cc 100644 --- a/advagg_css_minify/yui/...
1
vote
1answer
17 views

Hide/show a custom block in Drupal 8

I have created a custom block of id downloadourapp and I would like to show/hide it base on certain statements. I have create my custom module along with .module file where the code should be, ...
1
vote
1answer
16 views

Find if $view object is a block or page

I am unable to debug this because when I print the display object I get a memory error from the size. so with something like this I can get the display title. function mailnow_views_pre_render(\...
0
votes
0answers
14 views

Cache tag problem causing block to disappear

We have a Drupal 8 site with a few thousand pages which are all in a huge hierarchical menu. Many pages display this menu as a navigation sidebar and each page can be customized so the root of this ...
0
votes
0answers
12 views

Back-office in English / Front office in other language [duplicate]

Is this possible the have the back-office of a drupal 8 website in English (for exemple) and the front office in one other language only ? I don't want my front office to be multilingual (with /fr ...
0
votes
0answers
15 views

Can't resolve “entity_name needs to be installed” on custom entity

I'm working on creating a custom config entity and I'm pretty confused. I created it via Drupal CLI, configured some fields, adjusted the schema.yml file, and everything is working. I read that I ...
0
votes
1answer
15 views

How can I use LottieFiles to render animations?

I created an Lotti animation and rendered it as a .json file. Is it possible to use this file in Drupal? Almost every other site builder from Squarespace to Webflow allows this file type of animation. ...
0
votes
1answer
22 views

Overriding 'user.login.http' method

I am trying to override the core login method in Drupal\user\Controller\UserAuthenticationController by extending the UserAuthenticationController class so that I can inject custom data into the ...
-4
votes
0answers
13 views

Failed asserting that two strings are equal in a drupal patch submit on drupal community [closed]

I have submit a patch on drupal community but I am getting an error in result that Failed asserting that two strings are equal.
-1
votes
0answers
20 views

How do I trigger group membership was granted for a user - Group module [closed]

I try to use group module in d8. 1. I created a new group type named test 2. I added 2 group as demo with admin is default group_membership. 3. in group 1 (name okok) I edited and added new user to ...
0
votes
1answer
30 views

why do my cache entries all double up with a #cache_redirect item?

I'm caching a piece of render array by adding cache keys to it. It's getting cached correctly, but I see two rows for every instance of it. One looks normal -- contains the render array, with a cid ...
-1
votes
0answers
13 views

redirect .asp pages to a themed html page instead of default 'Not found' using fast 404 module

I am using Drupal 8 fast_404 module to show a custom HTML page on 404 instead of drupal's 404 pages. The module is working fine for all 404 paths but does not work for paths with file extensions. ...
0
votes
0answers
11 views

Can a published node have a later unpublished revision?

I haven't used Drupal for a while and I'm wondering whether this has been fixed recently or whether I'm mis-remembering. I believe that if revision X of a node is published, it wasn't possible to ...
0
votes
1answer
15 views

How to get taxonomy tree with path auto token?

I'm using Path auto module to automatically set url of articles. Last part of url is node title and [node:title] works just fine. But url part before node title should follow taxonomy structure (tree) ...
1
vote
1answer
14 views

Select order type and store with hook_form_alter()

In drupal commerce, I have 3 stores and 3 orders type When placing a manual order, i am first asked to choose the store and the order type ( which are entities), with radio buttons. With a select ...
0
votes
0answers
7 views

Adding new paragraphs without altering translation with Lingotek

I'm having problems while translating with Lingotek, if I want to touch any translation to fix it's fine, but when I add a new paragraph for it to be on the translated page it needs to be "re-...
0
votes
0answers
8 views

Use default menu links in multilingual site

I have a drupal 8 site with Greek and English installed. My main language is Greek. I have only translated some of the pages in English. I have a flag to change the language in these translated ...
0
votes
1answer
16 views

Fetching and rendering custom-library generated blocks in twig

I am using the following code in my theme to fetch 3 blocks (each containing 4 fields) generated via the custom block library interface i:e all 3 block are of the HomePage-Block type: function ...
0
votes
1answer
14 views

Selector bulk action missing

In the media library, I should see a dropdown selector that allows me to delete bulk items. Is there a way to turn this off and on? I've inherited this site and I'm not sure if the original owner has ...
0
votes
1answer
22 views

Output node reference field data in page.html.twig

I have a homepage node-type in which I have an entity-reference field holding 3 references to 3 separate custom blocks. The theme I'm working on requires that my 3 element reference field needs to be ...
0
votes
0answers
17 views

Select which assets and scripts should load on certain pages

This is to avoid loading other assets and scripts that are not needed for certain content types, pages, etc. I have seen this in wordpress, there are performance plugins that allow you to selectively ...
0
votes
0answers
21 views

DBupdate schema update can't rename table because it already exists -

I recently updated a couple of modules and core: To Drupal 8.8.6 Modules updated: metatag, Search API, Feeds, External Links and EntityQueue. There was a small hiccup that broke the site, so I re-...
0
votes
2answers
55 views

Trigger a Drupal behavior from another module in Javascript?

The block_ajax module defines a behavior in its module: https://git.drupalcode.org/project/block_ajax/-/blob/8.x-1.x/js/refresh_ajax_block_command.js I want to initiate this call every 60 seconds so ...
0
votes
1answer
20 views

Is filtering using images possible?

Novice here. I'm on Drupal 7. I have a content type with a title, image and body field. I've created two views to display that content. The two views are on a page and I need help connecting them so ...
0
votes
0answers
16 views

How to migrate content using migrate-manifesy?

English is not my native language so please be patient. I'm totally new to Drupal development so I was learning how to migrate from Drupal7 to Drupal8 due to some work necessities to test a POC, the ...
0
votes
0answers
26 views

User field to entity reference

I have created a content type, with a custom field. Then i have created an Entity Rereference on the users fields, so the user can select from those nodes on their user account settings. The idea is ...
1
vote
1answer
19 views

How can I hide search results until the user submits the exposed form?

I have a fairly straightforward view, which exposes a simple keyword filter to the user. Currently, when I first land on the page containing this view, all records are displayed (i.e., the search ...
0
votes
0answers
18 views

My custom menu link class are being overwritten by the “is-active” class

I have a standard navigation menu. In the Drupal UI, I've assigned a CSS class to some of the links on this menu. These classes are being correctly applied to the tags in the rendered menu. However, ...
0
votes
1answer
28 views

Can not override template for specific view

I'm new to Drupal so this might be a noobish question. I have a view called 'Category' where all posts are listed that belongs to the chosen category. I would like to override the views-view-...
0
votes
1answer
56 views

How can I add classes to the rendered “body” field on a content type?

Preface: I don't often work with Drupal, so I may not be using the correct terminology or fully understand the stack. Please bear with me, I'll do my best to be as clear as possible. I want to filter ...
0
votes
1answer
20 views

Cannot export theme settings to the .info file

I am using Drupal 7. After modifying a setting for my theme in the Appearance menu, I get the following alert message on my site's homepage: The settings for this theme are currently served from a ...
0
votes
1answer
14 views

Sort Views table field by alphabet

Table field 'Manufacturer' is set to sort by ascending or descending and when you sort it. At first it looks like it's sorting by alphabet, it starts with A, B, C etc. but eventually ends up with A ...
-2
votes
0answers
15 views

Why aren't I able to see any chart?

I'm testing charts module I have followed several tutorials as reference like: https://www.ostraining.com/blog/drupal/create-charts-with-views/ https://opensenselabs.com/blog/tech/use-charts-drupal-...
0
votes
0answers
10 views

Relative URLs for file links when moving between environments

I'm trying to sync some Drupal 7 basic page nodes that have file fields on between my local development and my production environments. Production is at example.net and development is at localhost:...
0
votes
0answers
15 views

Can't remove image from image field on content type

doing some last minute maintenance on a D7 site. Recently needed to change some of the existing content and am finding that I cannot delete images. In clicking the "Remove" button associated with the ...
0
votes
2answers
27 views

Why does node_access_view_all_nodes() return true for anonymous users?

On a Vanilla Drupal install (tested on D8 and D9), this will print "1": drush eval 'echo node_access_view_all_nodes() . PHP_EOL;' Stepping through the code reveals that it happens because there is a ...
-2
votes
0answers
19 views

Item Textarea doesn't work correctly with the spacebar under Chrome Browser [closed]

I use Drupal v8.8.5 and Webform v8.x-5.11. Issue only with Chrome Browser, because all it's correct with others browsers. In a Webform with the object , users wish enter normaly text on zone "...

15 30 50 per page
1
2 3 4 5
1653