Skip to main content

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
-1 votes
1 answer
16 views

How to update url alias of a node and all its translations programmatically

I have a list of nodes and I want to update the url alias of these nodes and all its translations programmatically. I am doing something like the following function my_module_custom_update_9001() { $...
Binny's user avatar
  • 898
-2 votes
0 answers
54 views

Configuration import uninstalls modules and removes settings

Whenever I import the configuration on my Drupal 9 website, all settings related to warmer, adv_varnish, page_cache, dynamic_page_cache, etc., are uninstalled and removed. The extensions listed below, ...
user3086053's user avatar
-1 votes
0 answers
23 views

Ajax error: No facet link or facet blocks found

On a Drupal 9.4 site with a View of search indexes and using facets 2.0.7, we were getting multiple issues with Ajax and Facet behavior. Some of the issues subsided by using the following patch. https:...
Binny's user avatar
  • 898
0 votes
0 answers
14 views

Facets refresh issues when used with View of search indexes

I have a view of Search indexes with context filters in my Drupal (9.4) site. I am using Facets (2.0.7) I have printed facet blocks in the View template files as below <div class="accordion ...
Binny's user avatar
  • 898
0 votes
0 answers
12 views

Installing CK Editor Media Embed fails

I'm trying to install the CK Editor Media Embed module for a client's Drupal 7 to Drupal 9 migration, since the old CK Editor 4 Iframe embedding doesn't seem to be available in Drupal 9. I've followed ...
Hadden Uff's user avatar
2 votes
1 answer
42 views

Force data initialization on custom module installation

I have a module that needs to initialize its database tables with data acquired from the existing site. What hook should I use? hook_install() is obviously not suited for longer operations and doesn't ...
Gábor's user avatar
  • 866
0 votes
0 answers
89 views

DivisionByZeroError PHP error

I keep getting the following PHP error on a Drupal 9 site that I'm working on that seems to be initiated by the tags taxonomy. I create an article and if I don't add tags it works fine. If I do add ...
Zach Rodimel's user avatar
0 votes
1 answer
36 views

view field value does not change as expected ... stuck in cache?

My site is in Drupal 10 I have created a view by duplicating 'content' view in the core. I have reduced the duplicated view only to show node title node type author last update date-time of the node ...
user1940163's user avatar
-1 votes
0 answers
35 views

Sort search result based on group of content type

Is there any way to sort search results based on content type using Drupal views and the Search API module? To get result of a particular content type first, followed by another, and so on.
Tejas Damre's user avatar
0 votes
1 answer
52 views

Migrating webforms

I am trying to migrate webforms from a site running drupal 8.4 to 9 with the former's database as source. The source site has more than 1000+ forms, so I prefer to opt for the migration framework ...
optimusprime619's user avatar
0 votes
0 answers
44 views

hook_field_widget_form_alter() not retaining form field value when "Add another item" button is clicked

My hook_field_widget_form_alter() implementation looks as follows, function mymodule_field_widget_form_alter() { $field_definition = $context['items']->getFieldDefinition(); if ($...
Sivaji's user avatar
  • 2,478
1 vote
2 answers
65 views

Which template to override to change the markup of a reference field to taxonomy and how to get term fields values in that template?

I have a node that has a reference field to the taxonomy vocabulary. In the Manage display of the reference field, the Rendered entity format is selected, and the view mode (field_image field display) ...
nathan111777's user avatar
0 votes
1 answer
52 views

The node ID for newly created nodes is fetched but the node is not loaded

I have a custom module that loads all my nodes from type demarche_en_ligne, it worked fine for a few years but now when we create a new node it won't load. For instance I created a new node and ...
Xanthous's user avatar
  • 101
0 votes
0 answers
64 views

What are all the steps needed to migrate from Video Embed WYSIWYG to Core Media (images/video fields too)?

As the title suggests, I'm in the process of upgrading from Drupal 9 to 10 and would like to finally migrate over to Core Media, as opposed to just using inline video/images/files as we have for the ...
ACanadianCoder's user avatar
-3 votes
2 answers
45 views

Can't seem to find a way to have & in a term description show up as &

In a site on D9. I have a vocabulary that has titles as the term descriptions. One of the term descriptions is This & That No matter what I try, the & is converted to & in CKeditor4. This ...
JAyenGreen's user avatar
0 votes
0 answers
54 views

Free/loose mode content translation with paragraphs

The content_translation module available since Drupal 8 allows me to translate content pages (entities/nodes) in a very strict mode: Each paragraph on the source language page has a translated ...
cweiske's user avatar
  • 154
0 votes
0 answers
52 views

File upload becomes empty after form submit for anonymous users

I've build a form in Drupal 9 with Form API. When logged in as admin, all is working fine. Selecting a file as anonymous works, and the validations are checked. But when I submit the form, the ...
user3086053's user avatar
1 vote
0 answers
97 views

No-charge Drupal alternatives to Acquia's Site Studio [closed]

This is a general one. I would like to know better the spectrum of choices for Acquia Site Studio alternative in 2024. The most important features from my perspective are: ability to create many ...
Adamssef's user avatar
0 votes
0 answers
24 views

Backup Migrate Error: "Could not create a temporary file to write to.", but /tmp folder is already 777 on Ubuntu server

I'm trying to manually backup using backup and migrate module on Drupal 9.4, but I keep getting this error: Could not create a temporary file to write to. I checked with file system page and it says ...
Patoshi パトシ's user avatar
0 votes
0 answers
38 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
1 answer
28 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
0 votes
0 answers
116 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
91 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
32 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
36 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.9k
0 votes
1 answer
22 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
65 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
44 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
37 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
45 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
322 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
  • 898
0 votes
0 answers
77 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
14 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
134 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
32 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
  • 623
0 votes
0 answers
55 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
  • 623
0 votes
0 answers
139 views

How to implement external event drag and drop including node creation in the Fullcalendar View module?

I am using Fullcalendar View module and working on External Event Dragging i am able to drag external event but not able to drop it in calander, i've researched about it a lot but didn't find any ...
user avatar
0 votes
1 answer
128 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
47 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
139 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
129 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
143 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() ...
user avatar
0 votes
1 answer
139 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,288
-1 votes
1 answer
387 views

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

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
101 views

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

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
27 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
78 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
152 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
57 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
77 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
2 3 4 5
36