Issues since git update

Now that I have updated, I am getting the following error when I open a fabrik list.

getData:Unknown column 'tasks_repeat_responsible.Name' in 'where clause' SQL=SELECT SQL_CALC_FOUND_ROWS DISTINCT `tasks`.`id` AS `tasks___id`, `tasks`.`id` AS `tasks___id_raw`, `tasks`.`date_time` AS `tasks___date_time`, `tasks`.`date_time` AS `tasks___date_time_raw`, `tasks`.`TaskName` AS `tasks___TaskName`, `tasks`.`TaskName` AS `tasks___TaskName_raw`, `tasks`.`TaskDescription` AS `tasks___TaskDescription`, `tasks`.`TaskDescription` AS `tasks___TaskDescription_raw`, `tasks`.`Sponsor` AS `tasks___Sponsor`, `tasks`.`Sponsor` AS `tasks___Sponsor_raw`, (SELECT GROUP_CONCAT(responsible.Name SEPARATOR '//..*..//') FROM tasks_repeat_responsible LEFT JOIN responsible ON responsible.id = tasks_repeat_responsible.Responsible WHERE tasks_repeat_responsible.parent_id = `tasks`.`id`) AS tasks_repeat_responsible___Responsible, (SELECT GROUP_CONCAT(id SEPARATOR '//..*..//') FROM tasks_repeat_responsible WHERE parent_id = `tasks`.`id`) AS `tasks_repeat_responsible___Responsible_raw`, (SELECT GROUP_CONCAT(Responsible SEPARATOR '//..*..//') FROM tasks_repeat_responsible WHERE tasks_repeat_responsible.parent_id = `tasks`.`id`) AS tasks_repeat_responsible___Responsible_id, (SELECT GROUP_CONCAT(params SEPARATOR '//..*..//') FROM tasks_repeat_responsible WHERE parent_id = `tasks`.`id`) AS `tasks_repeat_responsible___params`, `tasks`.`Status` AS `tasks___Status_raw`, `status`.`Status` AS `tasks___Status`, `tasks`.`LastUpdated` AS `tasks___LastUpdated`, `tasks`.`LastUpdated` AS `tasks___LastUpdated_raw`, `tasks`.`Department` AS `tasks___Department_raw`, `departments`.`Department` AS `tasks___Department`, `tasks`.`lastnoteupdate` AS `tasks___lastnoteupdate`, `tasks`.`lastnoteupdate` AS `tasks___lastnoteupdate_raw`, `tasks`.`Current_Status` AS `tasks___Current_Status`, `tasks`.`Current_Status` AS `tasks___Current_Status_raw`, `tasks`.`History` AS `tasks___History`, `tasks`.`History` AS `tasks___History_raw`, `tasks`.`id` AS slug , `tasks`.`id` AS `__pk_val` FROM `tasks` LEFT JOIN `status` AS `status` ON `status`.`id` = `tasks`.`Status` LEFT JOIN `departments` AS `departments` ON `departments`.`id` = `tasks`.`Department` WHERE ( tasks.Sponsor LIKE '%Chris Pickering%' OR `tasks_repeat_responsible`.`Name` LIKE '%Chris Pickering%' AND `status`.`Status` <> '4' ) ORDER BY `tasks`.`Status` ASC LIMIT 0, 200

The tasks_repeat_responsible.Name is not a column in the tasks_repeat_responsible table.

This worked fine before I updated.

Any ideas why this is happening?

The Responsible column in the tasks table is a multi select dropdown.
 
Where is the filtering on "Chris Pickering" coming from, i.e. is this a pre-filter, or an element filter on the list display?

I need to replicate this locally to debug it, so need to know the steps to take to generate the error.

-- hugh
 
Table Tasks has a "Responsible" column in it. That column is set up as a multi select dropdown.

The Responsible table has id/datetime/name columns.

There is also a tasks_repeat_responsible table.

I am opening the form using a pre filter from a menu.

When I open the list without the pre filter, it works with no issue.

My pre filter looks like the attached.
 

Attachments

  • PreFilter.PNG
    PreFilter.PNG
    13.2 KB · Views: 124
Any ideas on this?

The prefilter on the database joined column worked fine before I updated to the latest Git.

Now it seems to be trying to use the Name column from the joined table rather than the ID.

This is now the only thing stopping me updating my live server with the latest code.

The problem is:

getData:Unknown column 'tasks_repeat_responsible.Name' in 'where clause'
 
The FabrikDebug of the list is as follows:

The line in red looks wrong to me.

render:post
Array()
filter array: after querystring filters
Array()
filter array: after session filters
Array()
joins
Array( [0] => stdClass Object ( [id] => 10 [list_id] => 9 [element_id] => 77 [join_from_table] => tasks [table_join] => tasks_repeat_responsible [table_key] => Responsible [table_join_key] => parent_id [join_type] => left [group_id] => 9 [params] => {"type":"repeatElement","pk":"`tasks_repeat_responsible`.`id`"} [canUse] => [table_join_alias] => tasks_repeat_responsible [keytable] => tasks ) [1] => stdClass Object ( [id] => 11 [list_id] => 0 [element_id] => 78 [join_from_table] => tasks [table_join] => status [table_key] => Status [table_join_key] => id [join_type] => left [group_id] => 9 [params] => {"join-label":"Status","type":"element","pk":"`status`.`id`"} [canUse] => 1 [table_join_alias] => status [keytable] => tasks ) [2] => stdClass Object ( [id] => 13 [list_id] => 0 [element_id] => 94 [join_from_table] => tasks [table_join] => departments [table_key] => Department [table_join_key] => id [join_type] => left [group_id] => 9 [params] => {"join-label":"Department","type":"element","pk":"`departments`.`id`"} [canUse] => 1 [table_join_alias] => departments [keytable] => tasks ))
filter array: search form
Array()
filter array: before onGetPostFilter
Array()
filter array: after onGetPostFilter
Array()
filter array: after getpostfilters
Array()
filter array
Array()
filter array: after access taken into account
Array()
filter:request
Array()
prefilters
Array( [join] => Array ( [0] => OR [1] => OR ) [search_type] => Array ( [0] => prefilter [1] => prefilter ) [key] => Array ( [0] => tasks_repeat_responsible.Responsible [1] => tasks.Sponsor ) [value] => Array ( [0] => {$my->name} [1] => {$my->name} ) [origvalue] => Array ( [0] => {$my->name} [1] => {$my->name} ) [sqlCond] => Array ( [0] => [1] => ) [no-filter-setup] => Array ( [0] => [1] => ) [condition] => Array ( [0] => contains [1] => contains ) [grouped_to_previous] => Array ( [0] => [1] => ) [eval] => Array ( [0] => 0 [1] => 0 ) [match] => Array ( [0] => 0 [1] => 0 ) [full_words_only] => Array ( [0] => 0 [1] => 0 ) [label] => Array ( [0] => [1] => ) [access] => Array ( [0] => [1] => ) [key2] => Array ( [0] => [1] => ) [required] => Array ( [0] => 0 [1] => 0 ) [hidden] => Array ( [0] => [1] => ) [elementid] => Array ( [0] => 77 [1] => 76 ) [raw] => Array ( [0] => [1] => ))
filter:request keys
Array()
tablemodel::getFilterArray middle
Array( [join] => Array ( [0] => OR [1] => OR ) [search_type] => Array ( [0] => prefilter [1] => prefilter ) [key] => Array ( [0] => tasks_repeat_responsible.Responsible [1] => tasks.Sponsor ) [value] => Array ( [0] => {$my->name} [1] => {$my->name} ) [origvalue] => Array ( [0] => {$my->name} [1] => {$my->name} ) [sqlCond] => Array ( [0] => [1] => ) [no-filter-setup] => Array ( [0] => [1] => ) [condition] => Array ( [0] => contains [1] => contains ) [grouped_to_previous] => Array ( [0] => [1] => ) [eval] => Array ( [0] => 0 [1] => 0 ) [match] => Array ( [0] => 0 [1] => 0 ) [full_words_only] => Array ( [0] => 0 [1] => 0 ) [label] => Array ( [0] => [1] => ) [access] => Array ( [0] => [1] => ) [key2] => Array ( [0] => [1] => ) [required] => Array ( [0] => 0 [1] => 0 ) [hidden] => Array ( [0] => [1] => ) [elementid] => Array ( [0] => 77 [1] => 76 ) [raw] => Array ( [0] => [1] => ))
end filters
Array( [join] => Array ( [0] => OR [1] => OR ) [search_type] => Array ( [0] => prefilter [1] => prefilter ) [key] => Array ( [0] => tasks_repeat_responsible.Responsible [1] => tasks.Sponsor ) [value] => Array ( [0] => '%Chris Pickering%' [1] => '%Chris Pickering%' ) [origvalue] => Array ( [0] => {$my->name} [1] => {$my->name} ) [sqlCond] => Array ( [0] => `tasks_repeat_responsible`.`Name` LIKE '%Chris Pickering%' [1] => tasks.Sponsor LIKE '%Chris Pickering%' ) [no-filter-setup] => Array ( [0] => [1] => ) [condition] => Array ( [0] => LIKE [1] => LIKE ) [grouped_to_previous] => Array ( [0] => [1] => ) [eval] => Array ( [0] => 0 [1] => 0 ) [match] => Array ( [0] => 0 [1] => 0 ) [full_words_only] => Array ( [0] => 0 [1] => 0 ) [label] => Array ( [0] => [1] => ) [access] => Array ( [0] => [1] => ) [key2] => Array ( [0] => [1] => ) [required] => Array ( [0] => 0 [1] => 0 ) [hidden] => Array ( [0] => [1] => ) [elementid] => Array ( [0] => 77 [1] => 76 ) [raw] => Array ( [0] => [1] => ) [filter] => Array ( [0] => '%Chris Pickering%' [1] => '%Chris Pickering%' ))
after plugins:eek:nFiltersGot
Array( [join] => Array ( [0] => OR [1] => OR ) [search_type] => Array ( [0] => prefilter [1] => prefilter ) [key] => Array ( [0] => tasks_repeat_responsible.Responsible [1] => tasks.Sponsor ) [value] => Array ( [0] => '%Chris Pickering%' [1] => '%Chris Pickering%' ) [origvalue] => Array ( [0] => {$my->name} [1] => {$my->name} ) [sqlCond] => Array ( [0] => `tasks_repeat_responsible`.`Name` LIKE '%Chris Pickering%' [1] => tasks.Sponsor LIKE '%Chris Pickering%' ) [no-filter-setup] => Array ( [0] => [1] => ) [condition] => Array ( [0] => LIKE [1] => LIKE ) [grouped_to_previous] => Array ( [0] => [1] => ) [eval] => Array ( [0] => 0 [1] => 0 ) [match] => Array ( [0] => 0 [1] => 0 ) [full_words_only] => Array ( [0] => 0 [1] => 0 ) [label] => Array ( [0] => [1] => ) [access] => Array ( [0] => [1] => ) [key2] => Array ( [0] => [1] => ) [required] => Array ( [0] => 0 [1] => 0 ) [hidden] => Array ( [0] => [1] => ) [elementid] => Array ( [0] => 77 [1] => 76 ) [raw] => Array ( [0] => [1] => ) [filter] => Array ( [0] => '%Chris Pickering%' [1] => '%Chris Pickering%' ))
list GetData:Tasks
SELECT SQL_CALC_FOUND_ROWS DISTINCT `tasks`.`id` AS `tasks___id`, `tasks`.`id` AS `tasks___id_raw`, `tasks`.`date_time` AS `tasks___date_time`, `tasks`.`date_time` AS `tasks___date_time_raw`, `tasks`.`TaskName` AS `tasks___TaskName`, `tasks`.`TaskName` AS `tasks___TaskName_raw`, `tasks`.`TaskDescription` AS `tasks___TaskDescription`, `tasks`.`TaskDescription` AS `tasks___TaskDescription_raw`, `tasks`.`Sponsor` AS `tasks___Sponsor`, `tasks`.`Sponsor` AS `tasks___Sponsor_raw`, (SELECT GROUP_CONCAT(responsible.Name SEPARATOR '//..*..//') FROM tasks_repeat_responsible LEFT JOIN responsible ON responsible.id = tasks_repeat_responsible.Responsible WHERE tasks_repeat_responsible.parent_id = `tasks`.`id`) AS tasks_repeat_responsible___Responsible, (SELECT GROUP_CONCAT(id SEPARATOR '//..*..//') FROM tasks_repeat_responsible WHERE parent_id = `tasks`.`id`) AS `tasks_repeat_responsible___Responsible_raw`, (SELECT GROUP_CONCAT(Responsible SEPARATOR '//..*..//') FROM tasks_repeat_responsible WHERE tasks_repeat_responsible.parent_id = `tasks`.`id`) AS tasks_repeat_responsible___Responsible_id, (SELECT GROUP_CONCAT(params SEPARATOR '//..*..//') FROM tasks_repeat_responsible WHERE parent_id = `tasks`.`id`) AS `tasks_repeat_responsible___params`, `tasks`.`Status` AS `tasks___Status_raw`, `status`.`Status` AS `tasks___Status`, `tasks`.`LastUpdated` AS `tasks___LastUpdated`, `tasks`.`LastUpdated` AS `tasks___LastUpdated_raw`, `tasks`.`Department` AS `tasks___Department_raw`, `departments`.`Department` AS `tasks___Department`, `tasks`.`lastnoteupdate` AS `tasks___lastnoteupdate`, `tasks`.`lastnoteupdate` AS `tasks___lastnoteupdate_raw`, `tasks`.`Current_Status` AS `tasks___Current_Status`, `tasks`.`Current_Status` AS `tasks___Current_Status_raw`, `tasks`.`History` AS `tasks___History`, `tasks`.`History` AS `tasks___History_raw`, `tasks`.`id` AS slug , `tasks`.`id` AS `__pk_val` FROM `tasks` LEFT JOIN `status` AS `status` ON `status`.`id` = `tasks`.`Status` LEFT JOIN `departments` AS `departments` ON `departments`.`id` = `tasks`.`Department` WHERE ( `tasks_repeat_responsible`.`Name` LIKE '%Chris Pickering%' OR tasks.Sponsor LIKE '%Chris Pickering%' ) ORDER BY `tasks`.`Status` ASC
getData:Unknown column 'tasks_repeat_responsible.Name' in 'where clause' SQL=SELECT SQL_CALC_FOUND_ROWS DISTINCT `tasks`.`id` AS `tasks___id`, `tasks`.`id` AS `tasks___id_raw`, `tasks`.`date_time` AS `tasks___date_time`, `tasks`.`date_time` AS `tasks___date_time_raw`, `tasks`.`TaskName` AS `tasks___TaskName`, `tasks`.`TaskName` AS `tasks___TaskName_raw`, `tasks`.`TaskDescription` AS `tasks___TaskDescription`, `tasks`.`TaskDescription` AS `tasks___TaskDescription_raw`, `tasks`.`Sponsor` AS `tasks___Sponsor`, `tasks`.`Sponsor` AS `tasks___Sponsor_raw`, (SELECT GROUP_CONCAT(responsible.Name SEPARATOR '//..*..//') FROM tasks_repeat_responsible LEFT JOIN responsible ON responsible.id = tasks_repeat_responsible.Responsible WHERE tasks_repeat_responsible.parent_id = `tasks`.`id`) AS tasks_repeat_responsible___Responsible, (SELECT GROUP_CONCAT(id SEPARATOR '//..*..//') FROM tasks_repeat_responsible WHERE parent_id = `tasks`.`id`) AS `tasks_repeat_responsible___Responsible_raw`, (SELECT GROUP_CONCAT(Responsible SEPARATOR '//..*..//') FROM tasks_repeat_responsible WHERE tasks_repeat_responsible.parent_id = `tasks`.`id`) AS tasks_repeat_responsible___Responsible_id, (SELECT GROUP_CONCAT(params SEPARATOR '//..*..//') FROM tasks_repeat_responsible WHERE parent_id = `tasks`.`id`) AS `tasks_repeat_responsible___params`, `tasks`.`Status` AS `tasks___Status_raw`, `status`.`Status` AS `tasks___Status`, `tasks`.`LastUpdated` AS `tasks___LastUpdated`, `tasks`.`LastUpdated` AS `tasks___LastUpdated_raw`, `tasks`.`Department` AS `tasks___Department_raw`, `departments`.`Department` AS `tasks___Department`, `tasks`.`lastnoteupdate` AS `tasks___lastnoteupdate`, `tasks`.`lastnoteupdate` AS `tasks___lastnoteupdate_raw`, `tasks`.`Current_Status` AS `tasks___Current_Status`, `tasks`.`Current_Status` AS `tasks___Current_Status_raw`, `tasks`.`History` AS `tasks___History`, `tasks`.`History` AS `tasks___History_raw`, `tasks`.`id` AS slug , `tasks`.`id` AS `__pk_val` FROM `tasks` LEFT JOIN `status` AS `status` ON `status`.`id` = `tasks`.`Status` LEFT JOIN `departments` AS `departments` ON `departments`.`id` = `tasks`.`Department` WHERE ( `tasks_repeat_responsible`.`Name` LIKE '%Chris Pickering%' OR tasks.Sponsor LIKE '%Chris Pickering%' ) ORDER BY `tasks`.`Status` ASC LIMIT 0, 200
 
I am trying to do as much of the debug as I can.

The building up of the SQL is creating the following field by concatenating the test values from the dropdown table

(SELECT GROUP_CONCAT(responsible.Name SEPARATOR '//..*..//') FROM tasks_repeat_responsible LEFT JOIN responsible ON responsible.id = tasks_repeat_responsible.Responsible WHERE tasks_repeat_responsible.parent_id = `tasks`.`id`) AS tasks_repeat_responsible___Responsible,

The WHERE Clause, I guess should be looking at the above field in the SQL yet it is incorrectly looking at `tasks_repeat_responsible`.`Name`.

`tasks_repeat_responsible` as a table does not appear in the joins and so will never work.

Added to that, the Column "Name" does not appear in the 'tasks_repeat_responsible' table. Instead, it appears in the Responsible table.

I can only assume this to be a coding error.

If someone can tell me where this SQL is built up, I can go an look for the problem.

ps. In v3.0.6.3, it is handled differently. The Responsible repeat code does not exist in the main query. Instead it is handled through other means (see screenshot)
 

Attachments

  • Capture.PNG
    Capture.PNG
    16.1 KB · Views: 114
Id have to see and have access to:

* the page in question
* a super admin account
* an ftp account
* phpmyadmin access
* reference to which list/form/menu items were causing the issue

to be able to debug this. Could you PM them to me and bump this thread so I know to check my PM

thanks
Rob
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top