Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After installing the Miling List module my Drupal console stop working, and thats because it assumes that session is always available, bit in CLI mode is not.
I found some issues related to this kind of problem:
- #2839523: Fatal error: Call to a member function getId() on a non-object
- https://github.com/hechoendrupal/drupal-console/issues/3091
I'll attach a patch which solves this problem in my case, but I wonder what side effects this fix could have.
Comment | File | Size | Author |
---|---|---|---|
#4 | interdiff-2908343-1-4.txt | 1.3 KB | manuel.adan |
#4 | mailing_list--drupal-console-compatibility-2908343-4.patch | 644 bytes | manuel.adan |
#2 | mailing_list--drupal-console-compatibility--2908343-1.patch | 1.07 KB | sebas5384 |
Comments
Comment #2
sebas5384 CreditAttribution: sebas5384 at Taller commentedComment #3
sebas5384 CreditAttribution: sebas5384 at Taller commentedComment #4
manuel.adanThe user session is required to grant access to the own mailing list subscriptions when the current user is anonymous or identified working with third party subscriptions. Without user session, this support is simply not available.
I noticed that the session manager doesn't start on CLI or when cookies aren't allowed, so a simpler approach to avoid the problem is to check for its status right before using of the user private temporary store. Please, confirm that this way also solves it.
Comment #6
manuel.adanCommitted. Please, reopen if needed.
Comment #8
manuel.adan