All Questions

Filter by
Sorted by
Tagged with
2
votes
1answer
62 views

How can I save and exit from the middle of editing an already completed multipage webform submission?

I've got a multipage webform I'm letting users edit after they submit. There are many pages, and I don't want to force the user to go all the way to the last page to save. Is there a way to submit/...
1
vote
1answer
21 views

Make the suggestions of an autocomplete exposed form clickable

I'm using Drupal 7 and Views. I have an exposed form of type "autocomplete". I would like the suggestions to be clickable, which avoids having to click on apply. Do you know how to do it ?
0
votes
1answer
36 views

Show content whose “team” field matches the user “team” field

The users on my site all have a field named "team" and my content types also have the same field. I want to create a views page that shows all nodes where that "team" field equals ...
0
votes
1answer
45 views

Placing a programatically created menu

I'm creating a menu programatically using this code $this->menu = $this->entityTypeManager->getStorage('menu')->create( [ 'id' => $properties['id'], 'label' => $...
0
votes
0answers
34 views

Single Image field importing as Multiple Values

I've created a CSV feed via Views Export that exports out data for a content type. I'm then using Feeds to import that onto another Drupal site. Everything except the images are working, when I run ...
1
vote
1answer
41 views

How can I change which view wins over two using the same path?

I have two views in Drupal 8. The standard Taxonomy term (content) view, path: /taxonomy/term/% My custom view for just one term at path: /term-alias When I go to my custom term, I see the view for ...
-1
votes
1answer
28 views

Configuration Mime Types error

I have a Drupal 8 installation and am developing the site. It's not operational yet. I have 2 problems i think are related. First of all a selected image in a custom content type isn't uploaded or ...
0
votes
1answer
12 views

REST API OAuth Authorization and Authentication

I am very much confused about the way OAuth authorization and authentication works in Drupal 8/9. Let me put my points first, please correct me if I am wrong. Authorization is when an entity proves a ...
1
vote
1answer
31 views

hook_form_alter() Ajax suffix replace

