Problem/Motivation

When running cron through a drush command, I get the following error:

Error: Call to a member function id() on null in domain_entity_entity_access() (line 501 of /var/www/html/web/modules/contrib/domain_entity/domain_entity.module)

This is because there is no active domain to resolve.

Proposed resolution

Maybe make an exception to skip the access check when this is invoked by a drush command?
Could be something along the lines of what is proposed in this issue.
The linked issue was also something I faced and was resolved by implementing the patch.

CommentFileSizeAuthor
#2 domain_entity-cli-check-3266069-2.patch586 byteslroels
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

LiamRoels created an issue. See original summary.

lroels’s picture

StatusFileSize
new586 bytes

This patch could be a start based on the linked issue above.
Problem seems to be resolved after this patch is applied.

delta’s picture

Status: Active » Reviewed & tested by the community

lgtm

  • delta committed 61878fe on 8.x-1.x
    Issue #3266069 by LRoels: Cron cannot be ran through a drush command
    
delta’s picture

Version: 8.x-1.0-beta1 » 8.x-1.0-beta9
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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