-
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
fix: find catalog product regardless of visibility #6089
Conversation
for cart and order transformation functions fixes #6077 Signed-off-by: Eric Dobbertin <[email protected]>
For my benefit, copying in @kieckhafer 's review comment from the closed PR:
|
Move media code into files plugin, and do not use the catalog as the source of media Signed-off-by: Eric Dobbertin <[email protected]>
FIXED: 7e5b787 When I try to publish a Product with variants, but no options on those variants, I see this error:
I can't add an official review since I made this PR (it was accidentally closed when we closed the 3.0 branch, I re-created it, but it is not my PR). |
Signed-off-by: Erik Kieckhafer <[email protected]>
Once I am in checkout, I cannot get past the Add Address step, this error occurs when trying to save my address:
I can't add an official review since I made this PR (it was accidentally closed when we closed the 3.0 branch, I re-created it, but it is not my PR). |
Status: The last error reported by @kieckhafer can't be fixed until we discuss and make some decisions in #6145 |
into files plugin Signed-off-by: Eric Dobbertin <[email protected]>
Signed-off-by: Eric Dobbertin <[email protected]>
Signed-off-by: Eric Dobbertin <[email protected]>
@kieckhafer This is ready for another look. I implemented the suggestion from #6145. It feels a bit error-prone, but it seems to work okay in my manual testing.
In example storefront, this manifests in a few ways:
It would be good to eventually request |
Signed-off-by: Eric Dobbertin <[email protected]>
Signed-off-by: Eric Dobbertin <[email protected]>
@aldeed I'm still seeing issues when items are deleted.
|
@kieckhafer Is this anonymous or are you logged in? Number 1 sounds like probably an issue with the Apollo caching in the storefront, and not necessarily something that can be fixed on the API side. Number 2 could be another API issue, but so far I can't reproduce. If you have more explicit reproduction steps that could help. |
@aldeed tried both anonymous and logged in.
|
Update: still unable to reproduce errors seen by @kieckhafer |
@kieckhafer That is probably due to the fact that many of the checkout steps do not refetch the cart from the server. It's essentially the same issue as this: reactioncommerce/example-storefront#469 And this issue is also related: reactioncommerce/example-storefront#193 Maybe I will see how easy it is to fix those issues in the storefront. They're separate, so we could merge this API change in the meantime, or we could wait until we figure out the storefront changes. |
@aldeed in that case this gets a 👍 from me. I don't have the option to merge the PR but go ahead and merge. |
The original PR, #6085, was accidentally closed when we deleted the old
release-3.0.0
branch. This is a copy of the original PR to thetrunk
branch.Resolves #6077
Impact: minor
Type: bugfix
Issue
Cart and order transformations fail when the catalog item related to a cart or order item has since been deleted or hidden.
Solution
Remove deleted/hidden checks from the queries. Look up by product ID only. That way it will only fail if the document has been hard deleted, which can only be done outside of the official GraphQL API and should never be done outside of a development environment as a rule.
Centralize media lookup in the
files
plugin rather thancatalog
, and use the Media collection directly for it rather than copying media from CatalogProduct.Breaking changes
None
Testing
See #6077 for reproduction steps and verify fixed.