-
-
Notifications
You must be signed in to change notification settings - Fork 725
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
Can't Delete Products from Enterprise's Product list #5947
Comments
Maybe related to #5942 |
I experienced this issue after upgrading my test system from 2.9.6 to 3.2.3. Certain products cannot be deleted through the UI, and no error message is provided. The server's production.log file does not provide any useful debugging information. This issue appears to be related to the addition of the Spree::StockItem code (0e71183) In the rails console, if I run Spree::Product.destroy on a product that cannot be deleted, I get: This issue was reported in Spree: spree/spree#3723 In Spree, it looks like the fix was to remove stock_movements as a dependency to Spree::StockItem.destroy Fix: On my test system, if I make that change to stock_item.rb, I'm then able to delete those products in the UI. Should also make the other recommended change in that spree issue, which was to "soft delete" the stock_item entries instead of hard deleting them so that the stock_movements entries can still reference the deleted stock_items. |
Also noting this issue - and the comment the recent move to V3 brought soft deletion to stock items - could this have caused the problem of not being able to delete variants that have been ordered ? #5335 |
I have partially reproduced this bug in a staging environment. It seems to play a role, whether the stock of the product/variant to be deleted is set to be on_hand or on_demand. For two newly created products, product A with stock
The image of that product seems broken, after attempting to delete the product, which seems to be causing error 404 on the console. This is also the case, when logged in as superadmin. Hope this is useful to tackle the underlying issue. |
On release testing just now I noticed that also Duplicate Product button is not working for some cases. I am noting here because I have a hunch it is related.... but I don't have the time to investigate properly and create an issue right now. |
@lin-d-hop we have this known issue here: #3808 is that what you have experienced? |
Just concuring with @emilyjeanrogers (and embarassed I didn't flag when I created the issue). There is no way to move only one variant to another producer. So if a product has many variants - support team has to assign all of them to a dummy enterprise, and re-create the entire list of variants, minus the one variant the producer needs deleted. Speaking for alread over-burdened support teams - surely we'd say that this workaround is not realistic, and make this an s2. |
Description
Aus Enterprise Grassroots Beef (975) has several products they wish to delete. In Edit Products, on select of the Trash Icon, the confirmation window appears 'Are you Sure?'. On select 'Yes' to confirm, nothing happens. The product doesn't delete.
Expected Behavior
A product can be deleted, or an error message is shown explaining why it can't be deleted.
Actual Behaviour
Nothing happens - product is not deleted.
The products they want to delete have now been listed as variants of a single Soap product. See image below:
Maybe related:
The screen shot above was taken when logged in as Superadmin, and shows that the products that could not be deleted don't have images. This screen shot was taken in Chrome on a MacBook Pro. Tested on Safari as well - also no images.
@chezaorchard took the following screenshot at the same time, also logged in as Superadmin, also using Chrome browser, and the products DO have images.
Steps to Reproduce
Workaround
The products can not be deleted. There is no workaround. The products can be ignored, but this is highly annoying to the customer.
Severity
S2
bug-s1: a critical feature is broken: checkout, payments, signup, login
bug-s2: a non-critical feature is broken, no workaround
bug-s3: a feature is broken but there is a workaround
bug-s4: it's annoying, but you can use it
bug-s5: we can live with it, only a few users impacted
https://github.com/openfoodfoundation/openfoodnetwork/wiki/Bug-severity
-->
Your Environment
Possible Fix
The text was updated successfully, but these errors were encountered: