Skip to content

"Latest updates" never loads #438

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

Closed
Keruspe opened this issue Sep 9, 2016 · 1 comment · Fixed by #622
Closed

"Latest updates" never loads #438

Keruspe opened this issue Sep 9, 2016 · 1 comment · Fixed by #622
Labels
C-bug 🐞 Category: unintended, undesired behavior

Comments

@Keruspe
Copy link
Contributor

Keruspe commented Sep 9, 2016

On https://crates.io/dashboard the "Latest updates" section on the right never seems to load.

The spinner keeps being displayed for some time, then is replaced by a "Load More" button.

Same thing happens again when clicking "Load More".

Note that when the page is loading, and then each time I click "Load More", I get this in the console:

TypeError: e is undefined a() vendor-b5eaa22629fc0ae42aba95c5979b7b1f.js:8 n() vendor-b5eaa22629fc0ae42aba95c5979b7b1f.js:8 C() vendor-b5eaa22629fc0ae42aba95c5979b7b1f.js:16 o.inline() vendor-b5eaa22629fc0ae42aba95c5979b7b1f.js:16 u.prototype.populateNodes() vendor-b5eaa22629fc0ae42aba95c5979b7b1f.js:17 u.prototype.render() vendor-b5eaa22629fc0ae42aba95c5979b7b1f.js:17 o()

Not sure how I can provide more information.

@carols10cents carols10cents added the C-bug 🐞 Category: unintended, undesired behavior label Dec 15, 2016
@utkarshkukreti
Copy link
Contributor

I've been seeing this behavior for months now. Just decided to open the console and saw this error logged:

Error: Compile Error: from-now is not a helper

I think the following change should fix this but I'm unable to setup logging in with start:live (is that even possible?) so I can't test right now.

diff --git a/app/templates/dashboard.hbs b/app/templates/dashboard.hbs
index f0b074e..9be2ff6 100644
--- a/app/templates/dashboard.hbs
+++ b/app/templates/dashboard.hbs
@@ -52,7 +52,7 @@
                         {{link-to version.crate.name 'crate.version' version.num}}
                         <span class='small'>{{ version.num }}</span>
                         <span class='date small'>
-                            {{from-now version.created_at}}
+                            {{moment-from-now version.created_at}}
                         </span>
                     </div>
                 </div>

If anyone else is able to test this, please feel free to commit this if it works.

sgrif added a commit to sgrif/crates.io that referenced this issue Mar 12, 2017
Get it? Because this ports the following endpoints. To Diesel.
...Anyone?

This ports 4 endpoints over to Diesel. The 3 endpoints which manipulate
the `following` endpoint, as well as the `/me/updates` endpoint since it
is only hit by the tests for the following endpoints.

I ended up changing the updates endpoint quite a bit. I wanted to
eliminate the N+1 queries on the max version, and was wondering why we
needed the max version at all here. I went to go look at it in the UI,
and it turns out that the dashboard page which displayed it is actually
broken as well. After fixing it, I noticed that it doesn't need the
crates at all, just the name (which we tell Ember is the id).

I couldn't actually find a good way in Ember to reference the ID of an
association without loading the whole thing. If anybody knows a better
way to do it than what I'm doing here, please let me know.

Since we don't need the crates, I've just opted not to include that data
in the response body (note that just not including the max version is a
bad idea, since ember caches stuff and it could result in a page that
does need the max version displaying wrong later).

While I was touching these endpoints, I also went ahead and reduced them
all to a single query.

Fixes rust-lang#438.
sgrif added a commit to sgrif/crates.io that referenced this issue Mar 12, 2017
Get it? Because this ports the following endpoints. To Diesel.
...Anyone?

This ports 4 endpoints over to Diesel. The 3 endpoints which manipulate
the `following` endpoint, as well as the `/me/updates` endpoint since it
is only hit by the tests for the following endpoints.

I ended up changing the updates endpoint quite a bit. I wanted to
eliminate the N+1 queries on the max version, and was wondering why we
needed the max version at all here. I went to go look at it in the UI,
and it turns out that the dashboard page which displayed it is actually
broken as well. After fixing it, I noticed that it doesn't need the
crates at all, just the name (which we tell Ember is the id).

I couldn't actually find a good way in Ember to reference the ID of an
association without loading the whole thing. If anybody knows a better
way to do it than what I'm doing here, please let me know.

Since we don't need the crates, I've just opted not to include that data
in the response body (note that just not including the max version is a
bad idea, since ember caches stuff and it could result in a page that
does need the max version displaying wrong later).

While I was touching these endpoints, I also went ahead and reduced them
all to a single query.

Fixes rust-lang#438.
sgrif added a commit to sgrif/crates.io that referenced this issue Mar 14, 2017
Get it? Because this ports the following endpoints. To Diesel.
...Anyone?

This ports 4 endpoints over to Diesel. The 3 endpoints which manipulate
the `following` endpoint, as well as the `/me/updates` endpoint since it
is only hit by the tests for the following endpoints.

I ended up changing the updates endpoint quite a bit. I wanted to
eliminate the N+1 queries on the max version, and was wondering why we
needed the max version at all here. I went to go look at it in the UI,
and it turns out that the dashboard page which displayed it is actually
broken as well. After fixing it, I noticed that it doesn't need the
crates at all, just the name (which we tell Ember is the id).

I couldn't actually find a good way in Ember to reference the ID of an
association without loading the whole thing. If anybody knows a better
way to do it than what I'm doing here, please let me know.

Since we don't need the crates, I've just opted not to include that data
in the response body (note that just not including the max version is a
bad idea, since ember caches stuff and it could result in a page that
does need the max version displaying wrong later).

While I was touching these endpoints, I also went ahead and reduced them
all to a single query.

Fixes rust-lang#438.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants