No Code Attached Yet bug
avatar seymoore
seymoore
8 Sep 2022

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.

avatar seymoore seymoore - open - 8 Sep 2022
avatar joomla-cms-bot joomla-cms-bot - change - 8 Sep 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Sep 2022
avatar chmst
chmst - comment - 9 Sep 2022

Do you have access restrictions on your field groups? Could you check? Are there fields "public" where the field-grop is protected?

avatar chmst chmst - change - 9 Sep 2022
Labels Added: Information Required
avatar chmst chmst - labeled - 9 Sep 2022
avatar seymoore
seymoore - comment - 9 Sep 2022

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.

avatar richard67
richard67 - comment - 9 Sep 2022

@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.

avatar Hackwar Hackwar - change - 17 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 17 Feb 2023
avatar richard67 richard67 - change - 6 Apr 2023
Labels Removed: Information Required
avatar richard67 richard67 - unlabeled - 6 Apr 2023
avatar Hackwar Hackwar - change - 1 Apr 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-04-01 21:40:56
Closed_By Hackwar
avatar Hackwar Hackwar - close - 1 Apr 2024
avatar Hackwar
Hackwar - comment - 1 Apr 2024

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.

Add a Comment

Login with GitHub to post a comment