-
Notifications
You must be signed in to change notification settings - Fork 312
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
Inconsistency between server and client side rendering when params are passed to a collection #350
Comments
I can reproduce this, but not with the same steps that you described.
|
@lo1tuma I can see where my steps were confusing, I updated the description with your step 2 and 3. |
It seems like the sort parameter is not the root cause. I'm also able to reproduce this with the steps @lo1tuma mentioned. @por, you can see that the # of repos is also missing in the client side view. I went pretty far back on the commit history and am able to reproduce this issue even before 8c8d7ef. Oddly, if we try and reproduce the same issue using Repos instead of Users in example 00_simple, the client/server side render the same content via these steps: 1) cleanly load /repos 2) click on any repo url (e.g. /repos/mojombo/grit) 3) refresh and you see the same content. |
@benjie is right, it is broken since commit 8c8d7ef. Considering number of repos missing, it is due to client side caching. It can be fixed by adding ensureKeys : [ 'public_repos' ] in user_controller show action. |
Ran into this problem with my own app, and was able to reproduce with the
00_simple
example app.Steps to reproduce:
In
app/controllers/users_controller.js
: addsort
param to repos collection.Load a user page by navigating to it (e. g. from Users page), but make sure the user data is not cached on the client.
Refresh the user profile, which causes a server side rendering.
Expected result:
Both pages render exactly the same.
Actual result:
Client behaves as expected, server ignores the
sort=pushed
param and lists the repositories alphabetically.I’m not sure all parameters passed to the collection should be sent as query parameters by default, maybe that should be done by the app logic, but we should at least make sure client and server behave the same in this scenario.
The text was updated successfully, but these errors were encountered: