-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Not able to publish product #5414
Comments
I actually don't think this is directly inventory's fault. It seems the root of the issue here is on this line: https://github.com/reactioncommerce/reaction/blob/develop/imports/plugins/core/catalog/server/no-meteor/mutations/partialProductPublish.js#L12 Because this is a new product, it hasn't yet been published to the Catalog, so that's why Updating the default product works, because it's already been published to the catalog. Possible solution, on I'm not sure the overall consequences of that throughout other packages, but I'd start there. |
Yes, this was an oversight by Nat and I when we made |
After some more research, the root issue is caused by attempting to publish a new product without setting a product its variants + options to be visible. If variants or products are not set to be visible, the publish function fails and the user is not notified regarding invisible variants + options. Guard login needs to be added to check for input to include variants or variants + options before attempting to publish. |
Pretty sure the fix @kieckhafer mentions is also needed, though, if you update any inventory fields before publishing for the first time. |
@aldeed Yes, the checks @kieckhafer suggested are needed. |
Resolved in #5433 |
Issue Description
When creating a new product, I am unable to publish it.
Steps to Reproduce
Please provide starting context, i.e. logged in as a user, configure a particular payment method.
Generates the following error:
Scenario 2.
Generates the following error:
Possible Solution
Before calling the new partial publish function, it's necessary to ensure that inventory tracking is actually enabled. Further, do not publish inventory props when inventory tracking is NOT enable.
Just my quick thoughts, might be the solution, might not be.
The text was updated successfully, but these errors were encountered: