Filed Group Sort 403 error
Steps to reproduce the issue
On User > Fields, Content > Fields or any of the components using Joomla's com_fields template.
Expected result
Expected to sort by Field Group
Actual result
403 error
System information (as much as possible)
In file administrator/components/com_fields/tmpl/fields/defalt.php found the following:
<thead> <tr> <td class="w-1 text-center"> <?php echo HTMLHelper::_('grid.checkall'); ?> </td> <th scope="col" class="w-1 text-center d-none d-md-table-cell"> <?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-sort'); ?> </th> <th scope="col" class="w-1 text-center"> <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?> </th> <th scope="col"> <?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> </th> <th scope="col"> <?php echo HTMLHelper::_('searchtools.sort', 'COM_FIELDS_FIELD_TYPE_LABEL', 'a.type', $listDirn, $listOrder); ?> </th> <th scope="col"> <?php echo HTMLHelper::_('searchtools.sort', 'COM_FIELDS_FIELD_GROUP_LABEL', 'g.title', $listDirn, $listOrder); ?> </th> <th scope="col" class="w-10 d-none d-md-table-cell"> <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?> </th> <?php if (Multilanguage::isEnabled()) : ?> <th scope="col" class="w-10 d-none d-md-table-cell"> <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?> </th> <?php endif; ?> <th scope="col" class="w-5 d-none d-md-table-cell"> <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> </th> </tr> </thead>
Additional comments
Notice the "g.title" . When changed to a.title, error clears.
Do you have access restrictions on your field groups? Could you check? Are there fields "public" where the field-grop is protected?
No, although there are quite a few added usergroups, the fields have at least the required permission to the field groups. Why would that file append a "g" instead f an "a"? The file had g.title but when I change it to a.title the error disappears.
@seymoore The "g" and "a" are table aliases. There are 2 tables joined having a title column, the articles and the field groups. One has alias "a" in the query and the other one "g". If you change the "g" into an "a" in the query, it is not the correct fix because it will refer to the title of the articles table and not the field groups table, but could give at least a hint where to start to look for the real problem.
I tested this on several sites and can't replicate this. Since there was no reaction from the user again and since we didn't get any additional reports like this, I'm expecting this to be a fluke, thus closing this issue. Thank you for reporting though.