- Issue created by @nikhilesh gupta
- Status changed to Needs review
over 2 years ago 10:59am 20 February 2023 - 🇮🇳India TanujJain-TJ
Reviewed patch #2 the patch applied successfully. tested with drupal:10.1.
- 🇺🇸United States SocialNicheGuru
this happens if you have update_helper installed. It does not if it is not.
What happens during updates:
- update_helper loads the entity (line 432 in Updater.php)
- Compares it against expected_config
- If it matches, proceeds with update_actions
- If it doesn't match or entity is null, it fails safelyThe original empty {} was problematic because:
- It allowed null entities to pass validation
- Caused the fatal error when trying to call updateFromStorageRecord() on null
- Essentially bypassed the safety checksThere is a patch to make the updates more robust.
And there is this patch for update_helper:
"drupal/update_helper":{ "Argument #1 ($entity) must be of type Drupal\Core\Config\Entity\ConfigEntityInterface":"https://www.drupal.org/files/issues/2023-02-20/entity-3343140-2.patch" },
I saw the patch above which matches the update error that I saw.
I created the patch and tested it and it seems to work.patch file: 3536078-fix-extension-list-module-getpath-comprehensive.patch
This patch includes fixes for:
- social_course_update_8305.yml (3 views)
- social_course_update_8307.yml (1 view)
- social_course_statistics_update_13001.yml (2 views)It was successfully tested on social_course 6.2.4 and applies cleanly.