2,800 questions
0
votes
0
answers
30
views
Redirect to a specific page using htaccess on the status code 400
I want to redirect my site to a specific page (Ex: /example-page-400) if the status code received from the server is 400. Actually I am having a drupal site on which SSO login is enabled. In some ...
0
votes
0
answers
33
views
Page not found after refreshing in Drupal 8 (DKAN)
I have a DKAN platform, my frontend is ReactJs, and my backend is Drupal. I created 5 new pages on the frontend with the specific routes:
export const routes = {
HOME: BASE_ROUTE + "/",
...
0
votes
1
answer
50
views
Google Captcha is hidden upon calculating the shipping cost in Drupal Commerce checkout form
I have the following form
function beyond_shipping_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if ($form_id == 'commerce_checkout_flow_multistep_default') {
$...
0
votes
0
answers
39
views
Not saving total price for orders in drupal commerce
I tried to implement saving total price in orders but it`s returning an issue like before saving everything is good, but after it debug returning null
protected function createOrder($order_data) {
...
0
votes
1
answer
944
views
No route found for "GET http://localhost/drupals_new_test/web/"
Once I create a new database, and import all data from the old one, update my settings and restore the folders and files, I get this error:
No route found for "GET http://localhost/...
1
vote
1
answer
177
views
Parent menu link opens children when clicked, instead of going to link (Drupal)
I have created a Menu in Drupal and the structure look like this:
A parent link with children. In my website it looks like this:
Note that "products" takes you to /products. However, when ...
0
votes
1
answer
631
views
How to override page.html.twig in module for my custom page
I have a custom page defined in routing with it's ControllerBase class. I want to override the whole page.html.twig for this page.
If I use hook_theme and define there 'page__test' => [...] it ...
0
votes
1
answer
200
views
How to render a specific page using my template mypage.html.twig?
I want to render a specific page using my own template. My theme regulating html.html.twig and page.html.twig. I want to rebuild completely the page.html.twig but only on specific page.
In my module ...
0
votes
0
answers
30
views
error installing module HybridAuth and Drupal 8-10
i try to install HybridAuth module on Drupal 8 and 10 using composer on ddev but i had errors :
module : https://www.drupal.org/project/hybridauth
erreor:
ddev composer require 'drupal/hybridauth:^2....
0
votes
1
answer
85
views
Is there any way to show combined search result from an external api and also internal content from drupal 8
I have a Drupal 8 website which shows articles from an external API. also my basic page contents are coming from Drupal itself. I need to implement a search functionality so that search will return ...
0
votes
1
answer
829
views
How to get the image url to display it in my twig without and with node
I create a custom form then I retrieve the fields in a table then I return the table in a branch then I extract the contents of the branch in a variable which I put in a node.
and it does not show me ...
1
vote
2
answers
1k
views
Drupal 10 views: fields/custom text show translated label for field
I am building a bilingual site with Drupal 10 and I am using views to show content items listings. In my views I am using field: Custom text to format the teasers of each item the way I want.
I have ...
1
vote
1
answer
341
views
How to Display Translated Content by Language in Drupal Views?
Title: How to Display Translated Content by Language in Drupal Views?
I have a View in Drupal with multiple displays, each configured as follows:
Display 1: Articles
FILTER CRITERIA:
Content: ...
0
votes
0
answers
20
views
Hosting Migration Drupal 8 Link Faliure
I'm changing my hosting from a VPS server to the cloud
I've copied the files and database from the old site to the new one.
I have updated the data to access the database but there is a problem ...
on ...
0
votes
2
answers
609
views
Drupal Front Page "404 Page Not Found"
I have a website "https://www.example.com" which is suddenly showing 404 Page Not Found.
Header Footer is coming but in the body part its showing nothing but appearing a Page Not Found text.
...
1
vote
1
answer
264
views
Drupal 7 to 9 migration - how to customize the migration yml generated by migrate-upgrade
Am trying to customize migrations so that i can map the data to specific fields but after i edit files am not able to place then to active configuration successfully.
My process so far
how i generated ...
0
votes
1
answer
92
views
Inconsistent ability to adjust blocks using Twig due to naming conventions (underscores, etc)
I am having difficulties getting my Drupal blocks and regions to interact with my Twig Template Files. I suspect some of it may be syntax but a lot of it seems to be understanding what to name my Twig ...
0
votes
1
answer
317
views
Create custom field for shipping method in Drupal Commerce 2
I'm trying to add a new field called Opening Hours for commerce_shipping_method bundle. I'm having hard time finding examples how to do this and those I tried didn't really work for me. In fact, not ...
0
votes
2
answers
1k
views
Attaching Custom Libraries to Drupal 10
I'm trying to manually load the OwlCarousel2 Libraries on my Drupal 10 site. I have downloaded the library and updated the right files but it is not working (I don't want to use the Owlcarousel2 ...
0
votes
0
answers
203
views
Drupal : Accessing "Json Page" type content as headless API with "JSON:API" module
I've created a JSON Page type content on Drupal 8/9/10 as below that has JSON Config as below.
I used this field to build the headless content that needs to exposed to UI Apps.
I want to expose this ...
0
votes
1
answer
199
views
Ajax in custom module of Drupal
I have one custom module created in drupal having one form.
public function buildForm(array $form, FormStateInterface $form_state) {
$form['conditionOrDisease'] = [
'#type' => 'textfield',
...
0
votes
1
answer
56
views
Class 'EspressoDev\InstagramBasicDisplay\InstagramBasicDisplay' not found in instagram_block_cron() Error
I am using Drupal 8.9 and a module named Instagram block.When i updated the module "Class 'EspressoDev\InstagramBasicDisplay\InstagramBasicDisplay' not found in instagram_block_cron() " ...
0
votes
1
answer
759
views
Setting up the cache tag and invalidating cache of a block with a hook and an event?
I am trying to set this up without using a block visibility plugin and it works for the user but internally I would like to have better control by using my own cache tags.
My problem is I can't seem ...
0
votes
2
answers
2k
views
The specified database connection is not defined: default for Drupal drush
I have the following configurations for my Drupal site:
sites/mysite/settings.local.php
$databases['default']['default'] = array(
'database' => 'mydb',
'username' => 'root',
'password' =&...
0
votes
1
answer
156
views
Drupal: Updating a module broke the site
After I tried to update a module in drupal, through the admin panel, it broke down & displays Site encountered an unexpected error. The site was almost 3 years old and is on I believe version 8 ...
1
vote
0
answers
18
views
Custom Module Drupal 8
Drupal 8 question I'm having trouble creating a custom module The problem is that I am uploading an excel file that contains the shipping card numbers, and I choose the type of card by choosing from ...
0
votes
1
answer
105
views
In drupal 10, Can i use devel generate module for ecommerce site?
I have content type with fields Product ID, Name, Image, description, category ( taxonomy ), price.
Can i Create sample products and select the respective sub categories with devel generate module ?
0
votes
0
answers
82
views
JavaScript submit form fields to PHP back-end throws Unsupported Media Type
I have two sites running separately, where the front end is one end, which connects to multiple back-end systems.
The end goal is to be able to submit a form with text and video fields to a PHP(Drupal)...
0
votes
2
answers
216
views
How can i place a region insde a block template on drupal 8
I have a block named block--system-branding-block.html.twig which contains some menu items. I need to show contents from block which is placed in a region as submenu item. How can i place a region ...
0
votes
1
answer
350
views
How to remove or disable " Subject " In Comments Field in Drupal 10
I am using Drupal 10
I have created a content type (Film Review) & added few fields like Comments & Image.
So When i try to post comments using various roles ( for eg: Anonymous Role ) Comment ...
0
votes
0
answers
375
views
Is there a faster way to create conditional email handlers with Drupal 8 than adding emails one by one?
I'm creating a Drupal 8 webform that will collect issues submitted by users. The users belong to different institutions, and I'd like to send the submission to the appropriate institutional contact (...
0
votes
0
answers
42
views
Solr not connecting to Drupal 8 site after changing root SSH login on Linode
I recently changed the SSH login for the root admin account on my Drupal 8 website hosted on Linode. After this change, Solr lost connection to the site and is showing the following error message: &...
1
vote
4
answers
1k
views
Drupal 8:The website encountered an unexpected error. Please try again later
Drupal 8:The website encountered an unexpected error. Please try again later. i am getting this error while installing the drupal 8
(https://i.sstatic.net/uIBeh.png)
I have already installed the XAMPP....
0
votes
2
answers
1k
views
Export/Import of custom block in drupal
How to export/import custom block in drupal 8/9?
Content of the custom block to be made changes in other user.
0
votes
0
answers
32
views
Is there a module that shares one input form for multiple entity types
Drupal shares fields between multiple entity types.
Is there a module that shares an input form view for multiple entity types?
Configuring a form for each entity type is a headache.
0
votes
1
answer
1k
views
How to set the value of an entity reference field with the value of another entity reference field in a hook function - D9
I am using a hook function to create a commerce product when a node type of PL is created.
I have 2 Entity Reference fields:
Name of Project - Which references content
Type of Use - Which references ...
0
votes
1
answer
142
views
Is there any hook available so that i can add some columns or buttons in the content section of drupal
Here i want to add a my own custom column in the content section through my own custom module which should automatically appear on the content section when module is installed , so in order to do that ...
0
votes
1
answer
813
views
How to print values of multi-value ()Drupal) Paragraph fields in separate columns
I have two fields in a custom paragraph type, Person. Each instance of paragraph type holds two values, that is, it will include two persons/people. I am working on the theme of the type (paragraph--...
1
vote
1
answer
1k
views
Drupal 9 Webforms - using webform_token and testing for defined fields
We have 6-8 different webforms on our site which submit via ajax and display the conformation message inline. I would like to put data from the form submissions into a JavaScript data layer so we can ...
1
vote
2
answers
2k
views
How to make image field's alt and title attribute values auto filled from token value in Drupal 9
In Drupal 9, We have a image field in the content types where we have a option to provide values for alt and title attributes. These values will be used for SEO improvements.
Is there any way or ...
1
vote
1
answer
270
views
Drupal 9 - Allow access to a page only from a specific domain
How to allow access to a Drupal file/page only from a specific domain?
I have tried php filter module but enabling this module can cause security and performance issues as it allows users to execute ...
0
votes
1
answer
79
views
How to enable redirect in Drupal 9 on launch of application
I have enabled Keycloak authentication in a website built with Drupal. As soon as I launch the website I want to redirect to Keycloak's login page if the user is not signed in.
Is there any way to ...
0
votes
1
answer
91
views
set a custom theme for drupal admin panel
Hello everyone, I have an admin dashboard that I want to use as the main theme of the admin dashboard in Drupal.
How can this be done?
I did a lot of work on this including editing the default Drupal ...
0
votes
1
answer
161
views
How we can translate drupal error message
Can we translated below drupal error message in turkish language from where to translate?
Temporarily Unavailable
The website that you're trying to reach is having technical difficulties and is ...
1
vote
0
answers
145
views
Drupal 9 webforms, twig email doesn't contain complete path to files
I have a webform that allows image uploads and, upon submission, emails information in HTML via a TWIG template. I am using the following TWIG to output the image upload field:
{{ webform_token('[...
0
votes
0
answers
344
views
Why did jquery code stop working after adding once() and each() to Drupal behavior?
There was a problem with the fact that part of the js code worked several times, so I added once() and each() (see comments):
(function($, Drupal) {
Drupal.behaviors.collapsedPricing = {
attach: ...
1
vote
2
answers
803
views
Drupal - Disable SAML login in local instance
I am very new to Drupal. I have done the local setup and the front end is working fine. Now I need to login to the admin interface. Seems like there is a SAML configuration and when I try to access ...
0
votes
1
answer
274
views
Drupal 8/9 how do I allow specific sub-folder to execute python scripts?
I have a Drupal 9.x site running in the web-root directory (public_html/). I need to run some python scripts (currently in public_html/python/) and show the output in an iframe called in a Drupal twig ...
0
votes
0
answers
2k
views
How to get current path with query string?
In Drupal-specific Twig template I can get current path like
{% set pagePath = path('<current>') %}
But such a way doesn't contain query string e.g. ?param=value if the latter is present in the ...
1
vote
0
answers
384
views
drupal 9 phpunit functional testing database user issue
I'm trying to get up and running with drupal php functional testing. However there seems to be something wrong with my phpunit.xml cofiguration. When running the test i get the following error:
...