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:

  1. #2839523: Fatal error: Call to a member function getId() on a non-object
  2. 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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sebas5384 created an issue. See original summary.

sebas5384’s picture

sebas5384’s picture

Status: Active » Needs review
manuel.adan’s picture

The 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.

  • manuel.adan committed dcc242d on 8.x-1.x
    Issue #2908343 by manuel.adan, sebas5384: Use of session is causing a...
manuel.adan’s picture

Status: Needs review » Fixed

Committed. Please, reopen if needed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

manuel.adan’s picture

Assigned: manuel.adan » Unassigned