Troubleshooting a The "WHMCS\Config\Setting" record "setting" property is guarded against updates Error
Symptom
After applying the 8.3.0 update, you may observe the following GuardedForUpdate
error:
WHMCS\Exception\Model\GuardedForUpdate: The "WHMCS\Config\Setting" record "setting" property is guarded against updates. in /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/Model/Observer.php:0
Cause
This is caused by the presence of files from an earlier version of WHMCS in the /admin
directory.
Solution
Execute the following query against your WHMCS MySQL database, using a tool like phpmyadmin:
SELECT value FROM tblconfiguration WHERE BINARY setting = 'ShowNotesFieldonCheckout';
If no results are returned, follow these steps:
Upload a new copy of the /admin
directory contents to your server, ensuring all files are overwritten successfully.
If the /admin
directory has been renamed, make certain to upload the files to that custom location.
If the MySQL query returns 1 row, follow these steps:
Execute the following MySQL query to correct the database value:
UPDATE tblconfiguration SET setting = 'ShowNotesFieldOnCheckout' where setting = 'ShowNotesFieldonCheckout';