-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP Warning: Undefined property: DirectMailTeam\DirectMail\DmQueryGenerator::$settings in Classes/DmQueryGenerator.php line 109 #529
Comments
I can confirm this issue. Environment: warning-log:
|
When i remember correctly, this error occurs only when your recipient lists are build from special queries. This is a nice feature, but due xclassing, etc. it tends to break again and again. As an alternative, custom recipient lists are very easy to implement with the cool new events: public function __invoke(RecipientListCompileMailGroupEvent $event): void
{
$group = $event->getMailGroup();
$idLists = $event->getIdLists();
if ($group['type'] === self::MAILGROUP_TYPE) {
$recipientUids = $this->guildRecipientsRepository->getRecipientUids($group['guild']);
$idLists[GuildRecipientsRepository::TABLE] = array_merge($idLists[GuildRecipientsRepository::TABLE] ?? [], $recipientUids);
$event->setIdLists($idLists);
}
}
public function compileMailGroup(DmailCompileMailGroupEvent $event): void
{
$groupIds = $event->getMailGroup();
foreach ($groupIds as $groupId) {
$group = BackendUtility::getRecord(
'sys_dmail_group',
$groupId,
'*',
'AND type=' . self::MAILGROUP_TYPE
);
if ($group) {
$recipientUids = $this->guildRecipientsRepository->getRecipientUids($group['guild']);
$idLists[GuildRecipientsRepository::TABLE] = array_merge(
$idLists[GuildRecipientsRepository::TABLE] ?? [],
$recipientUids
);
$event->setIdLists($idLists);
}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I call up the ‘Recipient list’ module, I receive the following error message:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1476107295: PHP Warning: Undefined property: DirectMailTeam\DirectMail\DmQueryGenerator::$settings in /var/www/html/vendor/directmailteam/direct-mail/Classes/DmQueryGenerator.php line 109
If I fix this error provisionally, I receive the following error message:
TYPO3\CMS\Lowlevel\Controller\DatabaseIntegrityController::makeSelectorTable(): Argument #2 ($request) must be of type Psr\Http\Message\ServerRequestInterface, string given, called in /var/www/html/vendor/directmailteam/direct-mail/Classes/DmQueryGenerator.php on line 113
TYPO3 12.4.22
PHP 8.3
Branch "12.x-dev"
composer mode
The text was updated successfully, but these errors were encountered: