Product data gets overwritten when API is disabled

Created on 8 June 2025, about 2 months ago

Problem/Motivation

When the config amazon_api_disabled is set and a product is refreshed, an exception is thrown. This is expected. However, product data is then overwritten with FALSE. In this case, it would probably be better to leave the product data alone.

Example use case:
We are migrating data to a staging server and comparing the staging server pages to the production pages. When the products are refreshed on stage, they slowly start disappearing from the pages because the API is disabled there. In our case, it would be beneficial to be able to keep the products as they are, even if the data is stale.

Steps to reproduce

1. Install module
2. Integrate a product into a node and refresh the product
3. Set the config amazon_api_disabled to true
4. Refresh the product again
5. Its data is now gone

The API being disabled should just mean the services refuse to communicate with the Amazon API, which means product data cannot be invalid, as there should be no communication in the first place.

Proposed resolution

Implement a fix to not update product data when the API is disabled.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.5

Component

Code

Created by

🇸🇮Slovenia miha.wagner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024