Closed amjadm61 closed 2 years ago
@amjadm61 Thanks for raising.
The patch script has discovered that you have existing Dotdigital cron configurations saved i.e.
connector_developer_settings/cron_schedules/importer
connector_developer_settings/cron_schedules/order
connector_developer_settings/cron_schedules/contact
connector_developer_settings/cron_schedules/catalog
connector_developer_settings/cron_schedules/review_wishlist
However at least one of your paths has a value that does not contain a /. Perhaps you modified these in the past?
The default values are here: https://github.com/dotmailer/dotmailer-magento2-extension/blob/master/etc/config.xml#L315-L321
We'll add some error handling into the patch, but for you in the meantime you could simply remove or update any connector_developer_settings/cron_schedules
values so that they contain a /, so the explode()
will function correctly.
We've realised that if you had cron schedules set to 'Every 60 minutes' this stores a value of 00 * * * *
in the table - and these rows would break at the explode()
.
So - you can change any such settings to e.g. every 30 minutes, run the upgrade, then set them back once the patch is run successfully.
@sta1r Thanks. it worked
current environment: Magento 2.4.2 Enterprise php version: 7.4.21
steps to reproduce:
Expected Result: setup upgrade should complete without any error
Actual Result: throwing an error during setup:upgrade Unable to apply data patch Dotdigitalgroup\Email\Setup\Patch\Data\SetCronsWithOffset for module Dotdigitalgroup_Email. Original exception message: Notice: Undefined offset: 1 in /var/www/html/vendor/dotdigital/dotdigital-magento2-extension/Setup/Patch/Data/SetCronsWithOffset.php on line 118
file: https://github.com/dotmailer/dotmailer-magento2-extension/blob/master/Setup/Patch/Data/SetCronsWithOffset.php#L118 line: $offset = (int) explode("*", explode("/", $configuration["value"])[1])[0];