Questions tagged [9]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

"Unrecognized response content type" in Acquia Migration Accelerate

I am trying to run the Acquia Migrate Accelerate tool on a production D7 database. I've got as far as migrating Public Files and each time it stops after about 2000 out of 7000 entries. I also get the ...
Hadden Uff's user avatar
0 votes
0 answers
13 views

Prevent text selection for embedded PDF [closed]

I have in a twig file with this line of code : <object type="application/pdf" data="{{content.field_media_file.0}}#toolbar=0" class="h-[700px] m-auto w-full">{{ ...
Pedro's user avatar
  • 51
0 votes
1 answer
21 views

IMCE button in the URL tool

Months ago, I somehow enabled the IMCE button to appear when adding an URL using CKEditor 5 on Drupal 9. The problem is that I totally forgot how I enabled that. I already checked CKEditor5's ...
julianx2rl's user avatar
-1 votes
0 answers
26 views

Webform email handler - dynamic recipient list

Our site uses webforms and for a particular form - upon submission - an email is sent to multiple people. Currently, that recipient list is part of 'config' - meaning that to add/delete someone is a ...
jwag's user avatar
  • 99
0 votes
0 answers
28 views

Views Menu Tabs: primary and secondary tabs?

I'm moving a site from Drupal 7 to Drupal 9/10. In Drupal 7, there's a view with multiple page displays, set up like this: Tab name Menu setting Path All No menu events/list Summer Default menu tab ...
Kristi Wachter's user avatar
0 votes
0 answers
34 views

Using a symbolic link under files

In our Drupal installation, I need a file repository that survives deploys and gets some special treatments, so I thought I could use a symbolic link to a NAS mount point below web/sites/default/files....
Francesco Marchetti-Stasi's user avatar
-3 votes
1 answer
24 views

How to add a "no index" tag on every page [closed]

I need help in adding a "no index" tag on several pages. Please help me with this.
Seowithvaibhav sharma's user avatar
1 vote
0 answers
32 views

Prevent certain config dependencies from being exported to a config file

I have a scenario where I want to import a baseline of configuration for hundreds of sites. New(er) versions of modules recently set permission callbacks to their entities. The problem is that these ...
Kevin's user avatar
  • 27.8k
0 votes
1 answer
18 views

Is the DRUPAL_DATABASE_HOST value stored somewhere in the database?

I want to see what the value is for the database host, the value that you enter when installing for the first time. Is there a way to see and edit this value after installation? Is it stored in a ...
jfc's user avatar
  • 195
0 votes
0 answers
41 views

Is there a way to clear the cache after a docker image is built?

I have a set up that uses docker to build an image of Drupal 9. I am trying to update the server to use PHP 8 which is done through the Dockerfile. When I run this set up locally I get an error ...
jfc's user avatar
  • 195
1 vote
1 answer
38 views

How to get entity object in buildform formbase?

I've the following in my routing.yml project.product_elasticsearch: path: '/product/{commerce_product}/elasticsearch' defaults: _form: '\Drupal\mymodule\Form\ProductElasticsearchForm' ...
Sivaji's user avatar
  • 2,478
0 votes
0 answers
29 views

CSS/JS permissions

When I add CSS/JavaScript to webforms using the menu under settings-> css/js , it works for users with the administrator role, but it fails to work for all other user roles.The page loads but the ...
Aly's user avatar
  • 1
0 votes
1 answer
41 views

Content type template takes precedence over specific node id template. How to change priority?

In my MYCUSTOMTHEME.theme file, I've added page template suggestion for specific content types and paths, so that I can use page--node--CONTENT-TYPE.html.twig to override certain pages. In ...
Tinto's user avatar
  • 61
-2 votes
1 answer
162 views

Getting the "Solarium @version is too old" error after upgrade

I recently updated a Drupal 9.3 site to Drupal 9.5 and most of the contributed modules were updated to the latest version that supports both 9 and 10 in view of an upcoming Drupal 10 upgrade. On the ...
Binny's user avatar
  • 900
0 votes
0 answers
63 views

Contrib module remove

I want to remove the content_sync module from my site. Firstly I uninstalled it with drush pm-uninstall, run a drush cex, drush cr and then removed it using composer remove. I removed also every ...
user7167081's user avatar
0 votes
0 answers
12 views

Add custom error text for Commerce Coupon

We have a coupon that is for shipping only. If user tries to apply it before they have entered address, then error is displayed: "The provided coupon code cannot be applied to your order". ...
betarobot's user avatar
0 votes
0 answers
87 views

How do I get <drupal-media> to appear?

I am trying to use the Drupal Media insert button in the CKEditor5 module. (Important - the existing images were included using CKEditor4 and are inline images, not using Drupal Media.) I upload the ...
Adaddinsane's user avatar
0 votes
0 answers
28 views

Hide Node Title if Paragraph Type Exists?

How do I hide node titles on pages only when a specific paragraph type is being used? For example, the paragraph field is "field_cta" and it has 3 choices of paragraphs "paragraph_a&...
Sam's user avatar
  • 603
0 votes
0 answers
41 views

How to use hasField but for paragraph fields?

Within a page template, how could I check if a paragraph field if present? I'm using this and it works: $node->hasField($field_paragraphfield) But how can I modify this to look for a field within ...
Sam's user avatar
  • 603
0 votes
1 answer
85 views

How to alter submission data when inserting a submission

I am trying to alter the data in a webform submission before this is being saved in to the database. In D7 i would do something like this: function mymodule_webform_submission_presave($node, &$...
hasse88's user avatar
  • 65
0 votes
1 answer
38 views

Entity reference to role

I want to add an Entity Reference field to a Group Type entity, referencing User Roles. When I add a Entity Reference > Other > Roles field, the creation/edition form of this Group Type throws ...
raistlinjoe's user avatar
1 vote
1 answer
97 views

How to override REST error message

After installing "RESTful Web Services" module, if I execute this API request: curl --request GET \ --url 'http://localhost/resourceNotFound?_format=json' I got following error (which is ...
Rami Sedhom's user avatar
1 vote
2 answers
98 views

How can I add a CASE statement in a WHERE clause?

I need to add a WHERE clause to the query altered by a hook_views_query_alter() implementation. The WHERE clause needs to contain the following CASE statement. $sql = "(CASE WHEN node_field_data....
Subhash's user avatar
  • 93
0 votes
1 answer
113 views

Hook for hiding menu links based on user access

I have a Drupal 7 module that uses hook_preprocess_menu_link() to hide menu links based on user access. I am in the process of migrating to Drupal 9, and it seems that hook_preprocess_menu_link() ...
Ali Rizvi's user avatar
0 votes
1 answer
109 views

Why does RedirectResponse not work on production server?

I have a very simple custom block/form that takes a user id and jumps to their profile page. The form submitForm has this: $uid = $form_state->getValue('uid'); $path = '/user/' . $uid; $response = ...
liquidcms's user avatar
  • 1,268
-1 votes
1 answer
243 views

What causes this error? 'You have requested a non-existent service "user.private_tempstore"'

I recently upgraded a site to Drupal 9. For content types that have media type as PDF documents, now I am not able to edit or save any uploaded pdf file. The drupal log shows this error. Symfony\...
9Lyfe's user avatar
  • 1
0 votes
1 answer
73 views

How do I upgrade from drupal 9 to 10 when dynamic entity reference 3.0 and up require drupal 10 first?

I am trying to upgrade my drupal 9 site to drupal 10. I installed the Upgrade Status module and it's only complaints are I need to upgrade linkchecker and dynamic entity reference. The problem is that ...
Eluchel's user avatar
  • 387
0 votes
0 answers
23 views

Kernel and functional testing with an MSSQL database

I am new to testing custom modules. My custom modules create and update custom nodes. From my reading, I need to use Kernel or Functional tests to test these operations. My Drupal 9 installation is ...
spacecraft96's user avatar
2 votes
1 answer
64 views

Removing data from an entity type

I am trying to remove a problematic payment gateway module and getting the following message when trying to uninstall it: There is data for the bundle Authorize.net (Accept.js) on the entity type ...
Ben Stark's user avatar
0 votes
0 answers
125 views

Error in Programmatically Creating Paragraphs with Layout Paragraphs

I am trying to programmatically create paragraphs using the Layout Paragraphs module. However, I'm encountering this error when saving the main entity that contains these paragraphs. I'm looking for ...
yorchperaza's user avatar
0 votes
2 answers
53 views

Adding a default text [closed]

Option 1: Is there any way to write a conditional in Twig that if field1 in Drupal is empty, I can set a default text to say "Bye" Option 2: I was also trying to use the conditional fields ...
kpe's user avatar
  • 1
0 votes
0 answers
65 views

I cannot install Geocoder

I have tried to install Geocoder v4.11 with composer require 'drupal/geocoder:^4.11' --with-all-dependencies, but instead I get incompatibility issues with Guzzle. Problem 1 - php-http/guzzle7-...
velvetInk's user avatar
  • 139
1 vote
0 answers
30 views

How does the RDF module impact user mapping when using the Acquia Migrate Accelerate (AMA) tool?

Before Acquia's AMA tool was open source, I used it on their platform to upgrade from Drupal 7 to Drupal 9. I am in the process of upgrading to Drupal 10 and want to uninstall the RDF module (don't ...
Shay97's user avatar
  • 11
-3 votes
1 answer
108 views

I am trying to install Drupal Commerce, I get error that prevents installation, I don't get what it says about ../private folder [closed]

Can somebody specify where this folder should exist? I created it in the directory containing the vendor directory, in the files directory, outside of the files and in the site root directory, but I ...
mevsme's user avatar
  • 1
0 votes
1 answer
49 views

How do I take the value of a variable from the node template and insert it into the field value?

In the template of the material type node there is a variable that adds and multiplies integers according to the formula, which I take from the filled fields of the node. Everything is working ...
Владимир Помелов's user avatar
0 votes
1 answer
126 views

How can I delete an existing path alias?

In Drupal 7, a path alias can be deleted with code similar to the following one. path_delete(array('source' => "problem/{$problem->nid}/{$problem_src->nid}")); How can I delete ...
Ali Rizvi's user avatar
-1 votes
1 answer
47 views

How to use the Tableselect element for an order-able list of items?

It's been a minute since I have used tableselect. I want to present a user with a list of sortable options that have checkboxes to indicate they are on or off. See this screenshot: While the table ...
Kevin's user avatar
  • 27.8k
1 vote
0 answers
32 views

How do I always show full search result pages in cases where some results are removed due to access restrictions?

I have a solr search index set up and a view to search content. We have "Region" groups for members so they only see content from their region. The search works great as admin who has access ...
James Prunty's user avatar
0 votes
0 answers
49 views

Trusted host patterns problem, again

I need to set up trusted host patterns for 3 EC2 instances. They all share same base code, so they all use the "same" settings.php. On my two (production) instances everything works fine: ...
lazarcelic's user avatar
0 votes
0 answers
60 views

Is there any way to use EntityQuery on entity_reference fields in reverse?

Let's say I have two custom entity types: entity_one, entity_many. I know how to use an EntityQuery to find entity_one matches if there is a multi-value entity reference field on entity_one. $results =...
JonMcL's user avatar
  • 617
0 votes
3 answers
102 views

How can I have updated content entity data immediately available after update?

I created custom content entities to handle a small NGO membership (Member, Person, both linked to Drupal 'users'). I have a form allowing users to perform online membership application. Submitting ...
gbmapo's user avatar
  • 1,066
0 votes
1 answer
149 views

Why is my message not showing for anonymous user?

In a custom form, I have this Ajax submit: public function ajaxSubmit(array &$form, FormStateInterface $form_state) { $response = new AjaxResponse(); if ($form_state->hasAnyErrors()) ...
gbmapo's user avatar
  • 1,066
1 vote
0 answers
77 views

How can I have both file download and redirection in for submit?

I have this form submit: public function submitForm(array &$form, FormStateInterface $form_state){ // File download $sFileName = 'JdP-Adhesion.pdf'; $sFileNameWithPath = 'sites/default/...
gbmapo's user avatar
  • 1,066
0 votes
1 answer
84 views

How to dispatch a ResponseEvent so that a cookie is added after login?

I want to add a session cookie when a user logs in. The previous implementation I had, was setting the cookie in hook_user_login with this snippet: $response = new Response(); $response->headers-&...
Maria Ioannidou's user avatar
0 votes
1 answer
159 views

Can create directories but can't upload files

When I try to upload a file with a file field, Drupal creates a sites/default/files/2023-10 directory, but can't upload the file. I see this validation error in the UI: "File upload error. Could ...
arnoldbird's user avatar
  • 1,193
0 votes
0 answers
18 views

View File Uploads in Custom Module Admin Screen

I'd like to show a list of the files in a directory in my default/files directory. This will show's all files: /** * Helper function to retrieve and display a list of current uploads. */ protected ...
jasonflaherty's user avatar
-1 votes
2 answers
134 views

How to add a link to table row?

There is a field 'field_upload_artwork' that contains files. I am using them to build links to files and want to insert links after Apparel Printing in the last step of the form. Now the markup in ...
nathan111777's user avatar
0 votes
0 answers
28 views

Email field is not migrated

I am trying to migrate an email field from Drupal 7 profile2 (don't think that matters) and it becomes blank on the Drupal 9 instance. The remaining fields migrate without any issues. My process ...
user111465's user avatar
0 votes
1 answer
64 views

Why doesn't my completion message show?

I have this form to handle a custom content entity: created by this code: public function buildForm(array $form, FormStateInterface $form_state, $contractId = NULL) { Some code to inialize ...
gbmapo's user avatar
  • 1,066
0 votes
1 answer
26 views

Promotion options not visible to Editor role

I have a "Editor" Role with limited access rights. It can basically only create blog type nodes. I'd like to expose to them the possibility to make to publish the node to the frontpage via ...
Andreas's user avatar
  • 412

1
2 3 4 5
36