-
Notifications
You must be signed in to change notification settings - Fork 595
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
Erorr in events page #417
Comments
@Si-HaMaDa can you please try now, after doing |
@napestershine |
@Si-HaMaDa if possible can you attach a screenshot, I remember I fixed it last weekend And can't get same error on my system . |
@napestershine |
@Si-HaMaDa, Just tagged version 3.3.2, would you please update and try again? |
@antonioribeiro |
@Si-HaMaDa do you get same error message or it's different ? |
@napestershine |
@Si-HaMaDa I am on it. I got it. I will push update in sometime. |
@Si-HaMaDa I have same system running, and same query is running on my system perfectly. Can you share system environment? |
@napestershine |
I know this is a pretty old thread, came across this too. Same as @Si-HaMaDa, I only got this error when using Sqlite. I traced the error and it ends up being inside Datatables.php // vendor/pragmarx/datatables/src/Bllim/Datatables/Datatables.php
.....
protected function ordering()
{
if (array_key_exists('order', $this->input) && count($this->input['order']) > 0) {
- $columns = $this->cleanColumns($this->aliased_ordered_columns);
// The "ambiguous column name" error is because $columns contains only the column name, while we need the table name
+ $columns = $this->aliased_ordered_columns;
for ($i = 0, $c = count($this->input['order']); $i < $c; $i++) {
$order_col = (int)$this->input['order'][$i]['column'];
if (isset($columns[$order_col])) {
if ($this->input['columns'][$order_col]['orderable'] == "true") {
$this->query->orderBy($columns[$order_col], $this->input['order'][$i]['dir']);
}
}
}
}
}
.... After changing that it works now. |
I installed the pakage and worked fine but when trying to open events page in stats it's giving me error
pop up error:
DataTables warning: table id=table_div - Ajax error. For more information about this error, please see http://datatables.net/tn/7
and when trying to see the requests
here's the Request URL
http://localhost/.../public/stats/api/events?draw=1&columns[0][data]=name&columns[0][name]=&columns[0][searchable]=false&columns[0][orderable]=true&columns[0][search][value]=&columns[0][search][regex]=false&columns[1][data]=total&columns[1][name]=&columns[1][searchable]=false&columns[1][orderable]=true&columns[1][search][value]=&columns[1][search][regex]=false&order[0][column]=0&order[0][dir]=asc&start=0&length=10&search[value]=&search[regex]=false&_=1547915504921
and here's the response
message | SQLSTATE[HY000]: General error: 1 ambiguous column name: id (SQL: select "tracker_events"."id", "tracker_events"."name", count(tracker_events_log.id) as total from "tracker_events" inner join "tracker_events_log" on "tracker_events_log"."event_id" = "tracker_events"."id" where "tracker_events_log"."updated_at" >= 2019-01-18 16:31:47 and "tracker_events_log"."updated_at" <= 2019-01-19 16:31:47 group by "tracker_events"."id", "tracker_events"."name" order by "total" desc, "id" asc limit 10 offset 0)
exception | Illuminate\Database\QueryException
The text was updated successfully, but these errors were encountered: