I have created a custom attribute with Yes/No values in Magento 2.3.5. Its value is changing automatically after every hour from Yes to No. I can't figure out what is changing its value. Can any know a method to figure it out or know a way to debug this issue? I have a lot of third-party extensions on my site but can't figure out which extension is changing this value.
Since it's a matter of a repetitive action at a given time interval, I would suggest you take a look in the following areas:
- Magento cronjobs - verify which is the schedule for all your cronjobs registered through Magento. Magento does not provide an OOTB command for this (
bin/magento <something>) but you could use N98 magerun tool to get the list by executing its command:
The result will be something like seen below and you will want to check whether you have any crons scheduled every hour by inspecting the right columns which represent the cron schedule expression. This will narrow down the list 'of suspects' which you will then take one by one and see which involves saving data on the products. I am assuming some import features from a 3rd party module.
- Filesystem crons - it's very unlikely that you have a custom script set as filesystem cron that makes changes, but I would check here as well, under both the webserver user crontab (assuming that's www-data) and also the root user too. This can be checked like this
crontab -l -u<user>
just make sure you replace
<user> with the root and webserver users.
You will have to exclude any Magento crons from the list from crontab, the default generic one looks like this:
* * * * * /usr/local/bin/php /var/www/html/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/html/var/log/magento.cron.log
API calls - well for this you will need to know the list of all integrations which are allowed to make calls and changes to your Magento website via API calls. Not a straight forward answer, you will have to probably ask around and see which are the current integrations you have. The starting point is the System > Extensions > Integrations list of existing integrations - focus on those which have permissions to Catalog - Products resources.
Worst case scenario if nothing helped so far - disable all your 3rd party modules on a testing/ local environment, then re-enable them one by one and see if the behavior appears.
Wish you best of luck!