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.
714
questions with no upvoted or accepted answers
5
votes
1
answer
176
views
How does the Geolocation content of a page filter is a Views block?
I have a website with Drupal 9 and the Geolocation module :
https://www.drupal.org/project/geolocation
I created a content type with a Geolocation field that contains coordinates.
My website uses the ...
4
votes
0
answers
64
views
How can I dynamically switch between two databases for ALL queries?
I need to copy some entities from one Drupal 9 database to different Drupal 9 database. I have searched and looked high and low, but none of the examples I have found work anywhere. I found no help on ...
4
votes
0
answers
39
views
How to override the typehint for entityTypeManager with a more specific one?
I'm often frustrated by entityTypeManager because when I load entities, the typehint for the return value of the load methods is EntityInterface, but I want it to be a more specific interface (which I ...
4
votes
0
answers
1k
views
Schema information for module is missing - how to fix?
I tried to install the Scheduler module but it did not install properly because we somehow did not have code for another custom module that the database thinks was installed. I got the code for the ...
4
votes
1
answer
185
views
How can I have Behat create content with an address field properly filled?
I'm writting a Behat test, where I'm triying to create a content that uses a field address, generated by Address Module. I'm using Drupal 9.0.7, Address Module 1.9.0 and behat 3.8.1. My goal is to ...
4
votes
1
answer
108
views
How do I set the display suite default region for newly created fields?
What needs to be done:
Newly created fields in any content type should go to the hidden region of the DS Layout.
Short background:
In our project we use the Display Suite module, and we have the ...
3
votes
0
answers
49
views
Array type hints conflict between Drupal and Symfony
In an event subscriber, I have:
/**
* Registers the methods in this class that should be listeners.
*
* @return array
* An array of event listener definitions.
*/
public static ...
3
votes
0
answers
100
views
How to properly extend Entity Query class?
I am working on some complex aggregate reporting that pulls from several sources (node type) and generates a report in a table display. There are about 10ish line items (could be more later) and ...
3
votes
0
answers
118
views
How to deal with config sync changing the order of lines in files causing spurious changes in source control?
I am really enjoying Drupal 8/9's built-in config sync mechanism which allows you to export config to a directory. This makes it possible to store config in a git repo and easily deploy from dev to ...
3
votes
0
answers
93
views
How to filter book pages by book with Views? ( how to integrate book with views)
At the moment on Drupal 9.3 there is very poor integration between views and Book Module.
how to create a view to show all the book pages with functionality to filter ( an exposed filter) them by ...
3
votes
0
answers
282
views
How do I fix the base URL issue while using load balancer
Since base URL is deprecated, and our Drupal 9 Site is using a load balancer, we are facing issues when setting up the base URL. Instead of the base URL, it displays the load balancer IP.
Any help ...
3
votes
1
answer
323
views
Is there an event related to the creation of a session cookie for anonymous users?
I need to set an additional cookie whenever an anonymous user received a session cookie. This happens when selecting a facet in Search API for example. The specific use case is that I need an extra ...
3
votes
0
answers
20
views
QuickEditIntegration can't process components for Quick Edit
I have a content type that is displayed with Layout Builder. When I view it in default mode, the Quick Edit option does not appear in the contextual menu. This is because none of the fields have the ...
3
votes
1
answer
142
views
How to get all search results of search api index?
I want to get all the search results from the search API index and then perform a custom sort on it and then display them accordingly.
I used the hook_search_api_results_alter and also the search ...
3
votes
0
answers
289
views
Menu link tree only loads enabled elements in subtree regardless of parameters
When loading a menu tree without any custom parameters:
$tree = \Drupal::menuTree()->load('my-menu-name', new MenuTreeParameters());
The returned tree \Drupal\Core\Menu\MenuLinkTreeElement[] ...
3
votes
0
answers
188
views
How can you require users to change their passwords on first login after migration?
We are planning to migrate users from another CMS to Drupal. We can migrate usernames, but not passwords as the encryption is different. So we shall have to assign passwords to them. Earlier versions ...
3
votes
1
answer
1k
views
Site errors out when trying to create a subtheme based on Classy
I'm creating a custom theme in Drupal 9 and am trying to use classy as my subtheme but get the following error:
The website encountered an unexpected error. Please try again later.
Drupal\Core\Theme\...
2
votes
0
answers
38
views
CKEditor 5 - access PHP plugin configuration from JS plugin?
I have provided a CKEditor 5 plugin a PHP configuration class. I am able to set and store configuration for the text editor plugin now, but do not know how to access that configuration value(s) from ...
2
votes
0
answers
50
views
How to duplicate/clone a field in a content type
I have a custom content type with an image field. I want to convert this image field into media type. There are already thousands of nodes created with this content type.
One of the ways I've ...
2
votes
0
answers
89
views
How do I cancel an order?
I am looking for a way to change the status of some orders. I need to be able to cancel orders even if the payment has been validated. In fact, I'm currently using the Commerce Payplug module which ...
2
votes
0
answers
144
views
Allow users to upload heic images and auto-convert to jpg
It seems that heic images are increasingly popular way to store images (the default image format since ios 11, but browsers do not support them. Site visitors may attempt to upload an heic image from ...
2
votes
1
answer
101
views
How do I import/export menus?
I want to import/export all menus of site1 in into site2. Currently I am using the entitysync module to synchronize the content between two sites. I can see there is an option for "Custom Menu ...
2
votes
0
answers
29
views
Changes in email template are saved, but not used (cache?)
I'm usually trying to find an answer/clue on my own, and usually it works, but at this time search is fruitless.
So I'm trying to edit a welcome email text, using /admin/config/people/accounts section....
2
votes
0
answers
58
views
Get Drupal core search results via jsonapi
I am using the jsonapi module to get node content for specific bundles for a mobile app and i am familiar with the filter, include and sorting concepts of the jsonapi.
Now i want to get search results ...
2
votes
0
answers
61
views
Variations created with a queue worker sluggishly slow
The site my team is currently building is meant to import a list of all available trips for a travel booking agency.
The method we settled for (for now) can be summarized as such :
A daily cron job ...
2
votes
0
answers
185
views
How can I extend Serializer to handle a custom field type?
I'm trying to extend Serialization to get the JSON Field module to return a JSON object instead of stringified JSON.
Goal: When I access an entity that contains a JSON field using JSON:API, I want a ...
2
votes
0
answers
136
views
JSON:API FieldEnhancers - removing a resource object from a JSON:API response
I need to remove a resource object (in this case a paragraph) from a JSON:API response when it matches a specific condition. I do not want to delete it, I just want to exclude the object from the ...
2
votes
0
answers
81
views
Problem with same webform added multiple time in a page
Problem
I have an Article node with layout builder enabled for content author.
I have webform Subscribe newsletter with ajax enabled.
I add webform Subscribe newsletter to the node twice. So there are ...
2
votes
0
answers
201
views
Why isn't an image from the local domain shown with the explanation that, for security reasons, only images from the local domain are allowed?
I'm running Drupal Core 9.3.7, with basically the default set up. The Basic HTML editor is CKEditor. If I include an image in a page, that image is not shown when I view the page; on inspection, it is ...
2
votes
0
answers
219
views
I cannot access PDF files uploaded in the private directory
PDF files uploaded to the private directory cannot be viewed and returns a 404 error.
This also happens to the user with the Administrator role.
Other file types can be viewed with no issue.
This ...
2
votes
0
answers
85
views
Drush 10 pass alias to remote
Our remote environments are currently fronted by a Linux instance acting as the gatekeeper between the developers and the actual environments (apache and mysql instances running Drupal). This was done ...
2
votes
0
answers
494
views
"A non-existent config entity name returned by FieldStorageConfigInterface::getBundles()" errors in watchdog
After migrating from 7 to 9, I'm getting a lot of these errors in watchdog, from views.
A non-existent config entity name returned by FieldStorageConfigInterface::getBundles(): entity type: paragraph,...
2
votes
0
answers
98
views
How can I change the format used for <pubDate>?
I'm using Drupal 9 to display a RSS feed with the Aggregator module. For the imported items, the date for <pubDate>Wed, 24 Nov 2021 20:05:46 +0000</pubDate> is showed as 2 months 3 weeks ...
2
votes
0
answers
26
views
Page with multiple displays on the same path does not respect the different access rights
With Drupal 7, it was possible to define in Views a page with several displays, having all the same URL. By ordering the displays in descending order of access level (Administrator first, Anonymous ...
2
votes
0
answers
98
views
How to add Rabbit Hole to a custom content entity
We use the module Rabbit Hole for nodes and terms. Now we would like to use it also for our custom content entities. I have tried to find some information, how to add the Rabbit Hole to a custom ...
2
votes
0
answers
29
views
How can I retain the destination parameter when a user registers a new account with email verification?
This is for a Drupal 9 website.
How can we retain the destination after a user registers a new account that requires email verification?
Example workflow:
User clicks to create a new node but does not ...
2
votes
0
answers
225
views
How use subqueues of entityqueue module?
I'm on D9 and already using entityqueue module to let the content editors orders some views via "simple" queues
Now, I've been requested to make possible to order the nodes appearing on the ...
2
votes
1
answer
56
views
Migrate order billing profile
I'm trying to migrate order data from an existing site using CSV files and I can't get the billing profile to relate.
In trying to troubleshoot this, I have it set just to insert a default value of a ...
2
votes
0
answers
116
views
S3FS IMCE File upload issue for old files in Upgraded site
I have a question on IMCE File upload. Hope someone might have come across the similar issue.
Installed modules:
https://www.drupal.org/project/s3fs
https://www.drupal.org/project/imce
We have added ...
2
votes
0
answers
909
views
Missing bundle for entity type node after upgrading
I recently upgraded a local sandbox to Drupal core 9.2.4. While testing things out, I got an error when trying to add a new article content from /node/add/article.
The log shows the following message.
...
2
votes
0
answers
45
views
Add an image to a vocabulary
I need to add an image to a vocabulary, not the taxonomy terms. Essentially, I need to add a field to the "Edit Vocabulary" page.
Is there a way to do this?
2
votes
2
answers
243
views
Basic kernel test fails with Type of Drupal\KernelTests\Core\Entity\EntityKernelTestBase::$modules must be array
Trying to port a Drupal 7 module to 9 with accompanying test and getting this error immediately when running it:
PHP Fatal error: Type of Drupal\KernelTests\Core\Entity\EntityKernelTestBase::$modules ...
2
votes
0
answers
70
views
How to add conditional on Gutenberg's color theme-support?
I've added the Gutenberg theme-support on my custom theme. I want to add conditional based on text color and background color. For example, selecting the black color background will reset the default ...
2
votes
1
answer
235
views
Is there a way to check which system was used to send mail?
Is there a way to check which system was used to send mail?
I followed Sending html mails in Drupal 8/9 programmatically. I'm using the SMTP module to make sure that emails are sent via SMTP instead ...
1
vote
0
answers
29
views
"migrate:status" freezes on "Try to validate bootstrap phase 0"
Drupal community!
I am working on migrating from D7 to D9. Both are located on separate servers. I configured D7 database as db to migrate in my D9 settings.php, like this:
$databases['migrate']['...
1
vote
0
answers
36
views
Views UI javascript is broken
I discovered today that the Views UI is broken on one my sites. I'm not sure when it broke, because the Views UI is not one of the things I check after updates.
I'm currently at 9.5.3.
My Views UI ...
1
vote
0
answers
34
views
Why does a MethodNotAllowedException throw when uploading an image with CKEditor 5?
After updating Drupal to 9.5.3, I had this warning: Deprecated modules found: CKEditor.
So I upgraded from CKEditor to CKEditor 5 following this documentation.
After some setup on text formats, I made ...
1
vote
0
answers
26
views
Migrate Medias update : entity_lookup process error
I'm trying to update Medias already existing in my Drupal using Migrate and the process entity_lookup.
The field field_uuid was designed specifically as a matcher for my .json original datas and the ...
1
vote
1
answer
39
views
Can I use Price Resolvers for dynamic product pricing?
All cart items are adding programmatically. I am trying to set a product cost based on various factors that change for each instance of an item added to the cart.
I discovered Price Resolvers and it ...
1
vote
0
answers
58
views
Is it possible to use OR condition in search_api_index view for exposed filters like "Fulltext search" or "Combine fields filter"
I have created search_api_index view.
And I want to add filter criteria like on screenshot.
or
I choose OR condition, but the AND condition still works. It seems that OR condition is not applied. Is ...