On User > Fields, Content > Fields or any of the components using Joomla's com_fields template.
Expected to sort by Field Group
403 error
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>
Notice the "g.title" . When changed to a.title, error clears.
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Information Required
|
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.
Labels |
Added:
bug
|
Labels |
Removed:
Information Required
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-04-01 21:40:56 |
Closed_By | ⇒ | Hackwar |
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.
Do you have access restrictions on your field groups? Could you check? Are there fields "public" where the field-grop is protected?