News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Errors When Clicking 'Modify' In Permissions

Started by Steve, January 25, 2015, 08:37:46 AM

Previous topic - Next topic

Steve

If I go to 'Permissions' and look at 'General Permissions' I see all my membergroups. Clicking 'modify' on any of them always gives me the same two errors in the Error Log, although everything seems to work as it should. These are the errors:

;area=permissions;e56cde3462b9=84ab57436c3e809e0d6fb7c9a6f88845
Apply Filter: Only show the errors with the same message
8: Undefined index: permissionname_tp_can_admin_shout
Apply Filter: Only show the errors from this file
File: public_html/forums/Sources/ManagePermissions.php
Line: 1667

;area=permissions;sa=modify;group=5
Apply Filter: Only show the errors with the same message
8: Undefined index: permissionname_tp_can_admin_shout
Apply Filter: Only show the errors from this file
File: public_html/forums/Sources/ManagePermissions.php
Line: 1688


Line 1667 is:

'name' => !isset($relabelPermissions[$permission]) ? $txt['permissionname_' . $permission] : $txt[$relabelPermissions[$permission]],

And 1688 is:

'name' => isset($txt['permissionname_simple_' . $permission . ($permissionArray[0] ? '_' . $group_type : '')]) ? $txt['permissionname_simple_' . $permission . ($permissionArray[0] ? '_' . $group_type : '')] : $txt['permissionname_' . $permission],

The code for that entire section is:

// This is where we set up the permission dependant on the view.
if ($loadType == 'classic')
{
$context['permissions'][$permissionType]['columns'][$position][$own_group]['permissions'][$permission] = array(
'id' => $permission,
'name' => !isset($relabelPermissions[$permission]) ? $txt['permissionname_' . $permission] : $txt[$relabelPermissions[$permission]],
'show_help' => isset($txt['permissionhelp_' . $permission]),
'note' => isset($txt['permissionnote_' . $permission]) ? $txt['permissionnote_' . $permission] : '',
'has_own_any' => $permissionArray[0],
'own' => array(
'id' => $permission . '_own',
'name' => $permissionArray[0] ? $txt['permissionname_' . $permission . '_own'] : ''
),
'any' => array(
'id' => $permission . '_any',
'name' => $permissionArray[0] ? $txt['permissionname_' . $permission . '_any'] : ''
),
'hidden' => in_array($permission, $hiddenPermissions),
);
}
else
{
foreach ($bothGroups as $group_type => $group)
{
$context['permissions'][$permissionType]['columns'][$position][$group]['permissions'][$permission . ($permissionArray[0] ? '_' . $group_type : '')] = array(
'id' => $permission . ($permissionArray[0] ? '_' . $group_type : ''),
'name' => isset($txt['permissionname_simple_' . $permission . ($permissionArray[0] ? '_' . $group_type : '')]) ? $txt['permissionname_simple_' . $permission . ($permissionArray[0] ? '_' . $group_type : '')] : $txt['permissionname_' . $permission],
'help_index' => isset($txt['permissionhelp_' . $permission]) ? 'permissionhelp_' . $permission : '',
'hidden' => in_array($permission, $hiddenPermissions),
);
}
}

if (in_array($permission, $hiddenPermissions))
{
if ($permissionArray[0])
{
$context['hidden_permissions'][] = $permission . '_own';
$context['hidden_permissions'][] = $permission . '_any';
}
else
$context['hidden_permissions'][] = $permission;
}
}
ksort($context['permissions'][$permissionType]['columns']);
}


Any idea why I'm getting these?
DO NOT pm me for support!

Arantor

The short answer is TinyPortal seems to not declare all the language strings it should.

Steve

Oh cr@p ... I didn't realize this was TP related though the 'tp' in the error should have been a clue ... we can close this and I'll ask it at Tiny Portal. Thanks. :)
DO NOT pm me for support!

Advertisement: