How do I add a template suggestion for a Views block?

How do I add a template suggestion for a Views block?

I am very much so new to Drupal and have moved to this platform after working with Magento for 5 years. I am trying to create a template for a view. I have created the twig template under /templates/views/ called... read more
How do I add a template suggestion for a Views block?

How do I sign in a user based on custom HTTP headers?

I would like to sign-in a user based on some custom headers in the HTTP request. Let’s say I have an administrator account whose username is admin. If I send a request to Drupal with a custom header (X-USER-NAME: admin), I would like to be logged in with this... read more
How do I add a template suggestion for a Views block?

How do I add a revisions tab to a custom content entity to list revisions?

I’ve just created/generated a custom content entity module using Drush. I’ve checked I would like to use revisions, but I cannot see its tab. How can I add the revisions tab to this custom content entity and list revisions for that entity instances? read more
How do I add a template suggestion for a Views block?

How do I set the value of a date and time field with Behat?

I am trying to test my site with Behat. On my entity edit form, I have a Datetime field that uses the Date and time widget. I want to use the Date and time widget because I need to set the time in increments of seconds, which I cannot do with the Select list widget. I... read more
How do I add a template suggestion for a Views block?

How can I ensure migration YAML files execute in specified dependency order?

EDIT: To Answer my own question… I ended up making multiple migration files like this: Node Type A Part 1 (most fields migrated except the ones that need to reference Node Type B) Node Type B Node Type A Part 2 (now you can add the field referencing Node Type B)... read more
How do I add a template suggestion for a Views block?

How to get the entity ID in a twig template

I have a custom entity, with the template my-custom-entity–my-entity.html.twig. How do I access the ID in the template? I can do this by implementing hook_preprocess_entity, but am wondering if the ID is already available in the template. read more
How do I add a template suggestion for a Views block?

how to print a form in twig where a variable number of form elements have been printed already?

I am using a Twig template to render a form that has a variable number of elements. Each element’s key in the form is sequential integer. So in my template, I can do this: {% for item in form|children %} {{ item }} {% endfor %} However, then I have a broken... read more
How do I add a template suggestion for a Views block?

doctrine/reflection conflicts with doctrine/common

My current Drupal version is 8.9.3, running on PHP 7.3.20, and updated from Drupal 8.9.2 (fresh install) using compose update. I tried to upgrade to Drupal 9 used this https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-to-drupal-9-or-higher as guide.... read more