Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.6.0-b1
-
Component/s: None
-
Labels:None
Description
The issue is clearly seen in the code. We fetch services based on renewal date (see plugins/domains/domains_plugin.php around line 1258).
Potential solution: Update plugins/domains/domains_plugin.php around line 1258 from
$services = $this->Services->getAll( ['date_added' => 'DESC'], true, [], [ 'services' => [ 'package_group_id' => $settings['domains_package_group'], ['column' => 'date_renews', 'operator' => '>=', 'value' => $start_date], ['column' => 'date_renews', 'operator' => '<=', 'value' => $end_date] ] ] );
To
$domains = $this->Record->select()-> from('domains_domains')-> where('expiration_date', '>=', $start_date)-> where('expiration_date', '<=', $end_date)-> fetchAll(); $service_ids = array_values($this->Form->collapseObjectArray($domains, 'service_id', 'service_id')); // Fetch all qualifying services $services = []; if (!empty($service_ids)) { $services = $this->Services->getAll( ['date_added' => 'DESC'], true, [], [ 'services' => [ 'package_group_id' => $settings['domains_package_group'], ['column' => 'id', 'operator' => 'in', 'value' => $service_ids] ] ] ); }