Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Edit Product] Impossible to discard product changes once images have been uploaded. #15258

Open
pmusolino opened this issue Feb 26, 2025 · 2 comments
Labels
priority: high Affects lots of customers substantially, but not critically. type: bug A confirmed bug.

Comments

@pmusolino
Copy link
Member

Describe the bug
While working on image uploads in the background, I discovered an issue that also exists on the trunk branch. When a user uploads one or more images to a product or a product variation and then decides to discard the changes, it initially appears that the changes have been discarded correctly. Returning to the product list works fine. However, upon reopening the product, the newly uploaded images are still present, and it is possible to save the changes. Additionally, to return to the previous state, the user must press back and discard the changes again. Closing and reopening the app resolves the issue.

I found that this issue occurs only with product images, not with other product fields.

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to the Product List:

    • Ensure you are logged into your store account.
    • Go to the product list where you can view all your products.
  2. Select a Product to Edit:

    • Choose a product or product variation to edit by tapping on it.
  3. Upload Images:

    • Begin the process of uploading one or more images to the selected product or variation.
    • Complete the upload process and ensure the images are visible in the product edit view.
  4. Attempt to Discard Changes:

    • After uploading, attempt to discard the changes by pressing the "Back" button.
    • When prompted, choose the option to discard the changes.
  5. Return to Product List:

    • Navigate back to the product list and ensure no immediate changes are reflected.
  6. Reopen the Product:

    • From the product list, reopen the same product you previously edited.
  7. Observe the Uploaded Images:

    • Notice that the images you attempted to discard are still present as if they were saved.
  8. Attempt to Discard Again:

    • Press the "Back" button once more.
    • Discard the changes again if prompted.
  9. Verify Issue Resolution by Closing App:

    • Close the WCiOS app completely.
    • Reopen the app.
    • Navigate back to the same product and verify whether the images are still present or have been removed.

Recording

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-02-26.at.16.31.25.mp4

Expected behavior
The expected behavior is that when a user uploads images to a product or variation and chooses to discard the changes, all unsaved changes, including the new images, should be immediately removed from the product edit view. When the user returns to and reopens the product, it should display its last saved state, without any trace of the discarded edits. This ensures that users do not need to restart the app to see the correct, intended state.

Mobile Environment
Please include:

  • Device: iPhone 16 pro simulator
  • iOS version: iOS 18.0
  • WooCommerce iOS version: it happens on multiple testing stores with different WooCommerce version
@pmusolino pmusolino added type: bug A confirmed bug. priority: high Affects lots of customers substantially, but not critically. labels Feb 26, 2025
@dangermattic
Copy link
Collaborator

🚫 Please add a type label (e.g. type: enhancement) and a feature label (e.g. feature: stats) to this issue.

@pmusolino
Copy link
Member Author

Opened CUW issue here: peaMlT-1a0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high Affects lots of customers substantially, but not critically. type: bug A confirmed bug.
Projects
None yet
Development

No branches or pull requests

2 participants