Openfoodnetwork: Impossible to reach an OC older than 6 months ago

Created on 9 Dec 2019  路  7Comments  路  Source: openfoodfoundation/openfoodnetwork

Description

I've discovered this while talking with a hub trying to find an OC they created in December last year. This OC had special Christmas products, so they wanted to duplicate this OC for this year.

Steps to Reproduce

  1. Go to /admin/order_cycles
  2. Select a hub that has data for at least a year. With French prod data use "Collectif Court-Circuit d茅p么t de la Barre de Monts"
  3. Use the +30 days or +90 days button to reach OC from the past.
  4. You will be able to reach OC from the Month of May
  5. After that hitting any of those 2 buttons will result in an infinite spinner. I guess a time out, but dev tools doesn't provide any info.

Animated Gif/Screenshot

image

Workaround

Recreate the OC from scratch

Severity

bug-s3: a feature is broken but there is a workaround

Your Environment

  • Version used: v2.6.6
  • Browser name and version: Firefox 71
  • Operating System and version (desktop or mobile): Both
bug-s3

All 7 comments

I cant replicate Rachel, I made myself manager of this hub and it works:
Screenshot 2019-12-09 at 11 22 07

Maybe too much data and enterprises on your user? In your screenshot I see the last line on the network tab has not finished yet. have you tried to wait for it to finish or timeout?

@luisramos0 I waited during 30min, the spinner kept looping. I guess there is a timeout, but just not visible to the user (even in dev tools). So I guess it is a performance problem. The user I've used has 5 enterprises, which is not that much in the OFN world. What's the correct way to record performance, just add a label? @lin-d-hop ?

It's not urgent, but we need to document this so we remember.

this is not a performance problem until we prove it's a performance problem. Not all timeouts are performance problems. (actually this is not a timeout, this is a request without response).
All we know is that your user is seeing a spinner and my user is seeing the correct results.

Can you replicate this consistently? do you keep getting that line in network tab without a code (like 200 or 502)?
Also, what filters did you use in the page?

Can you replicate this consistently? do you keep getting that line in network tab without a code (like 200 or 502)?

Yes to both.

Also, what filters did you use in the page?

I filter on the hub "Collectif Court-Circuit d茅p么t de la Barre de Monts"

hey Rachel, what user is logged in?
I can replicate this with super admin...

@luisramos0 the user email is

collectifcourtcircuit[at]orange.fr

My email: rachel.arnould[at]openfoodfrance.org however before doing my tests for this user the other day I spent an hour removing myself from ALL the enterprise I helped in the past and where I was a manager... but I can still see theses enterprises in my profile ... 馃憖

I need to check this further... it seems that changing ownership does not remove me as an owner somehow... will open an issue when I figure this out.

collectifcourtcircuit has access to 38 enterprises.
I set my user similarly and I can see the problem. It's weird the request is not timing out. I wonder if it is because the query string is too long. The existing pagination is implemented in a dodgy way where the next request includes a list of all OCs already on the page...
Screenshot 2019-12-11 at 14 40 59
and it goes on...
The js code is building a list id_not_in that is picked up by ransack on the server side:
https://github.com/openfoodfoundation/openfoodnetwork/blob/7ccfdc8d21800ae116a83a303cedae90ecca04d2/app/assets/javascripts/admin/order_cycles/controllers/order_cycles_controller.js.coffee#L38

This problem should probably be resolved by redoing the pagination on this page 鈽濓笍

Ill leave it for now. S3.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sauloperez picture sauloperez  路  3Comments

kristinalim picture kristinalim  路  3Comments

filipefurtad0 picture filipefurtad0  路  3Comments

andrewpbrett picture andrewpbrett  路  3Comments

sauloperez picture sauloperez  路  3Comments