Hi all,
I have a problem with the table view when I set it to show only owner record and I add some code in the table_name-dv.js file,
I get this error:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 0, 10' at line 1
Can anyone help?
Thanks
Table view set to owner permission problem
Table view set to owner permission problem
Regards,
Edix
Edix
Re: Table view set to owner permission problem
Hi,
what version of AG are you using?
Did you actually change only the -ds.js file?
Did you try to remove the -ds.js file .... what happens then? Does it work?
Did you change some SQL in your code (hooks/tablename.php)? If so, please post your SQL.
What is the error message if you are logged in as admin? Does it show the SQL query?
Olaf
what version of AG are you using?
Did you actually change only the -ds.js file?
Did you try to remove the -ds.js file .... what happens then? Does it work?
Did you change some SQL in your code (hooks/tablename.php)? If so, please post your SQL.
What is the error message if you are logged in as admin? Does it show the SQL query?
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: Table view set to owner permission problem
Hi Olaf,
I'm currently using version 5,95.
When I comment out the code in the table_name-dv.js file or I set the permission to all then the error disappears.
Any idea what's wrong?
I'm currently using version 5,95.
When I comment out the code in the table_name-dv.js file or I set the permission to all then the error disappears.
Any idea what's wrong?
Regards,
Edix
Edix
Re: Table view set to owner permission problem
This is the code inside my -dv.js file
Code: Select all
// file: hooks/TABLENAME-dv.js
var dv = AppGiniHelper.DV;
new AppGiniLayout([6, 6])
.add(1, ["jf_no", "jf_date", "po_no", "start_date", "end_date", "amountJF", "totalPR","revenue", "urgent"])
.add(2, ["noPol", "unitType", "route", "customer", "namePIC", "phonePIC", "specialRequirement", "attachment"]);
var actionbuttons = dv.actionbuttons;
var grp = actionbuttons .addGroup();
var id = dv.getSelectedId();
var href = "operationTrucking_view.php?addNew_x=1&filterer_noJF=" + id;
grp.addLink("Operation", href, Variation.default);
Regards,
Edix
Edix
Re: Table view set to owner permission problem
In the hooks/table_name.php file, I put the default filter
Could this be the problem?
Code: Select all
function truckingJobfile_init(&$options, $memberInfo, &$args) {
/* Apply a default filter only if no filter is already applied by the user */
if(!$_POST['FilterField'][1] && !$_GET['FilterField'][1]){
addFilter(1, 'and', 20, 'equal-to', 'False');
}
return TRUE;
}
Regards,
Edix
Edix
Re: Table view set to owner permission problem
Hi,
please check this thread (and the links in my first entry there): Does this (changing datalist.php) solve your problem?
viewtopic.php?f=11&t=4143
Also check this:
viewtopic.php?f=11&t=4285
Olaf
please check this thread (and the links in my first entry there): Does this (changing datalist.php) solve your problem?
viewtopic.php?f=11&t=4143
Also check this:
viewtopic.php?f=11&t=4285
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: Table view set to owner permission problem
Hi Olaf,
Thank you very much for your help and response.
I see that you really actively helping other members with their problems, people like you that make this community thriving.
Thanks again.
Thank you very much for your help and response.
I see that you really actively helping other members with their problems, people like you that make this community thriving.
Thanks again.
Regards,
Edix
Edix
Re: Table view set to owner permission problem
Hi,
thank you for your kind words, I hope, mine are helpful for you.
Olaf
thank you for your kind words, I hope, mine are helpful for you.
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view