From 83b5d346818e32d7eec2ec0ebe101bad89a09dcd Mon Sep 17 00:00:00 2001 From: Ines WALLON Date: Sun, 21 Mar 2021 19:56:33 +0100 Subject: [PATCH] fix: #308 fix drupal release url --- conf/drupal/default/sync/drupalfr_release.settings.yml | 2 +- .../custom/drupalfr_release/src/Service/ReleaseHelper.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/conf/drupal/default/sync/drupalfr_release.settings.yml b/conf/drupal/default/sync/drupalfr_release.settings.yml index d70c478ed..e0c6685b3 100644 --- a/conf/drupal/default/sync/drupalfr_release.settings.yml +++ b/conf/drupal/default/sync/drupalfr_release.settings.yml @@ -1,4 +1,4 @@ -xml_address: 'https://updates.drupal.org/release-history/drupal/8.x' +xml_address: 'https://updates.drupal.org/release-history/drupal/current' langcode: fr _core: default_config_hash: LoAi4RTywI8FX8zyxeZaP960KNK4FYZbR7W-FEIUEI4 diff --git a/www/modules/custom/drupalfr_release/src/Service/ReleaseHelper.php b/www/modules/custom/drupalfr_release/src/Service/ReleaseHelper.php index 52ae52e34..d1fd5e078 100644 --- a/www/modules/custom/drupalfr_release/src/Service/ReleaseHelper.php +++ b/www/modules/custom/drupalfr_release/src/Service/ReleaseHelper.php @@ -103,7 +103,9 @@ public function importReleaseListData(array $data) { // Set values of fields. $node->set('title', $result['name']); $node->set('status', NodeInterface::PUBLISHED); - $node->set('created', $result['date']); + if (isset($result['date'])) { + $node->set('created', $result['date']); + } $node->set('field_release_version_major', $result['version_major']); if (isset($result['version_minor'])) { $node->set('field_release_version_minor', $result['version_minor']);