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

Assets and areas are not always populated on login #125

Closed
alexadamsmith opened this issue Feb 5, 2019 · 5 comments
Closed

Assets and areas are not always populated on login #125

alexadamsmith opened this issue Feb 5, 2019 · 5 comments

Comments

@alexadamsmith
Copy link
Collaborator

This bug only occurs after clearing caches on the browser or doing a fresh install in Android. I log in for the first time, then click "create log" in the AllLogs view to navigate to the EditLog view. Even though I'm logged in, the areas and assets haven't been populated.

Curiously, if I do the same thing (log in after a fresh install / cleared caches) and then use the app shell menu to navigate to the EditLog view, then the problem does NOT occur, and areas and assets are populated!

In an email exchange, @jgaehring suggested we should request assets and areas whenever /logs/edit is loaded.

@alexadamsmith
Copy link
Collaborator Author

More exactly:
The error occurs only when the user first navigates to the 'edit logs' view, THEN logs in, and is re-directed back to 'edit logs'. Looking at it a bit more, I believe this occurs regardless of whether they are navigating to 'new logs' via the menu, or via the 'create log' button.

@alexadamsmith
Copy link
Collaborator Author

I fixed this by loading assets and areas when a /logs/edit route is called, rather than when /logs is called. On /logs, we now only load logs and user data + site info.

@jgaehring
Copy link
Member

Excellent! Glad you were able to figure that out! 👏 👏 👏

@mstenta mstenta transferred this issue from farmOS-legacy/farmOS-client Feb 19, 2019
@mstenta
Copy link
Member

mstenta commented Feb 19, 2019

(Transferring all issues from old repository. See #92)

@jgaehring
Copy link
Member

Closing this per Alex's comment above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants