panichelpdesk/panichd

SQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'field list'

sandipsapkota1 opened this issue · 9 comments

Please help

{"draw":4,"recordsTotal":0,"recordsFiltered":0,"data":[],"error":"Exception Message:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'field list' (SQL: select count(*) as aggregate from (select panichd_tickets.id, panichd_tickets.created_at, panichd_tickets.subjectassubject, panichd_tickets.hiddenashidden, panichd_tickets.contentascontent, panichd_tickets.interventionasintervention, panichd_tickets.status_idasstatus_id, panichd_statuses.nameasstatus, panichd_statuses.colorascolor_status, panichd_priorities.colorascolor_priority, panichd_categories.colorascolor_category, panichd_tickets.start_dateasstart_date, 0-CONVERT(date_format(panichd_tickets.start_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_start_date, CASE panichd_tickets.limit_date WHEN NULL THEN 0 ELSE 1 END as has_limit, panichd_tickets.limit_dateaslimit_date, 0-CONVERT(date_format(panichd_tickets.limit_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_limit_date, panichd_tickets.limit_dateascalendar, panichd_tickets.updated_atasupdated_at, panichd_tickets.completed_atascompleted_at, panichd_tickets.agent_id, group_concat(agent.name) AS agent_name, panichd_priorities.nameaspriority, panichd_priorities.magnitudeaspriority_magnitude, panichd_members.nameasowner_name, panichd_tickets.user_id, panichd_tickets.creator_id, panichd_tickets.category_id, panichd_categories.nameascategory, group_concat(panichd_tags.id) AS tags_id, group_concat(panichd_tags.name) AS tags, group_concat(panichd_tags.bg_color) AS tags_bg_color, group_concat(panichd_tags.text_color) AS tags_text_color, 0asdeleted_owner, (select count(*) from panichd_attachmentswherepanichd_tickets.id=panichd_attachments.ticket_id) as all_attachments_count, (select count(*) from panichd_commentswherepanichd_tickets.id=panichd_comments.ticket_idandtypein (reply, note, completetx) andtypein (reply, complete, completetx, reopen)) ascomments_count, (select count(*) from panichd_commentswherepanichd_tickets.id=panichd_comments.ticket_idandtypein (reply, note, completetx) andtypein (reply, complete, completetx, reopen) andpanichd_comments.updated_at> 2018-04-07 00:00:00) asrecent_comments_countfrompanichd_ticketsinner joinusersonusers.id=panichd_tickets.user_idinner joinpanichd_membersonpanichd_members.id=panichd_tickets.user_idinner joinpanichd_statusesonpanichd_statuses.id=panichd_tickets.status_idinner joinpanichd_membersasagentonagent.id=panichd_tickets.agent_idinner joinpanichd_prioritiesonpanichd_priorities.id=panichd_tickets.priority_idinner joinpanichd_categoriesonpanichd_categories.id=panichd_tickets.category_idleft joinpanichd_taggablesonpanichd_tickets.id=panichd_taggables.taggable_idandpanichd_taggables.taggable_type= PanicHD\\PanicHD\\Models\\Ticket left joinpanichd_tagsonpanichd_taggables.tag_id=panichd_tags.idwherecompleted_atis null anduser_id= 1 andhidden= 0 anduser_id= 1 andhidden= 0 group bypanichd_tickets.id) count_row_table)"}

Hi, Same problem here.
This thing doesn't work :(

Did you figure out what was going on?

Hi,
Same here any news about that ?

This project is dead, nobody is answering :(

Hi guys,

@Fab-Miami This project isn't dead. It's just I haven't time to dedicate to it since a few weeks ago. That bug is known to me and It is on my plans to publish a patch for it. I'm sorry I can't tell you right know how to solve it exactly, but I guess I remember it's about an array key in TicketsController, but I'm not sure.

As soon as I can get back into it I'll give more feedback.

Hi

Solution is:
Change strict value in config/database.php to false like this:

'mysql' => [
    'driver' => 'mysql',
    'host' => env('DB_HOST', 'localhost'),
    'port' => env('DB_PORT', '3306'),
    'database' => env('DB_DATABASE', 'forge'),
    'username' => env('DB_USERNAME', 'forge'),
    'password' => env('DB_PASSWORD', ''),
    'charset' => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix' => '',
    'strict' => false,
    'engine' => null,
],

Hello! We've just published a new release of the package :) Please check it out and confirm if the bug has been solved. Thank you in advance! @sandipsapkota1 @Fab-Miami @interprogs @marcoroma

Hi All! I haven't resolved the problem, I receive this error when I try to show user's tickets

DataTables warning: table id=tickets-table - Exception Message:

SQLSTATE[42S22]: Column not found: 1054 Unknown column '""' in 'field list' (SQL: select count() as aggregate from (select panichd_tickets.id, panichd_tickets.created_at, panichd_tickets.subject as subject, panichd_tickets.hidden as hidden, panichd_tickets.content as content, panichd_tickets.intervention as intervention, panichd_tickets.status_id as status_id, panichd_statuses.name as status, panichd_statuses.color as color_status, panichd_priorities.color as color_priority, panichd_categories.color as color_category, panichd_tickets.start_date as start_date, 0-CONVERT(date_format(panichd_tickets.start_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_start_date, CASE panichd_tickets.limit_date WHEN NULL THEN 0 ELSE 1 END as has_limit, panichd_tickets.limit_date as limit_date, 0-CONVERT(date_format(panichd_tickets.limit_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_limit_date, panichd_tickets.limit_date as calendar, panichd_tickets.updated_at as updated_at, panichd_tickets.completed_at as completed_at, panichd_tickets.agent_id, agent.name as agent_name, panichd_priorities.name as priority, panichd_priorities.magnitude as priority_magnitude, members.name as owner_name, creator.name as creator_name, panichd_tickets.user_id, panichd_tickets.creator_id, panichd_categories.id as category_id, panichd_categories.name as category, group_concat(panichd_tags.id) AS tags_id, group_concat(panichd_tags.name) AS tags, group_concat(panichd_tags.bg_color) AS tags_bg_color, group_concat(panichd_tags.text_color) AS tags_text_color, "" as dep_ancestor_name, (select count() from panichd_attachments where panichd_tickets.id = panichd_attachments.ticket_id) as all_attachments_count, (select count() from panichd_comments where panichd_tickets.id = panichd_comments.ticket_id and type in (reply, note, completetx) and type in (reply, complete, completetx, reopen) and type != note) as comments_count, (select count() from panichd_comments where panichd_tickets.id = panichd_comments.ticket_id and type in (reply, note, completetx) and type in (reply, complete, completetx, reopen) and type != note and panichd_comments.updated_at > 2019-01-07 00:00:00) as recent_comments_count, (select count(*) from panichd_comments where panichd_tickets.id = panichd_comments.ticket_id and panichd_comments.type = note) as internal_notes_count from panichd_tickets left join users on users.id = panichd_tickets.user_id left join users as members on members.id = panichd_tickets.user_id left join users as creator on creator.id = panichd_tickets.creator_id inner join panichd_statuses on panichd_statuses.id = panichd_tickets.status_id left join users as agent on agent.id = panichd_tickets.agent_id inner join panichd_priorities on panichd_priorities.id = panichd_tickets.priority_id inner join panichd_categories on panichd_categories.id = panichd_tickets.category_id left join panichd_taggables on panichd_tickets.id = panichd_taggables.taggable_id and panichd_taggables.taggable_type = PanicHD\PanicHD\Models\Ticket left join panichd_tags on panichd_taggables.tag_id = panichd_tags.id where completed_at is null and user_id = 2 and hidden = 0 and user_id = 2 and hidden = 0 group by panichd_tickets.id) count_row_table)

Hi All! I haven't resolved the problem, I receive this error when I try to show user's tickets

DataTables warning: table id=tickets-table - Exception Message:

SQLSTATE[42S22]: Column not found: 1054 Unknown column '""' in 'field list' (SQL: select count() as aggregate from (select panichd_tickets.id, panichd_tickets.created_at, panichd_tickets.subject as subject, panichd_tickets.hidden as hidden, panichd_tickets.content as content, panichd_tickets.intervention as intervention, panichd_tickets.status_id as status_id, panichd_statuses.name as status, panichd_statuses.color as color_status, panichd_priorities.color as color_priority, panichd_categories.color as color_category, panichd_tickets.start_date as start_date, 0-CONVERT(date_format(panichd_tickets.start_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_start_date, CASE panichd_tickets.limit_date WHEN NULL THEN 0 ELSE 1 END as has_limit, panichd_tickets.limit_date as limit_date, 0-CONVERT(date_format(panichd_tickets.limit_date, '%Y%m%d%h%i%s'), SIGNED INTEGER) as inverse_limit_date, panichd_tickets.limit_date as calendar, panichd_tickets.updated_at as updated_at, panichd_tickets.completed_at as completed_at, panichd_tickets.agent_id, agent.name as agent_name, panichd_priorities.name as priority, panichd_priorities.magnitude as priority_magnitude, members.name as owner_name, creator.name as creator_name, panichd_tickets.user_id, panichd_tickets.creator_id, panichd_categories.id as category_id, panichd_categories.name as category, group_concat(panichd_tags.id) AS tags_id, group_concat(panichd_tags.name) AS tags, group_concat(panichd_tags.bg_color) AS tags_bg_color, group_concat(panichd_tags.text_color) AS tags_text_color, "" as dep_ancestor_name, (select count() from panichd_attachments where panichd_tickets.id = panichd_attachments.ticket_id) as all_attachments_count, (select count() from panichd_comments where panichd_tickets.id = panichd_comments.ticket_id and type in (reply, note, completetx) and type in (reply, complete, completetx, reopen) and type != note) as comments_count, (select count() from panichd_comments where panichd_tickets.id = panichd_comments.ticket_id and type in (reply, note, completetx) and type in (reply, complete, completetx, reopen) and type != note and panichd_comments.updated_at > 2019-01-07 00:00:00) as recent_comments_count, (select count(*) from panichd_comments where panichd_tickets.id = panichd_comments.ticket_id and panichd_comments.type = note) as internal_notes_count from panichd_tickets left join users on users.id = panichd_tickets.user_id left join users as members on members.id = panichd_tickets.user_id left join users as creator on creator.id = panichd_tickets.creator_id inner join panichd_statuses on panichd_statuses.id = panichd_tickets.status_id left join users as agent on agent.id = panichd_tickets.agent_id inner join panichd_priorities on panichd_priorities.id = panichd_tickets.priority_id inner join panichd_categories on panichd_categories.id = panichd_tickets.category_id left join panichd_taggables on panichd_tickets.id = panichd_taggables.taggable_id and panichd_taggables.taggable_type = PanicHD\PanicHD\Models\Ticket left join panichd_tags on panichd_taggables.tag_id = panichd_tags.id where completed_at is null and user_id = 2 and hidden = 0 and user_id = 2 and hidden = 0 group by panichd_tickets.id) count_row_table)

I have the same problem on a fresh install of Laravel 5.7.