error : Component/Plugin/Discovery/DiscoveryTrait.php

Hi everybody, 


when i click on a link which should display a setting view in drupal. I have an error message: The website has encountered an unexpected error. Please try again later.
More detail report : 

Drupal 9 - After deployment and clearing cache site went down

Hi Everyone,

I am developing a web application with Drupal 9.

My local environment is Windows with Apache 2.4, PHP 7.3 and MySQL 5.7. I was in need of deploying it to UAT for testing purposes. The UAT environment is Ubuntu with Nginx, PHP 7.3 (FPM) and MySQL 5.7.

How to create TWIG templates in a custom module for Drupal ?

I created a custom module for Drupal 8.9

I have the Drupal Commerce and Group modules.

I want to create 3 pages and use TWIG templates :

  • /user/ID/tasks
  • /srore/ID/tasks
  • /group/ID/tasks

I want to create a template by type of group and store. How can I do this ?

My module is certainly full of errors.

With my code, the pages are well created, but the TWIG is not rendered.

task_notify.routing.yml

Why am I getting nodes that have been deleted in the array returned by node->fieldName->getValue()?

In the snippet below, I'm trying to get all of the donations content type for the current page so I can iterate over some information on each of them.  However, when I use var_dump on the array containing all of these donations that I want, it shows an array with 57 donations, when I only have 3.  

Presumably, it is no coincidence that the first 54 donations look like this:

[0]=> array(3) { 
  ["target_id"]=> string(2) "25" 
  ["_attributes"]=> array(0) { } 
  ["_loaded"]=> bool(false) 
}

and the last 3 look like:

How to create a TWIG for my personalized module ?

I just created my first custom module for Drupal 8.9

I want to create a TWIG for my page. How to do ?

Here is the complete module, it is not finished :

https://git.drupalcode.org/sandbox/zenimagine-3076032/-/tree/master/

task_notify.module

Direct, after login, users to the content they can create based on their role

When the user registers, he chooses for himself whether to register as a 'company' or as a 'professional' by assigning himself a role.
Each role can only create one type of content (e.g. Company role can create ctype Company/Professional role can create ctype Professional).

How to create a message at login that, only if the user has not yet created one, warns and directs him according to the role to the content he can create?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x