Problem/Motivation
When you run cron you should see the following error:
Warning: Trying to access array offset on value of type null in Drupal\Core\Cron->processQueue() (line 264 of /var/www/html/core/lib/Drupal/Core/Cron.php)
Steps to reproduce
Run cron.
Proposed resolution
- Take into account that the parent class has a constructor.
- Since the class code of both plugins is completely the same, create a base class for them.
- Ensure that the user entity is found based on E-mail and that the user entity isn't a pre-defined entity created during the enabling installation profile.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | interdiff_4-5.txt | 741 bytes | ohorbatiuk |
| #5 | exception-mailer-queue-worker-3395572-5.patch | 8.64 KB | ohorbatiuk |
Issue fork exception_mailer-3395572
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
Comment #2
ohorbatiukComment #3
ohorbatiukEnsure that the user entity is found based on E-mail and that the user entity isn't a pre-defined entity created during the enabling installation profile.
Comment #4
ohorbatiukAdd checking to exist a severity record during letter content creation.
Comment #5
ohorbatiukFix the condition that was added in the previous patch.
Comment #6
szato commented@lexhouk,
thank you for your report, and work.
We should update the patch:
if (($user = user_load_by_mail($admin)) !== FALSE) {toif ($user = user_load_by_mail($admin)) {Comment #7
szato commentedWe also want to send emails to addresses that aren't associated with existing users, so we need something like this:
Comment #8
szato commentedComment #10
szato commentedRegarding points: 1, 2
I removed 'exception_email_queue' plugin, we are using only the 'manual_exception_email'. Duplicates were made in the commit: https://git.drupalcode.org/project/exception_mailer/-/commit/31379083fbc...
MR created.
Comment #13
kosa ilma commented