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
0answers
15 views

Why am I getting an error that kint is an unknown function?

Why am I getting an error that kint is an unknown function? When I use kint in my twig template, I get the following error: The website encountered an unexpected error. Please try again later. Twig\...
0
votes
0answers
28 views

How to create a term reference field programmatically

I need to add a taxonomy reference field to a node bundle, programmatically. I found a couple examples here, but one actually is incorrectly titled and is about creating a from field for it, and the ...
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 ...
0
votes
1answer
45 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
30 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 ...
1
vote
1answer
20 views

How to change the value of a user field through Restfull?

I can’t change the value of field_motherid field through restfall. GET running, PUT disabled, PATCH enabled and configured. When I do GET there is no user field.
0
votes
1answer
79 views

How do I upgrade the PHP version used?

I've been away from Drupal a few years. I now want to develop a site. I see it's up to version 9. However, when I tried to install Drupal 9 in DevDesktop to get a feel for it, I got the message PHP ...
0
votes
2answers
56 views

Categorized view for an entity reference content

I am trying to implement a Magazine in Drupal 9. I am confused about whether to use taxonomy term or content type since the data I want to handle is used for both categorizations and storing of ...
1
vote
1answer
33 views

How do I fetch versions of a module compatible with latest core version?

I've been using the endpoint https://updates.drupal.org/release-history/[module]/[version], where [module] is the module name and [version] is its version (as 8.x or 7.x). This endpoint, however, ...
-2
votes
2answers
71 views

Error: Private files directory not fully protected

I received the following error in my status report: PRIVATE FILES DIRECTORY Not fully protected See https://www.drupal.org/SA-CORE-2013-003 for information about the recommended .htaccess file which ...
0
votes
0answers
29 views

How to specify a patch for dependencies inside a module's composer file?

I would like to know how to specify a patch inside a module's composer file. The scenario is like this: On my Drupal 9 site, I want to run the command composer require module. The module composer ...
2
votes
1answer
73 views

How can I manually upgrade my site?

I have updated my core to 8.9.0, all modules are Drupal 9 compatible and now I want to upgrade to Drupal 9.0.0. I always did my updates completely manually via FTP/web (swap core/vendor/root files, no ...
0
votes
1answer
78 views

How do I install without having these errors? [closed]

So far, Drupal Commerce is the best module for e-commerce on Drupal. But now Drupal 9.0.0 was released, and when I want to install Drupal Commerce on Drupal 9, both way is out of luck. Both way I ...
0
votes
1answer
49 views

How to update MariaDB?

I was following Set up Demo Site for Theming Practice; then, I realized that, since Drupal 9 is out, by default Drupal 9 is installed instead of Drupa 8.x is installed when running composer create-...
0
votes
1answer
54 views

Error after copying the updated files

I want to update a site from Drupal 8.9 to 9.0. After copying all files and trying to execute update.php, I get the following error: The website encountered an unexpected error. Please try again ...
0
votes
1answer
35 views

The “Modules” page doesn't load

I am running a setup on Ubuntu and WSL (Windows Subsystem for Linux) with Nginx and PHP7.4. Drupal 8 and Drupal 9 fresh installations load every page with no problem, except the page on /admin/...
1
vote
0answers
42 views

Patch gets not applied to Drupal locally in DDEV built with Composer from the Drupal Git repo

I try to build a local workflow to be able to review patches for core. I am using DDEV for the local environment. Steps I have taken: git clone https://git.drupalcode.org/project/drupal.git . ddev ...
-3
votes
1answer
47 views

How to get a list of entity types the Drupal 9 way?

I need to get a list of all entity types. EntityManager is deprecated. In Drupal 9 EntityTypeRepository should be used, though I don't see any reference to its being used. How would I use this ...
-1
votes
1answer
39 views

Deprecated code cleanup: Updating EntityManager to EntityFieldManagerInterface

EntityManager is deprecated so I am trying to update code for Drupal 9. The documentation says it should usually be changed to EntityTypeManager, but in this case the code is using ...
1
vote
1answer
25 views

How can I find out if the present theme version would work

In the last years I've used pixture reloaded, a subtheme to adaptive theme, on some drupal sites and I was wondering whether this will work on Drupal 9. I've seen that the Adaptive theme homepage has ...
-5
votes
2answers
52 views

How can I get a list of all my site's module and themes? [closed]

I want to get the list of current modules and themes and modify them on Drupal 9, previously in Drupal 8,7 I used the following functions to get and save them but it seems they are depricated on ...
9
votes
2answers
920 views

Command to install Drupal 9 with Composer

The latest version of Drupal 8 can be installed via Composer with the following command: composer create-project drupal/recommended-project mynewproject What is the equivalent command to install the ...
2
votes
1answer
137 views

Drupal 8's last minor release = Drupal 9?

I have read about the planned release date of Drupal 9 is scheduled to be on June 3rd, 2020. I read this documentation about how to prepare a Drupal 8 site for Drupal 9: Prepare a Drupal 8 site for ...
12
votes
1answer
5k views

Load a file entity by URI

Is there a way to load a file by URI in Drupal 8 or Drupal 9? In Drupal 7 it is possible by the next example: $uri = 'public://file.xyz'; // Take a look at: file.inc::file_load_multiple $files = ...