I'm trying to rewrite a form item's suffix on an AJAX callback and it keeps prepending the first choice and then doing nothing else. My code: function my_dashboard_form_alter(&$form, \Drupal\Core\...
1
vote
0answers
21 views

Unable to set author and created time when translating node programmatically

I am adding translation to a node programmatically using a script which I run with drush scr. Everything works as far as adding translation and copying all the fields over. However, I am not able to ...
-4
votes
0answers
18 views

Styling listing page for taxonomy terms

I'm styling a listing page for content marked with a certain content keyword (taxonomy term). I already have a views-view-unformatted--taxonomy-term--content-keyword.html.twig file to display the ...
0
votes
0answers
17 views

workflow rule data selector example

I need to add a user role when the workflow value is set to "approved". This role is setup already. Use case: An authenticated user fills out a webform, I have a custom module to add an ...
0
votes
2answers
60 views

How to clear the a block cache programmically

I have a custom block that display some information from a custom configuration form. I want the block to be cached, however, I want the block cache to be cleared every time I save the form. I would ...
0
votes
1answer
61 views

Why am I not seeing CKEditor buttons on prod?

Okay, so I configured the Full HTML text format and added some buttons to CKEditor locally in a Lando environment. Then I exported the configuration with drush cex, committed it, pulled and imported ...
2
votes
0answers
26 views

Different 'Items Per Page' on different pagination while using 'views_infinite_scroll' module

I am using views_infinite_scroll module to load more nodes with 10 nodes on every click and views AJAX is enabled. I am working on a requirement like as, I have 100 total nodes and getting in a view ...
2
votes
0answers
62 views

Validate a form multiple times

Is it normal that my validateForm method in Form API doesn't trigger second time i call it? And if yes, how do i trigger it multiple times? I've got multistep form and i want to validate each step ...
0
votes
1answer
47 views

Why is this if statement not working in twig?

It's a bidirectional D9 site where I removed dir=rtl from my theme's html.html.twig with an if statement and it's working fine. I did that to avoid an MS browsers bug ignoring position: sticky in css ...
1
vote
1answer
31 views

array_flip() error when using phpunit

I've got a form, which when I use normally works perfectly fine, but when I load the form in phpunit I get the following error : Drupal\digest\tests\DigestSubscriptionFormTest::testFormDisplay ...
0
votes
0answers
22 views

Alter Address field in order to add a list of cities

I need to alter the address field because I want to transform the locality textfield in a nested select box along with administrative_area value. I've tried to do that with a hook widget_alter, form ...
0
votes
1answer
16 views

Hide block if no submenu in Twig

I'm creating a node--page.html.twig and I'm using twig_tweak to help render a block for my sidebar to display the sub-menus. Is there a way to hide it if the page doesn't have any submenus? Here's my ...
0
votes
0answers
45 views

What is the purpose of the Manage Display in Content type?

For example, in the Body field there is a LABEL with the following values: And there is FORMAT with such values: How does something change on the site depending on the selected values in the Manage ...
0
votes
1answer
26 views

Query remaining field names from a database table

There's a database table. I know only one field name on the database table: username. How do I view remaining field names on the table? namespace Drupal\fixx_helper\Controller; use Drupal\Core\...
0
votes
1answer
26 views

how to apply 'noindex' to all nodes and leave Alias indexable to prevent perceived duplicates for SEO

We're working with an SEO specialist who is finding that our underlying /node/### page URLs are competing with our aliases and bringing our page ranking, etcetera down - because they're perceived as ...
1
vote
0answers
21 views

How can I access all of the inline entities in a custom inline entity form validation?

I have a registration form with inline participant entities like this: I'd like to add a custom validation that prevents duplicate email addresses for the participants. In the example above, the user ...
0
votes
0answers
29 views

Add a JS app in Acquia root domain folder

I have a decoupled app, both backend and frontend parts, and I want to add them to Acquia cloud. Right now the js app is placed in a subfolder in drupal's docroot folder. What I need is to have the JS ...
-3
votes
0answers
51 views

Manually coding a template to display multiple content items?

I want to create a nested grid that I can use to manually place content into for a responsive-style layout. Background: I've tried nesting Paragraphs which quickly became apparent would become a ...
1
vote
2answers
18 views

How to order search results based on author field content

I am using Drupal 8 search views, I would like to order the search result so that the content that's author has field "X" filled out should be ordered first and all other content where the ...
2
votes
2answers
35 views

How can I temporarily prevent any logins?

I've a high visitor website in Drupal 6. For performance reasons I've removed Captcha on all pages. I don't want anybody to log in and we don't logout. Can I rename any Drupal file related to login-...
-7
votes
1answer
52 views

How to redirect the user to the home page?

I have Drupal 8.9. When users access the site, they are redirected to their user account page. I want them to be redirected to the home page. If I leave the Default front page setting empty, the users ...
0
votes
2answers
40 views

Problem with drush and site alias (Drupal 8.8.6 / Drush 10.3.1)

I've installed two drupal sites on a share hosting (OVH), in two folders : dev.www www I've installed drush 10.3.1 and create two alias, but when I try use alias (drush @dev status), I have the ...
0
votes
1answer
30 views

Install and use Azure SDK

Is it possible to install Azure SDK via Composer within a Drupal site and use it in custom modules? { "require": { "microsoft/windowsazure": "*" } } Also ...
0
votes
1answer
32 views

Site crashes after running 'composer install' to update modules

My website is running Drupal 8.8.x When upgrading to Drupal 8.9.x and then running 'composer install' on production everything seems to install as expected but the site then goes offline with a 500 ...
0
votes
0answers
57 views

Getting the 'The website encountered an unexpected error. Please try again later.' error during an update

I recently updated my Drupal 8 installation, and for some crazy reason my site now displays a white screen and this line of text when I go to it: The website encountered an unexpected error. Please ...
0
votes
0answers
12 views

How to show inline error messages when submitting webform using AJAX

I have a drupal7 setup. I have a webform, which I am submitting using ajax. I have implemented a nice solution given over here. Everything works fine including validation and after submission messages....
0
votes
0answers
7 views

Custom user field not showing up for view except for site Administrator

I have created extra fields for the User account. I have never had an issue with any of these fields showing up when constructing a View that aggregates based off of the User. I just added a new Text ...
0
votes
0answers
16 views

Menu token not working sometimes

I am using /user/[current-user:uid]/edit to generate the user profile setting page where user can edit there profile. Sometimes it works and sometimes it displays the wrong user id and sometimes I get ...
2
votes
1answer
35 views

How to ensure successful update after system failure during updb causing the site to remain in maintenance mode?

Running drush updb to upgrade drupal core or other modules, puts the site in maintenance mode. I recently faced an issue (probably an edge case) where the site was stuck in maintenance mode after ...
-1
votes
0answers
49 views

How do I group fields?

For example a recipe content type would need 3 fields for ingredients. Quantity, measurement and description over and over and over. I know of paragraphs which I hear suffers from a lot of database ...
0
votes
1answer
19 views

How do I add a site to a multi-site

I am trying to convert my installation to a Drupal multi-site. I have the original site (www.original.com) with a settings.php file under the sites/default folder. I want to add a new site by adding ...
0
votes
1answer
64 views

Do we have an option to change/override the drupalsettings variable which is defined by some other module through our custom module?

What is the best approach to change/override the drupalsettings variable which is defined by some other module (basically core) through our custom module ? If I follow the same hooks then how to call ...
0
votes
0answers
25 views

Class not found in Drupal\Component\DependencyInjection\Container->createService()

I have a custom module (srs) that has an event subscriber as a service. That event subscriber class uses other custom helper class files after it catches the event. I tried to register the helper ...
0
votes
0answers
17 views

Moving nodes and menus between environments

I've a large menu of basic pages I'm trying to move from my D7 development environment into production. So far I've been trying to use the Node Export module to build a feature. That didn't seem to ...
0
votes
0answers
5 views

Field Record not being deleted when entity record is deleted

We are writing some end-to-end tests using Cypress and have run into a weird issue where one of our custom field records does not get deleted from the field table when the entity get's deleted. The ...
0
votes
1answer
39 views

Pull content from production to staging server

I have a setup that consists of a Drupal 8 instance on my localhost, a staging instance on a develop server and a productive version on a production server. Initially, I was co-designing the theme, ...
0
votes
1answer
24 views

Hide Webform Message “You are viewing this form as…”

How can I hide the message at the top of a webform which says You are viewing this form as [user name]. Please click here if that's not you.
0
votes
1answer
23 views

View to display all child taxonomy terms

I have a content type called "Unit Staff" with a term reference field called "Department". I also have a vocabulary called "Person" which is using a paragraph field ...
0
votes
0answers
17 views

how to migrate the content of the newly added fields content stage to prod and how to migrate the content stage to Prod Server

I am having the Drupal 8 site on stage and prod. Our Content Migration Team does all data entries on stage site regarding content for multiple languages. on average on a new phase, we do have 20 ...
0
votes
0answers
16 views

Images randomly not found

I have an issue on Drupal 8 with images randomly not found. I am actually not sure if the issue comes directly from Drupal. I am developing for my organisation a website currently quite simple with ...
0
votes
0answers
11 views

Filter view results by “created”/“authored on” date - shows all content regardless of post date

I've been throwing myself at this for a while, apologies if I've missed anything stupidly obvious. I'm trying to create a table of statistics for content submitted by all users (using Views Aggregator ...
0
votes
0answers
43 views

Pages intermittently or randomly end up in 404

My drupal website is running on acquia cloud behind cloudflare. And there are there levels of cache avaialble. Cloudflare Acquia Varnish Drupal cache All these caches are set to expire after 5 mins. ...

15 30 50 per page
1
3 4
5
6 7
1658