Closed nglasl closed 5 years ago
It seems to be working now. Do you know the exact time this occurred you got that error?
Hi @maxime-rainville, I'm not sure on the exact time, I only noticed it prior to opening this issue (so roughly 3 days ago). It's likely it happened over the weekend, but I can't really say. I'll close this now that it's resolved, but definitely something to keep an eye out for if you didn't push a fix out. Perhaps it's a memory issue or some such?
Here's some error reporting info related to this error, for reference:
Host name: addons.silverstripe.org URL: /add-ons/rss
Error: Uncaught SS_DatabaseException: Couldn't run query:
SELECT DISTINCT count(DISTINCT "AddonAuthor"."ID") AS "Count"
FROM "AddonAuthor"
INNER JOIN "AddonVersion_Authors" ON "AddonVersion_Authors"."AddonAuthorID" = "AddonAuthor"."ID"
WHERE ("AddonVersion_Authors"."AddonVersionID" IN ())
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 3
Reference: https://app.raygun.com/crashreporting/16te7mm/errors/2589242636
Raygun reckons it's been occurring since May this year and the most recent was 10 minutes ago, so I'll reopen it
I've triaged this as effort/easy because looking at that SQL query makes me think there's a query we run that needs to have an if (empty($ids)) { return; }
added before it somewhere
My assumption was wrong. As far as I can tell, this is caused by <% if $Authors %>
in a template, which calls Authors() { return $this->Versions()->relation('Authors'); }
. I think this is doing a count check and causing the error. It's hard to reproduce and track down the context since the stack trace in Raygun includes the logger's backtrace, not the original exception
Most of the request URLs that were causing these errors are now 404, which I assume means they were abandoned or removed packages.
Two example URLs that still exist that were causing this error are these:
Neither have authors associated, but are no longer triggering the error when you load the page. The error has been ignored for 4 months and subsequently hasn't been reported in 4 months, but given that these URLs aren't triggering the error any longer, and the RSS feed URL works fine, I'm going to close this again.
Will reopen if it continues to occur (we get notifications in a Slack channel about this website's errors).
https://addons.silverstripe.org/add-ons/rss