Questions tagged [drupal-8]
Drupal 8 is the Drupal version that was officially released on November 19, 2015. Rather than using this tag, consider posting your question directly on https://drupal.stackexchange.com/.
2,823
questions
0
votes
0
answers
22
views
Exploring Layout Builder Challenges: Crafting a Puzzle-Style layout with Sidebars on Drupal 9-10 using Layout Builder
How can the Layout Builder be employed to craft a Drupal layout resembling the puzzle-style arrangement depicted in the image "Web 1920 – 1.jpg," where the sidebar operates as a region ...
0
votes
1
answer
23
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
0
answers
45
views
How to migrate the content with images from Drupal 8 to Drupal 9 for single content type automatically?
How to migrate the content with images from Drupal 8 to Drupal 9 for single content type automatically (using Drush command)?
0
votes
1
answer
53
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
1
answer
92
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 ...
0
votes
0
answers
31
views
Conditionally preselect radio button in Drupal Webforms YAML
I am trying conditionally preselect a radio button in Drupal Webforms (I assume this has to be done with YAML?).
I have a hidden field "ref" which can have 1 of 4 values (de, fr, it, en).
...
1
vote
1
answer
51
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
16
views
Getting no result in MLT query Solr 8.11.2
I sometimes encounter situations where my Solr MLT query, using Solr version 8.11.2, yields no results, while at other times, it returns a response. I've attempted to execute the same query multiple ...
0
votes
0
answers
30
views
How to print layout builder sections inside of a twig file in Drupal 8
I am looking to set up a three column grid in Layout Builder to be printed within a bootstrap col-md-4 div. I am wondering how I can print each column within its own bootstrap column.
My main thing is ...
0
votes
0
answers
14
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
61
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
57
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
0
answers
36
views
Issue with Drupal 9 Visitor Counter Module: Visitors Count Not Updating
Description:
Hello Drupal community,
I'm facing an issue with the visitor counter module in Drupal 9. As a newcomer to Drupal, I've been trying to set up the visitor counter on my website, but it's ...
0
votes
0
answers
49
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
123
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
0
answers
225
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
96
views
Preprocess function not working with Layout Builder (Drupal 8.9.13)
I use Layout Builder on a Drupal 8 project. I created a few components, some views blocks and some content blocks (made with custom block types from the back office). In the Layout Builder UI, it is ...
0
votes
0
answers
23
views
Drupal httpswww
How to fix this error?
The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\httpswww\EventSubscriber\HttpsWwwRedirectSubscriber::redirect() must ...
0
votes
0
answers
48
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
60
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
0
answers
24
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
299
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
519
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
54
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
16
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
0
answers
11
views
search by http request to a third-party server in Drupal 8
guys.
I have a site built by Drupal which core version is 8.9.20.
And I have a search server built by other which can be request over https.
So, how can I use this search server to be my search api in ...
0
votes
0
answers
48
views
How to add the title with a sequence number to inline entity form?
I have an edit form of a custom entity that is passed to the controller:
$form = $this->entityFormBuilder()->getForm($entity_quote, 'edit');
This custom entity has the reference field to another ...
0
votes
1
answer
44
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
58
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
0
answers
15
views
Drupal : Can I have sound and playback at the same time?
My site is built with Drupal.
I have integrated a player on my website reacheable with www.alafiatv.bj But when I unmute the sound, the video playback stops. Even if I restart playback, it doesn't ...
0
votes
2
answers
114
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
127
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
97
views
Drupal 9 - Commerce 2 - variation switch results in ajax error
I'm building a drupal 9 commerce 2 site, one problem that I have is that the variation switch that works with ajax is having problems on the production server.
I have analyzed the network tab of ...
0
votes
0
answers
22
views
Drupal 8 - Search with decimal number and percentage sign is not working
In the node, I have a title which has 66.7% number in it ,and I have enable fulltext searh in the node title, but still I am not getting any result when I search with exact number 66.7%
Enable search ...
0
votes
0
answers
25
views
Facing issue while adding media in core
Drupal\Core\Entity\EntityStorageException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'sdfasernfjsdnfur jfhewruthwert' for column 'revision_log_message' at row 1: INSERT INTO "...
0
votes
0
answers
127
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
26
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: &...
0
votes
3
answers
339
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.stack.imgur.com/uIBeh.png)
I have already installed the ...
0
votes
0
answers
11
views
How to add Drupal core workbench_access to a custom content entity?
I have a custom content entity and want to use our current workbench_access scheme for control access.
This article says that workbench_access now supports multiple access schemes and maybe I can use ...
0
votes
0
answers
147
views
Error: Call to a member function loadByProperties() on null
I'm getting Error: Call to a member function loadByProperties() on null
After I have created a categoryFilterTest class to do an unit test for a categoryFilter Class using a solr search api.
And here ...
0
votes
2
answers
392
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
18
views
Fail2Ban regex for Drupal log not matching
I am trying to match and ban certain patterns in my drupal logs (drupal 9).
I have taken the base drupal-auth regex, created a new conf and tried to amend it to my requirements but I seem to be ...
0
votes
0
answers
28
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
790
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
0
answers
62
views
The service "pathauto.alias_storage_helpet has a dependency on a non existant service path_alias.repository
I'm upgrading a Drupal 8.9.20 website to 9.5.2, using PHP 7.4. After the upgrade, I want to upgrade to PHP 8.1, but still.
When doing the migration, first I run the updb command. "No pending ...
0
votes
0
answers
26
views
UseBB to Drupal migration
i need to migrate old UseBB forum to Drupal. There is module for Drupal 8 for this migration, but i am not able to migrate all topics and posts. I always get this log message:
Migration usebb_topic is ...
0
votes
0
answers
137
views
Unable to install Serialization (CSV) module in the server
I am trying to install Serialization (CSV) in our project ,It's installing and working in in the local server but when i am trying to install the same module in the server it's not installing. We are ...
0
votes
0
answers
119
views
How can I sort a views field created in hook_views_data_alter?
In a custom drupal 9 module I define a new field for a view within hook_views_data_alter(&$data).
$data['node']['node_views_mydata'] = array(
'title' => t('Node Views Mydata'),
'field' =>...
0
votes
0
answers
93
views
Drupal API: find text in paragraphs related to node
I'm trying to search article nodes for some text which sits in paragraphs which are related to them.
Let's say the search term is string: the.
I'm following this but for some reason my following ...
0
votes
0
answers
33
views
Broken/missing handler while adding a custom field to the content section
Currently i am trying to add a custom field in the content listing section when my custom module is installed. I tried to achieve the same by using hook_views_data_alter and got my field in the add ...