Drush Site-install

I am having an issue on a new mac on Terminal that works with Composer and Drush that is fine. However when I'm on the /david/Sites/animals I go to the Terminal and I'm unable to make the "drush site-install" work.

For example

drush site-install --db-url=mysql://david:root@localhost:3306/animals

I get the following Terminal

undefined drupal_add_js function inside themename_preprocess_page

I wanted to use javascript to delete an option from the list of options in case the user is not an administrator and I searched and found this code inside a post and I used it inside the project's themes->mythemename->mythemename.theme file, but that didn't work and I have several problems I want to know how to solve, as I searched a lot I did not find a solution

How to display list of only comment subjects (no bodies)

We have articles on our site. At times, they attract long comments, and there are many such comments; However, once read, a normal user is not interested in reading those comments again and again. It becomes a pain to scroll thru the page to get to some desired comment.

Copy/Clone Content Type with fields

In a site I have to use a Content Type with many fields and I would like to copy it from another site without being forced to recreate every single field.
It's possible to do it?
In configuration there is configuration synchronization but I saw that only the Content Type passes and not the fields.
The copy should do it without the nodes

How to save multi paragraphs fields programmatically?

Hi team,
I'm having some issues trying to save some field using paragraphs,
Where i run my code happen this:
The first field has value and second is empty
and the next block the first field is empty and second has value
screenshoot
This is my code:

How to replace the default page and tab of profiles in the user account ?

I installed the "Profile" module on my "Drupal 9" website. When I create a profile type, the module automatically creates a tab in the user account for each profile type.

For my profile type "projects" the user account tab displays the page for this profile type, with this path :

    /user/ID/project/list

Here is the view added by the module :

https://i.stack.imgur.com/9JZka.png

Here are the tabs created in the user account :

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x