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

Impossible to select outgoing products in OC #8256

Closed
RachL opened this issue Sep 28, 2021 · 13 comments
Closed

Impossible to select outgoing products in OC #8256

RachL opened this issue Sep 28, 2021 · 13 comments
Assignees
Labels
bug-s1 The bug is stopping the platform from working, and there is no workaround. Impact of lot of users.

Comments

@RachL
Copy link
Contributor

RachL commented Sep 28, 2021

Description

FR prod hub 2588 cannot select products in OC step 3. Variant checkbox does not appear.

Inventory is not used.
Permissions with producers are set.
No fancy settings.
No advanced OC settings.

OC : https://coopcircuits.fr/admin/order_cycles/9147/outgoing

Expected Behavior

To be able to select product in outgoing section.

Actual Behaviour

Variants can't be selected

Steps to Reproduce

We don't know yet. We tried adding a new producers to this hub, same problem. So now we are working on building a separate shop for them.

Animated Gif/Screenshot

image.png

Workaround

None

Severity

bug-s1: a critical feature is broken: checkout, payments, signup, login

Your Environment

  • Version used: v.4.1.2
  • Browser name and version: Firefox and chrome
  • Operating System and version (desktop or mobile): Desktop
@RachL RachL added the bug-s1 The bug is stopping the platform from working, and there is no workaround. Impact of lot of users. label Sep 28, 2021
@RachL
Copy link
Contributor Author

RachL commented Sep 28, 2021

It looks very similar to this discussion : https://openfoodnetwork.slack.com/archives/CG7NJ966B/p1632710958100000

@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Sep 28, 2021

I'm not sure if related, but is the displayed account taking all the roles in this case: supplier, OC coordinator and distributor?

It is necessary for the supplier (below: Cranberry Farm) to grant permission to OC coordinator (below: Curry Hub) and to the distributor (below: Wasabi Hub) as well, to add to OC:

Peek 2021-09-28 17-04

Otherwise the OC coordinator will not be able to select the products in the outgoing section.

But this is known and expected behavior, it should not be the issue:

"The coordinator can choose from the complete list of incoming products, which will be displayed on each distributing Hub's shopfront. The supplier (producer profile or shop) must have set up an enterprise permission of 'add to order cycle' between themselves and the specific distributing hub (as well as the coordinator)."

@RachL
Copy link
Contributor Author

RachL commented Sep 28, 2021

Thanks @filipefurtad0 ! Maybe some things to pursue for the slack conversation. In FR's case the shop is the coordinator and all permissions are set between the shop and the producers in both way.

@lin-d-hop
Copy link
Contributor

I wonder if this is also related to #8202
I thought that was a performance issue due to v large OC but they tried removing products and it didn't help.

@Matt-Yorkley
Copy link
Contributor

Matt-Yorkley commented Sep 29, 2021

I think this one is caused by a weird Javascript error:
Screenshot from 2021-09-29 14-37-40

Looks like something in there is null / undefined in an unexpected way. I think it's somewhere around the visibleVariants Angular filter, but it's hard to say.

These errors don't show up when viewing the outgoing page for other (working) order cycles.

@Matt-Yorkley
Copy link
Contributor

Matt-Yorkley commented Sep 29, 2021

Hmmm okay, it looks like the Coordinator of the OC actually doesn't have sufficient permissions to add those products to an outgoing exchange, which is why they're showing as zero / empty...?

So it sounds like what @filipefurtad0 described previously: #8256 (comment)

@RachL
Copy link
Contributor Author

RachL commented Sep 29, 2021

Hmmm but in that case the coordinator is the distributor... What can we do to add the correct permissions? Delete the current ones and recreate them?

@Matt-Yorkley
Copy link
Contributor

Matt-Yorkley commented Sep 30, 2021

Aha... the permissions are all set, but it turns out the prefers_product_selection_from_inventory_only? was actually not set. Looks like there's a bug which means the setting isn't being saved/displayed correctly. Clicking that option and saving it fixes the OC.

Screenshot from 2021-09-30 11-13-32

@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Sep 30, 2021

Great catch @Matt-Yorkley,
I've checked this in staging now and indeed, it seems "older" (or some? which ones?) enterprises have this value set in the DB, but this is never displayed on the UI (as shown on your pic).

More recent enterprises do not have this preference set, neither in the DB nor in the UI. Setting it saves the value in the DB, but leaves the UI with no option selected:

Peek 2021-09-30 12-23

@tschumilas
Copy link

Ah - this explains something! I've been helping a few enterprises with issues lately and I always start by checking all their profile settings - and I noticed this wasn't checked. I thought it odd.... Good detective work. (Its why I need to be more on top of reading git issues.....)

@adele-ofn
Copy link

Confirming that we're also having this issue in AUS, and that it has impacted an enterprise's ability to see products in "outgoing products". See screenshots of me trying to update the inventory settings.
1
2
.
3

@tschumilas
Copy link

I see this now too - at least with one enterprise. Its an old enterprise - not a new one. I check 'new products can be put into my shopfront'. The item is selected. I leave the page. I return to the page - and the selection is not there. It seems the selection is not 'sticking'.

@tschumilas
Copy link

Actually - it seems to be the case on many (all?) enterprises. I just checked 10 enterprises that I work with a lot - and the setting does not 'stick' for any of them. I know these previously were working.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s1 The bug is stopping the platform from working, and there is no workaround. Impact of lot of users.
Projects
None yet
Development

No branches or pull requests

6 participants