When updating a license, modifying any of the following fields does not update:
Product
Owner
Owner name
Though updating the following fields does work:
Owner email
Enabled?
This bug appears in the front end, but also attempting to programatically edit fields fails:
$license = Craft::$app->getElements()->getElementById($licenseID, License::class);
if (!$license) {
throw new Exception('No license with the ID “{id}”', ['id' => $licenseID]);
}
$license->productId = $newProductId;
$success = Craft::$app->getElements()->saveElement($license);
if (!$success) {
Craft::error('Couldn’t save the license ', __METHOD__);
return false;
} else {
Craft::info('Saved the license', __METHOD__);
}
return $this->redirectToPostedUrl();
The log shows "Saved the license", but the license in digitalproducts_license has not been updated.
However the element for the licenese in elements has been update with a new dateUpdated date.
Description
When updating a license, modifying any of the following fields does not update:
Though updating the following fields does work:
This bug appears in the front end, but also attempting to programatically edit fields fails:
The log shows "Saved the license", but the license in
digitalproducts_license
has not been updated. However the element for the licenese inelements
has been update with a newdateUpdated
date.